/aosp12/system/netd/server/ |
H A D | OffloadUtils.h | 72 int doTcQdiscClsact(int ifIndex, uint16_t nlMsgType, uint16_t nlMsgFlags); 74 inline int tcQdiscAddDevClsact(int ifIndex) { in tcQdiscAddDevClsact() argument 78 inline int tcQdiscReplaceDevClsact(int ifIndex) { in tcQdiscReplaceDevClsact() argument 82 inline int tcQdiscDelDevClsact(int ifIndex) { in tcQdiscDelDevClsact() argument 83 return doTcQdiscClsact(ifIndex, RTM_DELQDISC, 0); in tcQdiscDelDevClsact() 97 return tcFilterAddDevBpf(ifIndex, EGRESS, ETH_P_IP, bpfFd, ethernet); in tcFilterAddDevEgressClatIpv4() 101 int tcFilterDelDev(int ifIndex, bool ingress, uint16_t proto); 104 inline int tcFilterDelDevIngressClatIpv6(int ifIndex) { in tcFilterDelDevIngressClatIpv6() argument 105 return tcFilterDelDev(ifIndex, INGRESS, ETH_P_IPV6); in tcFilterDelDevIngressClatIpv6() 109 inline int tcFilterDelDevEgressClatIpv4(int ifIndex) { in tcFilterDelDevEgressClatIpv4() argument [all …]
|
H A D | NetlinkHandler.cpp | 88 static long parseIfIndex(const char* ifIndex) { in parseIfIndex() argument 89 if (ifIndex == nullptr) { in parseIfIndex() 92 long ifaceIndex = strtol(ifIndex, nullptr, 10); in parseIfIndex() 113 const char *ifIndex = evt->findParam("IFINDEX"); in onEvent() local 114 long ifaceIndex = parseIfIndex(ifIndex); in onEvent() 118 ALOGE("invalid interface index: %s(%s)", iface, ifIndex); in onEvent() 138 const char *ifIndex = evt->findParam("IFINDEX"); in onEvent() local 146 long ifaceIndex = parseIfIndex(ifIndex); in onEvent() 148 ALOGE("invalid interface index: %s(%s)", iface, ifIndex); in onEvent()
|
H A D | OffloadUtils.cpp | 163 int doTcQdiscClsact(int ifIndex, uint16_t nlMsgType, uint16_t nlMsgFlags) { in doTcQdiscClsact() argument 188 .tcm_ifindex = ifIndex, in doTcQdiscClsact() 212 int tcFilterAddDevBpf(int ifIndex, bool ingress, uint16_t proto, int bpfFd, bool ethernet) { in tcFilterAddDevBpf() argument 301 .tcm_ifindex = ifIndex, in tcFilterAddDevBpf() 362 int tcFilterDelDev(int ifIndex, bool ingress, uint16_t proto) { in tcFilterDelDev() argument 376 .tcm_ifindex = ifIndex, in tcFilterDelDev()
|
H A D | ClatdController.cpp | 203 ALOGE("isEthernet(%s[%d]) failure: %s", tracker.iface, tracker.ifIndex, in maybeStartBpf() 228 .oif = tracker.ifIndex, in maybeStartBpf() 241 .iif = tracker.ifIndex, in maybeStartBpf() 298 rv = tcFilterAddDevIngressClatIpv6(tracker.ifIndex, rxProgFd, isEthernet.value()); in maybeStartBpf() 300 ALOGE("tcFilterAddDevIngressClatIpv6(%d[%s], %d) failure: %s", tracker.ifIndex, in maybeStartBpf() 335 int rv = tcFilterDelDevIngressClatIpv6(tracker.ifIndex); in maybeStopBpf() 337 ALOGE("tcFilterDelDevIngressClatIpv6(%d[%s]) failure: %s", tracker.ifIndex, tracker.iface, in maybeStopBpf() 359 .iif = tracker.ifIndex, in maybeStopBpf() 386 ifIndex = if_nametoindex(iface); in init() 648 dw.println("%u[%s] %s/96 %s -> %s %u[%s] [%s]", tracker.ifIndex, tracker.iface, in dumpTrackers()
|
H A D | NetworkController.cpp | 156 if (int ifIndex = if_nametoindex(iface.c_str())) { local 158 tcQdiscDelDevClsact(ifIndex); 541 int ifIndex = RouteController::getIfIndex(interface); in addInterfaceToNetwork() local 542 if (ifIndex) { in addInterfaceToNetwork() 543 mIfindexToLastNetId[ifIndex] = netId; in addInterfaceToNetwork() 654 void NetworkController::addInterfaceAddress(unsigned ifIndex, const char* address) { in addInterfaceAddress() argument 656 if (ifIndex == 0) { in addInterfaceAddress() 660 mAddressToIfindices[address].insert(ifIndex); in addInterfaceAddress()
|
H A D | NetworkController.h | 140 void addInterfaceAddress(unsigned ifIndex, const char* address); 143 bool removeInterfaceAddress(unsigned ifIndex, const char* address);
|
/aosp12/packages/modules/Connectivity/Tethering/apishim/31/com/android/networkstack/tethering/apishim/api31/ |
H A D | BpfCoordinatorShimImpl.java | 307 public TetherStatsValue tetherOffloadGetAndClearStats(int ifIndex) { in tetherOffloadGetAndClearStats() argument 336 mBpfStatsMap.deleteEntry(new TetherStatsKey(ifIndex)); in tetherOffloadGetAndClearStats() 343 mBpfLimitMap.deleteEntry(new TetherLimitKey(ifIndex)); in tetherOffloadGetAndClearStats() 454 public boolean isAnyIpv4RuleOnUpstream(int ifIndex) { in isAnyIpv4RuleOnUpstream() argument 456 return mRule4CountOnUpstream.get(ifIndex) != null; in isAnyIpv4RuleOnUpstream() 460 public boolean addDevMap(int ifIndex) { in addDevMap() argument 464 mBpfDevMap.updateEntry(new TetherDevKey(ifIndex), new TetherDevValue(ifIndex)); in addDevMap() 466 mLog.e("Could not add interface " + ifIndex + ": " + e); in addDevMap() 473 public boolean removeDevMap(int ifIndex) { in removeDevMap() argument 477 mBpfDevMap.deleteEntry(new TetherDevKey(ifIndex)); in removeDevMap() [all …]
|
/aosp12/packages/modules/Connectivity/Tethering/apishim/30/com/android/networkstack/tethering/apishim/api30/ |
H A D | BpfCoordinatorShimImpl.java | 114 public boolean tetherOffloadSetInterfaceQuota(int ifIndex, long quotaBytes) { in tetherOffloadSetInterfaceQuota() argument 116 mNetd.tetherOffloadSetInterfaceQuota(ifIndex, quotaBytes); in tetherOffloadSetInterfaceQuota() 130 tetherStatsList.put(p.ifIndex, new TetherStatsValue(p.rxPackets, p.rxBytes, in toTetherStatsValueSparseArray() 139 public TetherStatsValue tetherOffloadGetAndClearStats(int ifIndex) { in tetherOffloadGetAndClearStats() argument 142 mNetd.tetherOffloadGetAndClearStats(ifIndex); in tetherOffloadGetAndClearStats() 147 + ifIndex + ": ", e); in tetherOffloadGetAndClearStats() 184 public boolean isAnyIpv4RuleOnUpstream(int ifIndex) { in isAnyIpv4RuleOnUpstream() argument 190 public boolean addDevMap(int ifIndex) { in addDevMap() argument 196 public boolean removeDevMap(int ifIndex) { in removeDevMap() argument
|
/aosp12/frameworks/base/core/java/android/net/util/ |
H A D | SocketUtils.java | 74 public static SocketAddress makePacketSocketAddress(int protocol, int ifIndex) { in makePacketSocketAddress() argument 77 ifIndex /* sll_ifindex */, in makePacketSocketAddress() 90 public static SocketAddress makePacketSocketAddress(int ifIndex, @NonNull byte[] hwAddr) { in makePacketSocketAddress() argument 93 ifIndex /* sll_ifindex */, in makePacketSocketAddress() 106 public static SocketAddress makePacketSocketAddress(int protocol, int ifIndex, in makePacketSocketAddress() argument 110 ifIndex /* sll_ifindex */, in makePacketSocketAddress()
|
/aosp12/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/ |
H A D | TetherDevKey.java | 26 public final long ifIndex; // interface index field in TetherDevKey 28 public TetherDevKey(final long ifIndex) { in TetherDevKey() argument 29 this.ifIndex = ifIndex; in TetherDevKey()
|
H A D | TetherDevValue.java | 26 public final long ifIndex; // interface index field in TetherDevValue 28 public TetherDevValue(final long ifIndex) { in TetherDevValue() argument 29 this.ifIndex = ifIndex; in TetherDevValue()
|
H A D | BpfCoordinator.java | 1171 pw.println(String.format("%d (%s) -> %d (%s)", k.ifIndex, getIfName(k.ifIndex), in dumpDevmap() 1172 v.ifIndex, getIfName(v.ifIndex))); in dumpDevmap() 1641 if (ifIndex == 0) { in sendDataLimitToBpfMap() 1656 if (ifIndex == 0) return; in maybeUpdateDataLimit() 1659 sendDataLimitToBpfMap(ifIndex, quotaBytes); in maybeUpdateDataLimit() 1663 private boolean updateDataLimit(int ifIndex) { in updateDataLimit() argument 1664 final String iface = mInterfaceNames.get(ifIndex); in updateDataLimit() 1670 return sendDataLimitToBpfMap(ifIndex, quotaBytes); in updateDataLimit() 1777 final String iface = mInterfaceNames.get(ifIndex); in buildNetworkStats() 1817 mStats.put(ifIndex, curr); in updateQuotaAndStatsFromSnapshot() [all …]
|
H A D | BpfUtils.java | 139 private static native void tcFilterAddDevBpf(int ifIndex, boolean ingress, short prio, in tcFilterAddDevBpf() argument 142 private static native void tcFilterDelDev(int ifIndex, boolean ingress, short prio, in tcFilterDelDev() argument
|
/aosp12/packages/modules/Connectivity/Tethering/apishim/common/com/android/networkstack/tethering/apishim/common/ |
H A D | BpfCoordinatorShim.java | 121 public abstract boolean tetherOffloadSetInterfaceQuota(int ifIndex, long quotaBytes); in tetherOffloadSetInterfaceQuota() argument 140 public abstract TetherStatsValue tetherOffloadGetAndClearStats(int ifIndex); in tetherOffloadGetAndClearStats() argument 171 public abstract boolean isAnyIpv4RuleOnUpstream(int ifIndex); in isAnyIpv4RuleOnUpstream() argument 190 public abstract boolean addDevMap(int ifIndex); in addDevMap() argument 195 public abstract boolean removeDevMap(int ifIndex); in removeDevMap() argument
|
/aosp12/packages/modules/Connectivity/Tethering/jni/ |
H A D | android_net_util_TetheringUtils.cpp | 75 jint ifIndex) in android_net_util_setupRaSocket() argument 124 len = sizeof(ifIndex); in android_net_util_setupRaSocket() 125 if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, &ifIndex, len) != 0) { in android_net_util_setupRaSocket() 155 .ipv6mr_interface = ifIndex, in android_net_util_setupRaSocket()
|
H A D | com_android_networkstack_tethering_BpfUtils.cpp | 195 JNIEnv* env, jobject clazz, jint ifIndex, jboolean ingress, jshort prio, jshort proto, in com_android_networkstack_tethering_BpfUtils_tcFilterAddDevBpf() argument 240 .tcm_ifindex = ifIndex, in com_android_networkstack_tethering_BpfUtils_tcFilterAddDevBpf() 306 jint ifIndex, in com_android_networkstack_tethering_BpfUtils_tcFilterDelDev() argument 322 .tcm_ifindex = ifIndex, in com_android_networkstack_tethering_BpfUtils_tcFilterDelDev()
|
/aosp12/packages/modules/NetworkStack/apishim/29/com/android/networkstack/apishim/api29/ |
H A D | SocketUtilsShimImpl.java | 46 int protocol, int ifIndex, @NonNull byte[] hwAddr) { in makePacketSocketAddress() argument 48 return SocketUtils.makePacketSocketAddress(ifIndex, hwAddr); in makePacketSocketAddress()
|
/aosp12/packages/modules/NetworkStack/apishim/30/com/android/networkstack/apishim/api30/ |
H A D | SocketUtilsShimImpl.java | 49 int protocol, int ifIndex, @NonNull byte[] hwAddr) { in makePacketSocketAddress() argument 50 return SocketUtils.makePacketSocketAddress(protocol, ifIndex, hwAddr); in makePacketSocketAddress()
|
/aosp12/packages/modules/NetworkStack/common/moduleutils/src/android/net/ip/ |
H A D | IpNeighborMonitor.java | 61 public static int startKernelNeighborProbe(int ifIndex, InetAddress ip) { in startKernelNeighborProbe() argument 62 final String msgSnippet = "probing ip=" + ip.getHostAddress() + "%" + ifIndex; in startKernelNeighborProbe() 66 1, ip, StructNdMsg.NUD_PROBE, ifIndex, null); in startKernelNeighborProbe()
|
/aosp12/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/ |
H A D | BpfCoordinatorTest.java | 355 parcel.ifIndex = ifIndex; in buildTestTetherStatsParcel() 365 final TetherStatsKey key = new TetherStatsKey(stats.ifIndex); in updateStatsEntryToStatsMap() 408 when(mNetd.tetherOffloadGetAndClearStats(stats.ifIndex)).thenReturn(stats); in updateStatsEntryForTetherOffloadGetAndClearStats() 514 final TetherStatsKey key = new TetherStatsKey(ifIndex); in verifyTetherOffloadSetInterfaceQuota() 542 inOrder.verify(mBpfStatsMap).getValue(new TetherStatsKey(ifIndex)); in verifyTetherOffloadGetAndClearStats() 543 inOrder.verify(mBpfStatsMap).deleteEntry(new TetherStatsKey(ifIndex)); in verifyTetherOffloadGetAndClearStats() 544 inOrder.verify(mBpfLimitMap).deleteEntry(new TetherLimitKey(ifIndex)); in verifyTetherOffloadGetAndClearStats() 546 inOrder.verify(mNetd).tetherOffloadGetAndClearStats(ifIndex); in verifyTetherOffloadGetAndClearStats() 1000 final Integer ifIndex = 100; in checkBpfDisabled() local 1001 coordinator.addUpstreamNameToLookupTable(ifIndex, iface); in checkBpfDisabled() [all …]
|
/aosp12/system/netd/server/aidl_api/netd_aidl_interface/4/android/net/ |
H A D | TetherStatsParcel.aidl | 26 int ifIndex = 0;
|
/aosp12/system/netd/server/aidl_api/netd_aidl_interface/5/android/net/ |
H A D | TetherStatsParcel.aidl | 26 int ifIndex = 0;
|
/aosp12/system/netd/server/aidl_api/netd_aidl_interface/6/android/net/ |
H A D | TetherStatsParcel.aidl | 42 int ifIndex = 0;
|
/aosp12/system/netd/server/aidl_api/netd_aidl_interface/7/android/net/ |
H A D | TetherStatsParcel.aidl | 42 int ifIndex = 0;
|
/aosp12/system/netd/server/binder/android/net/ |
H A D | TetherStatsParcel.aidl | 54 int ifIndex = 0;
|