Home
last modified time | relevance | path

Searched refs:IpServer (Results 1 – 15 of 15) sorted by relevance

/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/
DIPv6TetheringCoordinatorTest.java21 import static android.net.ip.IpServer.STATE_LOCAL_ONLY;
22 import static android.net.ip.IpServer.STATE_TETHERED;
43 import android.net.ip.IpServer;
70 private ArrayList<IpServer> mNotifyList;
78 mNotifyList = new ArrayList<IpServer>(); in setUp()
110 final IpServer firstServer = mock(IpServer.class); in testUpdateIpv6Upstream()
113 verify(firstServer).sendMessage(IpServer.CMD_IPV6_TETHER_UPDATE, 0, 0, null); in testUpdateIpv6Upstream()
117 final IpServer secondServer = mock(IpServer.class); in testUpdateIpv6Upstream()
125 verify(secondServer).sendMessage(IpServer.CMD_IPV6_TETHER_UPDATE, 0, 0, null); in testUpdateIpv6Upstream()
132 verify(firstServer).sendMessage(eq(IpServer.CMD_IPV6_TETHER_UPDATE), eq(-1), eq(0), in testUpdateIpv6Upstream()
[all …]
DConnectedClientsTrackerTest.kt25 import android.net.ip.IpServer
47 private val server1 = mock(IpServer::class.java)
48 private val server2 = mock(IpServer::class.java)
79 doReturn(IpServer.STATE_TETHERED).`when`(server1).servingMode() in testUpdateConnectedClients()
80 doReturn(IpServer.STATE_TETHERED).`when`(server2).servingMode() in testUpdateConnectedClients()
86 doReturn(IpServer.STATE_LOCAL_ONLY).`when`(server1).servingMode() in testUpdateConnectedClients_LocalOnly()
87 doReturn(IpServer.STATE_LOCAL_ONLY).`when`(server2).servingMode() in testUpdateConnectedClients_LocalOnly()
158 doReturn(IpServer.STATE_LOCAL_ONLY).`when`(server1).servingMode() in testLocalOnlyAndTetheredHotspotClients()
159 doReturn(IpServer.STATE_TETHERED).`when`(server2).servingMode() in testLocalOnlyAndTetheredHotspotClients()
188 doReturn(IpServer.STATE_TETHERED).`when`(server1).servingMode() in testUpdateConnectedClients_LeaseExpiration()
[all …]
DPrivateAddressCoordinatorTest.java47 import android.net.ip.IpServer;
66 @Mock private IpServer mHotspotIpServer;
67 @Mock private IpServer mLocalHotspotIpServer;
68 @Mock private IpServer mUsbIpServer;
69 @Mock private IpServer mEthernetIpServer;
70 @Mock private IpServer mWifiP2pIpServer;
113 private LinkAddress requestDownstreamAddress(final IpServer ipServer, int scope, in requestDownstreamAddress()
238 verify(mHotspotIpServer).sendMessage(IpServer.CMD_NOTIFY_PREFIX_CONFLICT); in testRequestLastDownstreamAddress()
239 verify(mUsbIpServer).sendMessage(IpServer.CMD_NOTIFY_PREFIX_CONFLICT); in testRequestLastDownstreamAddress()
280 verify(mHotspotIpServer, never()).sendMessage(IpServer.CMD_NOTIFY_PREFIX_CONFLICT); in testNoConflictUpstreamPrefix()
[all …]
DBpfCoordinatorTest.java29 import static android.net.ip.IpServer.STATE_TETHERED;
106 import android.net.ip.IpServer;
447 @Mock private IpServer mIpServer;
448 @Mock private IpServer mIpServer2;
453 @Mock private IpServer.Dependencies mIpServerDeps;
454 @Mock private IpServer.Callback mIpServerCallback;
468 private HashMap<IpServer, HashMap<Inet4Address, ClientInfo>> mTetherClients;
607 private IpServer makeAndStartIpServer(String interfaceName, BpfCoordinator bpfCoordinator) in makeAndStartIpServer()
623 final IpServer ipServer = new IpServer( in makeAndStartIpServer()
628 ipServer.sendMessage(IpServer.CMD_TETHER_REQUESTED, STATE_TETHERED); in makeAndStartIpServer()
[all …]
DTetheringTest.java160 import android.net.ip.IpServer;
381 public class MockIpServerDependencies extends IpServer.Dependencies {
436 ArrayList<IpServer> mAllDownstreams;
470 ArrayList<IpServer> notifyList, SharedLog log) { in makeIPv6TetheringCoordinator()
476 public IpServer.Dependencies makeIpServerDependencies() { in makeIpServerDependencies()
1044 for (IpServer ipSrv : mTetheringDependencies.mAllDownstreams) { in sendIPv6TetherUpdates()
1046 ipSrv.sendMessage(IpServer.CMD_IPV6_TETHER_UPDATE, 0, 0, in sendIPv6TetherUpdates()
1062 eq(IpServer.STATE_TETHERED)); in runUsbTethering()
1067 eq(IpServer.STATE_TETHERED)); in runUsbTethering()
3141 assertTrue(isIpServerActive(TETHERING_WIFI, TEST_WLAN_IFNAME, IpServer.STATE_TETHERED)); in testConnectedClientsForSapAndLohsConcurrency()
[all …]
DTetheringServiceTest.java49 import android.net.ip.IpServer;
190 verify(mTethering).tether(TEST_IFACE_NAME, IpServer.STATE_TETHERED, result); in runTether()
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DIPv6TetheringCoordinator.java25 import android.net.ip.IpServer;
54 public final IpServer ipServer;
59 Downstream(IpServer ipServer, int mode, short subnetId) { in Downstream()
66 private final ArrayList<IpServer> mNotifyList;
78 public IPv6TetheringCoordinator(ArrayList<IpServer> notifyList, SharedLog log) { in IPv6TetheringCoordinator()
87 public void addActiveDownstream(IpServer downstream, int mode) { in addActiveDownstream()
103 public void removeActiveDownstream(IpServer downstream) { in removeActiveDownstream()
143 for (IpServer ipServer : mNotifyList) { in stopIPv6TetheringOnAllInterfaces()
163 for (IpServer ipServer : mNotifyList) { in updateIPv6TetheringInterfaces()
165 ipServer.sendMessage(IpServer.CMD_IPV6_TETHER_UPDATE, getTtlAdjustment(), 0, lp); in updateIPv6TetheringInterfaces()
[all …]
DTethering.java102 import android.net.ip.IpServer;
180 Tethering.class, TetherMainSM.class, IpServer.class
191 public final IpServer ipServer;
198 TetherState(IpServer ipServer, boolean isNcm) { in TetherState()
201 lastState = IpServer.STATE_AVAILABLE; in TetherState()
208 case IpServer.STATE_TETHERED: in isCurrentlyServing()
209 case IpServer.STATE_LOCAL_ONLY: in isCurrentlyServing()
992 if (tetherState.lastState != IpServer.STATE_AVAILABLE) { in tether()
1069 ? IpServer.STATE_LOCAL_ONLY in getRequestedState()
1070 : IpServer.STATE_TETHERED; in getRequestedState()
[all …]
DPrivateAddressCoordinator.java36 import android.net.ip.IpServer;
74 private final ArraySet<IpServer> mDownstreams;
138 for (IpServer downstream : mDownstreams) { in handleMaybePrefixConflict()
143 downstream.sendMessage(IpServer.CMD_NOTIFY_PREFIX_CONFLICT); in handleMaybePrefixConflict()
174 public LinkAddress requestDownstreamAddress(final IpServer ipServer, final int scope, in requestDownstreamAddress()
363 public void releaseDownstream(final IpServer ipServer) { in releaseDownstream()
404 for (IpServer downstream : mDownstreams) { in getInUseDownstreamPrefix()
414 private IpPrefix getDownstreamPrefix(final IpServer downstream) { in getDownstreamPrefix()
465 for (IpServer ipServer : mDownstreams) { in dump()
DConnectedClientsTracker.java24 import android.net.ip.IpServer;
86 Iterable<IpServer> ipServers, @Nullable List<WifiClient> wifiClients, in updateConnectedClients()
98 for (IpServer server : ipServers) { in updateConnectedClients()
101 case IpServer.STATE_TETHERED: in updateConnectedClients()
104 case IpServer.STATE_LOCAL_ONLY: in updateConnectedClients()
DBpfCoordinator.java47 import android.net.ip.IpServer;
256 private final HashMap<IpServer, LinkedHashMap<Inet6Address, Ipv6DownstreamRule>>
266 private final ArrayMap<IpServer, ArraySet<Ipv6UpstreamRule>>
279 private final HashMap<IpServer, HashMap<Inet4Address, ClientInfo>>
283 private final Set<IpServer> mMonitoringIpServers = new HashSet<>();
590 public void startMonitoring(@NonNull final IpServer ipServer) { in startMonitoring()
612 public void stopMonitoring(@NonNull final IpServer ipServer) { in stopMonitoring()
636 @NonNull final IpServer ipServer, @NonNull final Ipv6UpstreamRule rule) { in addIpv6UpstreamRule()
661 private void clearIpv6UpstreamRules(@NonNull final IpServer ipServer) { in clearIpv6UpstreamRules()
694 @NonNull final IpServer ipServer, @NonNull final Ipv6DownstreamRule rule) { in addIpv6DownstreamRule()
[all …]
DTetheringDependencies.java27 import android.net.ip.IpServer;
95 ArrayList<IpServer> notifyList, SharedLog log) { in makeIPv6TetheringCoordinator()
102 public abstract IpServer.Dependencies makeIpServerDependencies(); in makeIpServerDependencies()
DTetheringService.java44 import android.net.ip.IpServer;
112 mTethering.tether(iface, IpServer.STATE_TETHERED, listener); in tether()
338 public IpServer.Dependencies makeIpServerDependencies() { in makeTetheringDependencies()
339 return new IpServer.Dependencies() { in makeTetheringDependencies()
/packages/modules/Connectivity/Tethering/tests/unit/src/android/net/ip/
DIpServerTest.java33 import static android.net.ip.IpServer.STATE_AVAILABLE;
34 import static android.net.ip.IpServer.STATE_LOCAL_ONLY;
35 import static android.net.ip.IpServer.STATE_TETHERED;
36 import static android.net.ip.IpServer.STATE_UNAVAILABLE;
37 import static android.net.ip.IpServer.getTetherableIpv6Prefixes;
172 @Mock private IpServer.Callback mCallback;
178 @Mock private IpServer.Dependencies mDependencies;
193 private IpServer mIpServer;
244 dispatchCommand(IpServer.CMD_TETHER_REQUESTED, STATE_TETHERED); in initTetheredStateMachine()
306 private IpServer createIpServer(final int interfaceType) { in createIpServer()
[all …]
/packages/modules/Connectivity/Tethering/src/android/net/ip/
DIpServer.java111 public class IpServer extends StateMachineShim { class
143 IpServer.class
157 public void updateInterfaceState(IpServer who, int state, int lastError) { } in updateInterfaceState()
165 public void updateLinkProperties(IpServer who, LinkProperties newLp) { } in updateLinkProperties()
323 public IpServer( in IpServer() method in IpServer
1381 mBpfCoordinator.clearAllIpv6Rules(IpServer.this); in exit()
1401 IpServer.this, IpServer.this.mInterfaceParams, NO_UPSTREAM, Set.of()); in cleanupUpstream()