Home
last modified time | relevance | path

Searched refs:mNetd (Results 1 – 25 of 37) sorted by relevance

12

/packages/modules/Connectivity/staticlibs/client-libs/tests/unit/src/com/android/net/module/util/
DNetdUtilsTest.java62 @Mock private INetd mNetd; field in NetdUtilsTest
75 when(mNetd.interfaceGetCfg(eq(IFACE))).thenReturn(config); in setupFlagsForInterfaceConfiguration()
88 NetdUtils.setInterfaceUp(mNetd, IFACE); in verifyMethodsAndArgumentsOfSetInterface()
93 NetdUtils.setInterfaceDown(mNetd, IFACE); in verifyMethodsAndArgumentsOfSetInterface()
95 verify(mNetd).interfaceSetCfg( in verifyMethodsAndArgumentsOfSetInterface()
137 }).when(mNetd).networkAddInterface(LOCAL_NET_ID, IFACE); in setNetworkAddInterfaceOutcome()
166 NetdUtils.tetherInterface(mNetd, IFACE, TEST_IPPREFIX, 20, 0); in runTetherInterfaceWithServiceSpecificException()
173 reset(mNetd); in runTetherInterfaceWithServiceSpecificException()
180 NetdUtils.tetherInterface(mNetd, IFACE, TEST_IPPREFIX, 20, 0); in runTetherInterfaceWithRemoteException()
185 reset(mNetd); in runTetherInterfaceWithRemoteException()
[all …]
/packages/modules/Connectivity/Tethering/tests/unit/src/android/net/ip/
DIpServerTest.java171 @Mock private INetd mNetd; field in IpServerTest
229 reset(mNetd, mCallback, mIpNeighborMonitor); in initStateMachine()
256 reset(mNetd, mBpfCoordinator, mCallback, mAddressCoordinator); in initTetheredStateMachine()
289 mNetd.tetherAddForward(fromIface, toIface); in setUp()
290 mNetd.ipfwdAddInterfaceForward(fromIface, toIface); in setUp()
296 mNetd.ipfwdRemoveInterfaceForward(fromIface, toIface); in setUp()
297 mNetd.tetherRemoveForward(fromIface, toIface); in setUp()
309 return new IpServer(IFACE_NAME, mHandler, interfaceType, mSharedLog, mNetd, mBpfCoordinator, in createIpServer()
325 verifyNoMoreInteractions(mCallback, mNetd); in startsOutAvailable()
344 verifyNoMoreInteractions(mNetd, mCallback); in shouldDoNothingUntilRequested()
[all …]
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DRoutingCoordinatorServiceTest.kt36 val mNetd = mock(INetd::class.java) in <lambda>() constant
37 val mService = RoutingCoordinatorService(mNetd) in <lambda>()
41 val inOrder = inOrder(mNetd) in <lambda>()
44 inOrder.verify(mNetd).ipfwdEnableForwarding(any()) in <lambda>()
45 inOrder.verify(mNetd).tetherAddForward("from1", "to1") in <lambda>()
46 inOrder.verify(mNetd).ipfwdAddInterfaceForward("from1", "to1") in <lambda>()
49 inOrder.verify(mNetd).tetherAddForward("from2", "to1") in <lambda>()
50 inOrder.verify(mNetd).ipfwdAddInterfaceForward("from2", "to1") in <lambda>()
64 inOrder.verify(mNetd).ipfwdRemoveInterfaceForward("from1", "to1") in <lambda>()
65 inOrder.verify(mNetd).tetherRemoveForward("from1", "to1") in <lambda>()
[all …]
DNat464XlatTest.java84 @Mock INetd mNetd; field in Nat464XlatTest
106 return new Nat464Xlat(mNai, mNetd, mDnsResolver, deps) { in makeNat464Xlat()
138 when(mNetd.interfaceGetCfg(eq(STACKED_IFACE))).thenReturn(mConfig);
244 verifyWithOrder(inOrder, mNetd).clatdStart(eq(BASE_IFACE), eq(NAT64_PREFIX));
252 verify(mNetd, never()).clatdStart(anyString(), anyString());
260 verifyWithOrder(inOrder, mNetd).clatdStop(eq(BASE_IFACE));
280 verify(mNetd).interfaceGetCfg(eq(STACKED_IFACE));
301 verifyNoMoreInteractions(mNetd, mConnectivity);
317 InOrder inOrder = inOrder(mNetd, mConnectivity, mClatCoordinator);
411 verify(mNetd).interfaceGetCfg(eq(STACKED_IFACE));
[all …]
DClatCoordinatorTest.java145 @Mock private INetd mNetd; field in ClatCoordinatorTest
159 return mNetd; in getNetd()
402 final InOrder inOrder = inOrder(mNetd, mDeps, mIngressMap, mEgressMap, mCookieTagMap); in testStartStopClatd()
403 clearInvocations(mNetd, mDeps, mIngressMap, mEgressMap, mCookieTagMap); in testStartStopClatd()
442 inOrder.verify(mNetd).interfaceSetEnableIPv6(eq(STACKED_IFACE), eq(false /* enable */)); in testStartStopClatd()
444 inOrder.verify(mNetd).interfaceSetMtu(eq(STACKED_IFACE), in testStartStopClatd()
446 inOrder.verify(mNetd).interfaceSetCfg(argThat(cfg -> in testStartStopClatd()
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DRoutingCoordinatorService.java46 private final INetd mNetd; field in RoutingCoordinatorService
49 mNetd = netd; in RoutingCoordinatorService()
63 mNetd.networkAddRouteParcel(netId, toRouteInfoParcel(route)); in addRoute()
77 mNetd.networkRemoveRouteParcel(netId, toRouteInfoParcel(route)); in removeRoute()
91 mNetd.networkUpdateRouteParcel(netId, toRouteInfoParcel(route)); in updateRoute()
107 mNetd.networkAddInterface(netId, iface); in addInterfaceToNetwork()
122 mNetd.networkRemoveInterface(netId, iface); in removeInterfaceFromNetwork()
170 mNetd.ipfwdEnableForwarding("RoutingCoordinator"); in addInterfaceForward()
180 mNetd.tetherAddForward(fromIface, toIface); in addInterfaceForward()
181 mNetd.ipfwdAddInterfaceForward(fromIface, toIface); in addInterfaceForward()
[all …]
DNat464Xlat.java80 private final INetd mNetd; field in Nat464Xlat
115 mNetd = netd; in Nat464Xlat()
119 mClatCoordinator = deps.getClatCoordinator(mNetd); in Nat464Xlat()
209 addrStr = mNetd.clatdStart(baseIface, mNat64PrefixInUse.toString()); in enterStartingState()
295 mNetd.clatdStop(mBaseIface); in stop()
475 final InterfaceConfigurationParcel config = mNetd.interfaceGetCfg(iface); in getLinkAddress()
DClatCoordinator.java130 private final INetd mNetd; field in ClatCoordinator
399 mNetd = mDeps.getNetd(); in ClatCoordinator()
645 mNetd.interfaceSetEnableIPv6(tunIface, false /* enabled */); in clatStart()
652 mNetd.interfaceSetMtu(tunIface, mtu); in clatStart()
659 mNetd.interfaceSetCfg(ifConfig); in clatStart()
DPermissionMonitor.java99 private final INetd mNetd; field in PermissionMonitor
277 mNetd = netd; in PermissionMonitor()
567 mNetd.networkSetPermissionForUser(PERMISSION_NETWORK, toIntArray(network)); in sendUidsNetworkPermission()
568 mNetd.networkSetPermissionForUser(PERMISSION_SYSTEM, toIntArray(system)); in sendUidsNetworkPermission()
570 mNetd.networkClearPermissionForUser(toIntArray(network)); in sendUidsNetworkPermission()
571 mNetd.networkClearPermissionForUser(toIntArray(system)); in sendUidsNetworkPermission()
/packages/modules/Connectivity/staticlibs/device/com/android/net/module/util/ip/
DInterfaceController.java45 private final INetd mNetd; field in InterfaceController
50 mNetd = netd; in InterfaceController()
80 mNetd.interfaceSetCfg(ifConfig); in setInterfaceConfiguration()
105 mNetd.interfaceSetEnableIPv6(mIfName, enabled); in setEnableIPv6()
133 mNetd.interfaceSetIPv6PrivacyExtensions(mIfName, enabled); in setIPv6PrivacyExtensions()
149 mNetd.setIPv6AddrGenMode(mIfName, mode); in setIPv6AddrGenModeIfSupported()
174 mNetd.interfaceAddAddress(mIfName, ip.getHostAddress(), prefixLen); in addAddress()
187 mNetd.interfaceDelAddress(mIfName, ip.getHostAddress(), prefixLen); in removeAddress()
200 mNetd.interfaceClearAddrs(mIfName); in clearAllAddresses()
/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/
DTetheringTest.java284 @Mock private INetd mNetd; field in TetheringTest
502 return mNetd; in getINetd()
654 when(mNetd.interfaceGetList()) in setUp()
693 verify(mNetd).registerUnsolicitedEventListener(any()); in initTetheringOnTestThread()
871 verify(mNetd).interfaceSetCfg(any(InterfaceConfigurationParcel.class)); in verifyInterfaceServingModeStarted()
872 verify(mNetd).tetherInterfaceAdd(ifname); in verifyInterfaceServingModeStarted()
873 verify(mNetd).networkAddInterface(INetd.LOCAL_NET_ID, ifname); in verifyInterfaceServingModeStarted()
874 verify(mNetd, times(2)).networkAddRoute(eq(INetd.LOCAL_NET_ID), eq(ifname), in verifyInterfaceServingModeStarted()
908 verifyNoMoreInteractions(mNetd); in failingLocalOnlyHotspotLegacyApBroadcast()
947 verifyNoMoreInteractions(mNetd); in testUsbConfiguredBroadcastStartsTethering()
[all …]
DBpfCoordinatorTest.java446 @Mock private INetd mNetd; field in BpfCoordinatorTest
501 return mNetd;
582 mNetd.tetherAddForward(fromIface, toIface); in setUp()
583 mNetd.ipfwdAddInterfaceForward(fromIface, toIface); in setUp()
589 mNetd.ipfwdRemoveInterfaceForward(fromIface, toIface); in setUp()
590 mNetd.tetherRemoveForward(fromIface, toIface); in setUp()
603 when(mNetd.tetherOffloadGetStats()).thenReturn(new TetherStatsParcel[0]); in setupFunctioningNetdInterface()
624 interfaceName, mHandler, TETHERING_WIFI, new SharedLog("test"), mNetd, in makeAndStartIpServer()
719 when(mNetd.tetherOffloadGetStats()).thenReturn(new TetherStatsParcel[] {stats}); in updateStatsEntry()
734 when(mNetd.tetherOffloadGetStats()).thenReturn(tetherStatsList); in updateStatsEntriesAndWaitForUpdate()
[all …]
/packages/modules/Connectivity/Tethering/apishim/30/com/android/networkstack/tethering/apishim/api30/
DBpfCoordinatorShimImpl.java47 private final INetd mNetd; field in BpfCoordinatorShimImpl
51 mNetd = deps.getNetd(); in BpfCoordinatorShimImpl()
72 mNetd.tetherOffloadRuleAdd(rule.toTetherOffloadRuleParcel()); in addIpv6DownstreamRule()
84 mNetd.tetherOffloadRuleRemove(rule.toTetherOffloadRuleParcel()); in removeIpv6DownstreamRule()
100 tetherStatsList = mNetd.tetherOffloadGetStats(); in tetherOffloadGetStats()
112 mNetd.tetherOffloadSetInterfaceQuota(ifIndex, quotaBytes); in tetherOffloadSetInterfaceQuota()
138 mNetd.tetherOffloadGetAndClearStats(ifIndex); in tetherOffloadGetAndClearStats()
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/ip/
DInterfaceControllerTest.java51 @Mock private INetd mNetd; field in InterfaceControllerTest
60 mController = new InterfaceController(TEST_IFACE, mNetd, mLog); in setUp()
62 doNothing().when(mNetd).interfaceSetCfg(mConfigCaptor.capture()); in setUp()
70 verify(mNetd, times(1)).interfaceSetCfg(any()); in testSetIPv4Address()
82 verify(mNetd, times(1)).interfaceSetCfg(any()); in testClearIPv4Address()
/packages/modules/Connectivity/service-t/src/com/android/server/
DIpSecService.java113 private final INetd mNetd; field in IpSecService
694 mNetd.ipSecDeleteSecurityAssociation( in freeUnderlyingResources()
761 mNetd.ipSecDeleteSecurityAssociation( in freeUnderlyingResources()
910 mNetd.ipSecRemoveTunnelInterface(mInterfaceName); in freeUnderlyingResources()
913 mNetd.ipSecDeleteSecurityPolicy( in freeUnderlyingResources()
920 mNetd.ipSecDeleteSecurityPolicy( in freeUnderlyingResources()
927 mNetd.ipSecDeleteSecurityPolicy( in freeUnderlyingResources()
1124 mNetd = mDeps.getNetdInstance(mContext); in IpSecService()
1185 spi = mNetd.ipSecAllocateSpi(callingUid, "", destinationAddress, requestedSpi); in allocateSecurityParameterIndex()
1329 mNetd.ipSecSetEncapSocketOwner(pFd, callingUid); in openUdpEncapsulationSocket()
[all …]
/packages/modules/Connectivity/Tethering/src/android/net/ip/
DIpServer.java252 private final INetd mNetd; field in IpServer
332 mNetd = netd; in IpServer()
336 mInterfaceCtrl = new InterfaceController(ifaceName, mNetd, mLog); in IpServer()
831 mNetd, toBeRemoved); in removeRoutesFromLocalNetwork()
847 mNetd.networkAddInterface(netId, ifaceName); in addInterfaceToNetwork()
859 mNetd.tetherAddForward(fromIface, toIface); in addInterfaceForward()
860 mNetd.ipfwdAddInterfaceForward(fromIface, toIface); in addInterfaceForward()
874 mNetd.ipfwdRemoveInterfaceForward(fromIface, toIface); in removeInterfaceForward()
879 mNetd.tetherRemoveForward(fromIface, toIface); in removeInterfaceForward()
893 NetdUtils.addRoutesToLocalNetwork(mNetd, mIfaceName, toBeAdded); in addRoutesToLocalNetwork()
[all …]
/packages/modules/Connectivity/service/src/com/android/server/
DTestNetworkService.java70 @NonNull private final INetd mNetd; field in TestNetworkService
94 mNetd = Objects.requireNonNull( in TestNetworkService()
150 mNetd.setProcSysNet( in createInterface()
152 mNetd.setProcSysNet(INetd.IPV6, INetd.CONF, interfaceName, "dad_transmits", "0"); in createInterface()
156 mNetd.interfaceAddAddress( in createInterface()
DBpfNetMaps.java106 private final INetd mNetd; field in BpfNetMaps
374 mNetd = netd; in BpfNetMaps()
668 mNetd.firewallAddUidInterfaceRules(ifName, uids); in addUidInterfaceRules()
706 mNetd.firewallRemoveUidInterfaceRules(uids); in removeUidInterfaceRules()
785 mNetd.trafficSetNetPermForUids(permissions, uids); in setNetPermForUids()
/packages/modules/Connectivity/service-t/src/com/android/server/ethernet/
DEthernetTracker.java118 private final INetd mNetd; field in EthernetTracker
241 mNetd = netd; in EthernetTracker()
411 ifaces = mNetd.interfaceGetList(); in getInterfaceList()
601 config = NetdUtils.getInterfaceConfigParcel(mNetd, iface); in addInterface()
605 NetdUtils.setInterfaceUp(mNetd, iface); in addInterface()
667 NetdUtils.setInterfaceUp(mNetd, iface); in setInterfaceAdministrativeState()
669 NetdUtils.setInterfaceDown(mNetd, iface); in setInterfaceAdministrativeState()
733 final String[] ifaces = mNetd.interfaceGetList(); in trackAvailableInterfaces()
/packages/modules/NetworkStack/src/android/net/ip/
DIpReachabilityMonitor.java231 private final INetd mNetd;
286 mNetd = netd;
287 Preconditions.checkNotNull(mNetd);
690 mNetd.setProcSysNet(family, INetd.NEIGH, mInterfaceParams.name, "retrans_time_ms",
692 mNetd.setProcSysNet(family, INetd.NEIGH, mInterfaceParams.name, "ucast_solicit",
695 mNetd.setProcSysNet(family, INetd.NEIGH, mInterfaceParams.name, "mcast_resolicit",
/packages/modules/Connectivity/tests/unit/java/com/android/server/ethernet/
DEthernetTrackerTest.java73 @Mock private INetd mNetd; field in EthernetTrackerTest
81 doReturn(new String[0]).when(mNetd).interfaceGetList(); in setUp()
84 tracker = new EthernetTracker(mContext, mHandlerThread.getThreadHandler(), mFactory, mNetd, in setUp()
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DTethering.java248 private final INetd mNetd; field in Tethering
297 mNetd = mDeps.getINetd(mContext); in Tethering()
382 return mNetd; in Tethering()
462 mNetd.registerUnsolicitedEventListener(mNetdCallback); in startStateMachineUpdaters()
1544 ifaces = mNetd.interfaceGetList(); in enableUsbIpServing()
1774 mNetd.ipfwdEnableForwarding(TAG); in turnOnMainTetherSettings()
1786 NetdUtils.tetherStart(mNetd, true /** usingLegacyDnsProxy */, dhcpRanges); in turnOnMainTetherSettings()
1790 mNetd.tetherStop(); in turnOnMainTetherSettings()
1791 NetdUtils.tetherStart(mNetd, true /** usingLegacyDnsProxy */, dhcpRanges); in turnOnMainTetherSettings()
1804 mNetd.tetherStop(); in turnOffMainTetherSettings()
[all …]
/packages/modules/NetworkStack/tests/unit/src/android/net/ip/
DIpClientTest.java165 @Mock private INetd mNetd; field in IpClientTest
190 when(mDependencies.getNetd(any())).thenReturn(mNetd); in setUp()
219 verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceSetEnableIPv6(ifname, false); in makeIpClient()
220 verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceClearAddrs(ifname); in makeIpClient()
226 reset(mNetd); in makeIpClient()
514 verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)) in testProvisioningWithInitialConfiguration()
542 verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceSetEnableIPv6(TEST_IFNAME, false); in verifyShutdown()
543 verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceClearAddrs(TEST_IFNAME); in verifyShutdown()
/packages/modules/NetworkStack/src/com/android/server/
DNetworkStackService.java199 private final INetd mNetd; field in NetworkStackService.NetworkStackConnector
295 mNetd = INetd.Stub.asInterface( in NetworkStackConnector()
311 netdVersion = mNetd.getInterfaceVersion(); in NetworkStackConnector()
312 netdHash = mNetd.getInterfaceHash(); in NetworkStackConnector()
/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/netlink/
DTcpSocketTrackerTest.java153 @Mock private INetd mNetd; field in TcpSocketTrackerTest
172 when(mDependencies.getNetd()).thenReturn(mNetd); in setUp()
180 when(mNetd.getFwmarkForNetwork(eq(TEST_NETID1))) in setUp()
842 when(mNetd.getFwmarkForNetwork(eq(TEST_NETID2))) in testUnMatchNetwork()

12