Home
last modified time | relevance | path

Searched refs:ifIndex (Results 1 – 18 of 18) sorted by relevance

/packages/modules/Connectivity/Tethering/apishim/31/com/android/networkstack/tethering/apishim/api31/
DBpfCoordinatorShimImpl.java250 public boolean tetherOffloadSetInterfaceQuota(int ifIndex, long quotaBytes) { in tetherOffloadSetInterfaceQuota() argument
260 statsValue = mBpfStatsMap.getValue(new TetherStatsKey(ifIndex)); in tetherOffloadSetInterfaceQuota()
264 mLog.e("Could not get stats entry of interface index " + ifIndex + ": ", e); in tetherOffloadSetInterfaceQuota()
278 mBpfStatsMap.insertEntry(new TetherStatsKey(ifIndex), new TetherStatsValue( in tetherOffloadSetInterfaceQuota()
296 mBpfLimitMap.updateEntry(new TetherLimitKey(ifIndex), new TetherLimitValue(newLimit)); in tetherOffloadSetInterfaceQuota()
298 mLog.e("Fail to set quota " + quotaBytes + " for interface index " + ifIndex + ": ", e); in tetherOffloadSetInterfaceQuota()
307 public TetherStatsValue tetherOffloadGetAndClearStats(int ifIndex) { in tetherOffloadGetAndClearStats() argument
324 statsValue = mBpfStatsMap.getValue(new TetherStatsKey(ifIndex)); in tetherOffloadGetAndClearStats()
326 mLog.e("Could not get stats entry for interface index " + ifIndex + ": ", e); in tetherOffloadGetAndClearStats()
331 mLog.e("Could not get stats entry for interface index " + ifIndex); in tetherOffloadGetAndClearStats()
[all …]
/packages/modules/Connectivity/Tethering/apishim/30/com/android/networkstack/tethering/apishim/api30/
DBpfCoordinatorShimImpl.java114 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
/packages/modules/Connectivity/Tethering/apishim/common/com/android/networkstack/tethering/apishim/common/
DBpfCoordinatorShim.java121 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
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DTetherDevValue.java26 public final long ifIndex; // interface index field in TetherDevValue
28 public TetherDevValue(final long ifIndex) { in TetherDevValue() argument
29 this.ifIndex = ifIndex; in TetherDevValue()
DTetherDevKey.java26 public final long ifIndex; // interface index field in TetherDevKey
28 public TetherDevKey(final long ifIndex) { in TetherDevKey() argument
29 this.ifIndex = ifIndex; in TetherDevKey()
DBpfCoordinator.java1171 pw.println(String.format("%d (%s) -> %d (%s)", k.ifIndex, getIfName(k.ifIndex), in dumpDevmap()
1172 v.ifIndex, getIfName(v.ifIndex))); in dumpDevmap()
1640 private boolean sendDataLimitToBpfMap(int ifIndex, long quotaBytes) { in sendDataLimitToBpfMap() argument
1641 if (ifIndex == 0) { in sendDataLimitToBpfMap()
1646 return mBpfCoordinatorShim.tetherOffloadSetInterfaceQuota(ifIndex, quotaBytes); in sendDataLimitToBpfMap()
1655 final int ifIndex = getInterfaceIndexFromRules(iface); in maybeUpdateDataLimit() local
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()
[all …]
DBpfUtils.java139 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
/packages/modules/Connectivity/Tethering/jni/
Dandroid_net_util_TetheringUtils.cpp75 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()
Dcom_android_networkstack_tethering_BpfUtils.cpp195 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()
/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/
DBpfCoordinatorTest.java352 private static TetherStatsParcel buildTestTetherStatsParcel(@NonNull Integer ifIndex, in buildTestTetherStatsParcel() argument
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()
511 private void verifyTetherOffloadSetInterfaceQuota(@Nullable InOrder inOrder, int ifIndex, in verifyTetherOffloadSetInterfaceQuota() argument
514 final TetherStatsKey key = new TetherStatsKey(ifIndex); in verifyTetherOffloadSetInterfaceQuota()
521 verifyWithOrder(inOrder, mBpfLimitMap).updateEntry(new TetherLimitKey(ifIndex), in verifyTetherOffloadSetInterfaceQuota()
524 verifyWithOrder(inOrder, mNetd).tetherOffloadSetInterfaceQuota(ifIndex, quotaBytes); in verifyTetherOffloadSetInterfaceQuota()
539 private void verifyTetherOffloadGetAndClearStats(@NonNull InOrder inOrder, int ifIndex) in verifyTetherOffloadGetAndClearStats() argument
542 inOrder.verify(mBpfStatsMap).getValue(new TetherStatsKey(ifIndex)); in verifyTetherOffloadGetAndClearStats()
[all …]
/packages/modules/NetworkStack/common/moduleutils/src/android/net/ip/
DIpNeighborMonitor.java61 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()
/packages/modules/NetworkStack/apishim/29/com/android/networkstack/apishim/api29/
DSocketUtilsShimImpl.java46 int protocol, int ifIndex, @NonNull byte[] hwAddr) { in makePacketSocketAddress() argument
48 return SocketUtils.makePacketSocketAddress(ifIndex, hwAddr); in makePacketSocketAddress()
/packages/modules/NetworkStack/apishim/30/com/android/networkstack/apishim/api30/
DSocketUtilsShimImpl.java49 int protocol, int ifIndex, @NonNull byte[] hwAddr) { in makePacketSocketAddress() argument
50 return SocketUtils.makePacketSocketAddress(protocol, ifIndex, hwAddr); in makePacketSocketAddress()
/packages/modules/NetworkStack/tests/unit/src/android/net/netlink/
DRtNetlinkNeighborMessageTest.java170 final int ifIndex = 14; in testCreateRtmNewNeighMessage() local
203 seqNo, Inet4Address.LOOPBACK, StructNdMsg.NUD_DELAY, ifIndex, llAddr); in testCreateRtmNewNeighMessage()
/packages/modules/NetworkStack/common/netlinkclient/src/android/net/netlink/
DRtNetlinkNeighborMessage.java123 int seqNo, InetAddress ip, short nudState, int ifIndex, byte[] llAddr) { in newNewNeighborMessage() argument
133 msg.mNdmsg.ndm_ifindex = ifIndex; in newNewNeighborMessage()
/packages/modules/NetworkStack/apishim/common/com/android/networkstack/apishim/common/
DSocketUtilsShim.java36 SocketAddress makePacketSocketAddress(int protocol, int ifIndex, @NonNull byte[] hwAddr); in makePacketSocketAddress() argument
/packages/modules/Connectivity/Tethering/src/android/net/util/
DTetheringUtils.java145 public static native void setupRaSocket(FileDescriptor fd, int ifIndex) in setupRaSocket() argument
/packages/modules/Connectivity/Tethering/tests/unit/src/android/net/ip/
DIpServerTest.java962 private static TetherStatsParcel buildEmptyTetherStatsParcel(int ifIndex) { in buildEmptyTetherStatsParcel() argument
964 parcel.ifIndex = ifIndex; in buildEmptyTetherStatsParcel()