Home
last modified time | relevance | path

Searched refs:LinkAddress (Results 1 – 25 of 139) sorted by relevance

123456

/packages/modules/Connectivity/tests/common/java/android/net/
DLinkAddressTest.java89 LinkAddress address; in testConstructors()
92 address = new LinkAddress(V4_ADDRESS, 25); in testConstructors()
99 address = new LinkAddress(V6_ADDRESS, 127); in testConstructors()
107 address = new LinkAddress(V6 + "/64", IFA_F_DEPRECATED | IFA_F_PERMANENT, RT_SCOPE_LINK); in testConstructors()
114 address = new LinkAddress(V4 + "/23", 123, 456); in testConstructors()
121 address = new LinkAddress("/64", 1 /* flags */, 2 /* scope */); in testConstructors()
128 address = new LinkAddress("[2001:db8::123]/64", 3 /* flags */, 4 /* scope */); in testConstructors()
139 LinkAddress ipv4Loopback, ipv6Loopback; in testConstructors()
142 ipv4Loopback = new LinkAddress(addrs.get(0)); in testConstructors()
143 ipv6Loopback = new LinkAddress(addrs.get(1)); in testConstructors()
[all …]
DLinkPropertiesTest.java89 private static final LinkAddress LINKADDRV4 = new LinkAddress(ADDRV4, 32);
90 private static final LinkAddress LINKADDRV6 = new LinkAddress(ADDRV6, 128);
91 private static final LinkAddress LINKADDRV6LINKLOCAL = new LinkAddress("fe80::1/64");
280 target.addLinkAddress(new LinkAddress(address("75.208.6.2"), 32)); in testEqualsSameOrder()
401 LinkAddress prefix1 = new LinkAddress(address("2001:db8:1::"), 48); in testRouteInterfaces()
402 LinkAddress prefix2 = new LinkAddress(address("2001:db8:2::"), 48); in testRouteInterfaces()
538 private LinkAddress getFirstLinkAddress(LinkProperties lp) { in getFirstLinkAddress()
613 LinkAddress deprecated = new LinkAddress(ADDRV6, 128, in testAddressMethods()
639 final List<LinkAddress> linkAddresses = Arrays.asList(LINKADDRV4); in testLinkAddresses()
814 assertTrue(v4lp.addLinkAddress(new LinkAddress(ADDRV4, 16))); in testIsReachable()
[all …]
/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/
DPrivateAddressCoordinatorTest.java39 import android.net.LinkAddress;
71 private final LinkAddress mBluetoothAddress = new LinkAddress("192.168.44.1/24");
72 private final LinkAddress mLegacyWifiP2pAddress = new LinkAddress("192.168.49.1/24");
107 private LinkAddress requestDownstreamAddress(final IpServer ipServer, boolean useLastAddress) { in requestDownstreamAddress()
108 final LinkAddress address = mPrivateAddressCoordinator.requestDownstreamAddress( in requestDownstreamAddress()
117 final LinkAddress address = requestDownstreamAddress(mHotspotIpServer, in testRequestDownstreamAddressWithoutUsingLastAddress()
122 final LinkAddress newAddress = requestDownstreamAddress(mHotspotIpServer, in testRequestDownstreamAddressWithoutUsingLastAddress()
129 final LinkAddress usbAddress = requestDownstreamAddress(mUsbIpServer, in testRequestDownstreamAddressWithoutUsingLastAddress()
141 LinkAddress actualAddress = requestDownstreamAddress(mHotspotIpServer, in testSanitizedAddress()
143 assertEquals(new LinkAddress("192.168.43.2/24"), actualAddress); in testSanitizedAddress()
[all …]
DIPv6TetheringCoordinatorTest.java38 import android.net.LinkAddress;
88 linkProp.addLinkAddress(new LinkAddress(TEST_IPV6_ADDRESS)); in createDualStackUpstream()
89 linkProp.addLinkAddress(new LinkAddress(TEST_IPV4_ADDRESS)); in createDualStackUpstream()
100 final List<LinkAddress> addresses = lp.getLinkAddresses(); in assertOnlyOneV6AddressAndNoV4()
102 final LinkAddress v6Address = addresses.get(0); in assertOnlyOneV6AddressAndNoV4()
103 assertEquals(v6Address, new LinkAddress(TEST_IPV6_ADDRESS)); in assertOnlyOneV6AddressAndNoV4()
/packages/modules/Connectivity/framework/src/android/net/
DLinkAddress.java62 public class LinkAddress implements Parcelable { class
243 public LinkAddress(@NonNull InetAddress address, @IntRange(from = 0, to = 128) int prefixLength, in LinkAddress() method in LinkAddress
274 public LinkAddress(@NonNull InetAddress address, @IntRange(from = 0, to = 128) int prefixLength, in LinkAddress() method in LinkAddress
287 public LinkAddress(@NonNull InetAddress address, in LinkAddress() method in LinkAddress
299 public LinkAddress(@NonNull InterfaceAddress interfaceAddress) { in LinkAddress() method in LinkAddress
311 public LinkAddress(@NonNull String address) { in LinkAddress() method in LinkAddress
325 public LinkAddress(@NonNull String address, int flags, int scope) { in LinkAddress() method in LinkAddress
353 if (!(obj instanceof LinkAddress)) { in equals()
356 LinkAddress linkAddress = (LinkAddress) obj; in equals()
385 public boolean isSameAddressAs(@Nullable LinkAddress other) { in isSameAddressAs()
[all …]
DLinkProperties.java58 private final ArrayList<LinkAddress> mLinkAddresses = new ArrayList<>();
255 for (LinkAddress linkAddress : mLinkAddresses) { in getAddresses()
268 for (LinkAddress linkAddress : mLinkAddresses) { in getAllAddresses()
277 private int findLinkAddressIndex(LinkAddress address) { in findLinkAddressIndex()
294 public boolean addLinkAddress(@NonNull LinkAddress address) { in addLinkAddress()
322 public boolean removeLinkAddress(@NonNull LinkAddress toRemove) { in removeLinkAddress()
337 public @NonNull List<LinkAddress> getLinkAddresses() { in getLinkAddresses()
346 public @NonNull List<LinkAddress> getAllLinkAddresses() { in getAllLinkAddresses()
347 List<LinkAddress> addresses = new ArrayList<>(mLinkAddresses); in getAllLinkAddresses()
361 public void setLinkAddresses(@NonNull Collection<LinkAddress> addresses) { in setLinkAddresses()
[all …]
DTestNetworkManager.java140 public TestNetworkInterface createTunInterface(@NonNull LinkAddress[] linkAddrs) { in createTunInterface()
155 public TestNetworkInterface createTunInterface(@NonNull Collection<LinkAddress> linkAddrs) { in createTunInterface()
157 final LinkAddress[] arr = new LinkAddress[linkAddrs.size()]; in createTunInterface()
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DPrivateAddressCoordinator.java32 import android.net.LinkAddress;
80 private final SparseArray<LinkAddress> mCachedAddresses;
90 mCachedAddresses.put(TETHERING_BLUETOOTH, new LinkAddress(LEGACY_BLUETOOTH_IFACE_ADDRESS)); in PrivateAddressCoordinator()
91 mCachedAddresses.put(TETHERING_WIFI_P2P, new LinkAddress(LEGACY_WIFI_P2P_IFACE_ADDRESS)); in PrivateAddressCoordinator()
124 private ArrayList<IpPrefix> getIpv4Prefixes(final List<LinkAddress> linkAddresses) { in getIpv4Prefixes()
126 for (LinkAddress address : linkAddresses) { in getIpv4Prefixes()
172 public LinkAddress requestDownstreamAddress(final IpServer ipServer, boolean useLastAddress) { in requestDownstreamAddress()
175 return new LinkAddress(LEGACY_WIFI_P2P_IFACE_ADDRESS); in requestDownstreamAddress()
178 final LinkAddress cachedAddress = mCachedAddresses.get(ipServer.interfaceType()); in requestDownstreamAddress()
186 final LinkAddress newAddress = chooseDownstreamAddress(prefixRange); in requestDownstreamAddress()
[all …]
/packages/modules/Connectivity/Tethering/tests/mts/src/android/tethering/mts/
DTetheringModuleTest.java37 import android.net.LinkAddress;
115 final LinkAddress hotspotAddr = getFirstIpv4Address(nif); in addressConflictTest()
122 new LinkAddress(testPrefix.getAddress(), testPrefix.getPrefixLength())); in addressConflictTest()
130 final LinkAddress newHotspotAddr = getFirstIpv4Address(nif); in addressConflictTest()
146 private LinkAddress getFirstIpv4Address(final NetworkInterface nif) { in getFirstIpv4Address()
148 final LinkAddress addr = new LinkAddress(ia.getAddress(), ia.getNetworkPrefixLength()); in getFirstIpv4Address()
155 private IpPrefix getConflictingPrefix(final LinkAddress address, in getConflictingPrefix()
176 private TestNetworkTracker setUpTestNetwork(final LinkAddress address) throws Exception { in setUpTestNetwork()
/packages/modules/NetworkStack/common/networkstackclient/src/android/net/shared/
DInitialConfiguration.java26 import android.net.LinkAddress;
39 public final Set<LinkAddress> ipAddresses = new HashSet<>();
79 for (LinkAddress addr : ipAddresses) { in isValid()
123 public boolean isProvisionedBy(List<LinkAddress> addresses, List<RouteInfo> routes) { in isProvisionedBy()
128 for (LinkAddress addr : ipAddresses) { in isProvisionedBy()
150 p.ipAddresses = ipAddresses.toArray(new LinkAddress[0]); in toStableParcelable()
184 private static boolean isPrefixLengthCompliant(LinkAddress addr) { in isPrefixLengthCompliant()
201 private static boolean isIPv4(LinkAddress addr) { in isIPv4()
209 private static boolean isIPv6GUA(LinkAddress addr) { in isIPv6GUA()
/packages/modules/IPsec/tests/iketests/src/java/android/net/ipsec/ike/
DChildSessionConfigurationTest.java25 import android.net.LinkAddress;
54 private static final LinkAddress IPV4_LINK_ADDRESS =
55 new LinkAddress(IPV4_ADDRESS, IP4_PREFIX_LEN);
63 private static final LinkAddress IPV6_LINK_ADDRESS =
64 new LinkAddress(IPV6_ADDRESS, IP6_PREFIX_LEN);
96 new LinkAddress(IPV4_SUBNET_IP_PREFIX_ADDRESS.toString())); in setUp()
99 new LinkAddress(IPV6_SUBNET_IP_PREFIX_ADDRESS.toString())); in setUp()
141 List<LinkAddress> expectedInternalAddrList = new ArrayList<>(); in validateInternalAddrList()
165 List<LinkAddress> expectedInternalAddrList = new ArrayList<>(); in testBuildWithoutNetmaskAttr()
166 expectedInternalAddrList.add(new LinkAddress(IPV4_ADDRESS, 32)); in testBuildWithoutNetmaskAttr()
/packages/modules/NetworkStack/src/android/net/dhcp/
DDhcpServingParams.java28 import android.net.LinkAddress;
55 public final LinkAddress serverAddr;
110 private DhcpServingParams(@NonNull LinkAddress serverAddr, in DhcpServingParams()
135 final LinkAddress serverAddr = new LinkAddress( in fromParcelableObject()
200 private LinkAddress mServerAddr;
215 public Builder setServerAddr(@NonNull LinkAddress serverAddr) { in setServerAddr()
415 static IpPrefix makeIpPrefix(@NonNull LinkAddress addr) { in makeIpPrefix()
/packages/modules/IPsec/tests/cts/src/android/ipsec/ike/cts/
DIkeTestNetworkBase.java22 import android.net.LinkAddress;
78 final LinkAddress[] linkAddresses = new LinkAddress[addresses.length]; in TunNetworkContext()
82 linkAddresses[i] = new LinkAddress(addr, IP4_PREFIX_LEN); in TunNetworkContext()
84 linkAddresses[i] = new LinkAddress(addr, IP6_PREFIX_LEN); in TunNetworkContext()
98 "createTunInterface", LinkAddress[].class) in TunNetworkContext()
DChildSessionParamsTest.java25 import android.net.LinkAddress;
212 Set<LinkAddress> expectedV6Addresses = new HashSet<>(); in testBuildChildSessionParamsWithConfigReq()
213 expectedV6Addresses.add(new LinkAddress(IPV6_ADDRESS_REMOTE, IP6_PREFIX_LEN)); in testBuildChildSessionParamsWithConfigReq()
234 Set<LinkAddress> expectedAddresses, TunnelModeChildSessionParams childParams) { in verifySpecificV6AddrConfigReq()
241 LinkAddress address = in verifySpecificV6AddrConfigReq()
242 new LinkAddress(ipv6AddrReq.getAddress(), ipv6AddrReq.getPrefixLength()); in verifySpecificV6AddrConfigReq()
/packages/modules/NetworkStack/tests/unit/src/android/net/ip/
DIpClientTest.java48 import android.net.LinkAddress;
247 final Set<LinkAddress> addresses = links(TEST_LOCAL_ADDRESSES); in makeIPv6ProvisionedLinkProperties()
248 addresses.add(new LinkAddress(TEST_GLOBAL_ADDRESS, 0, RT_SCOPE_UNIVERSE)); in makeIPv6ProvisionedLinkProperties()
287 final LinkAddress la = new LinkAddress(TEST_IPV4_LINKADDRESS); in addIPv4Provisioning()
398 mObserver.onInterfaceAddressUpdated(new LinkAddress(TEST_LOCAL_ADDRESSES[i]), iface); in testProvisioningWithInitialConfiguration()
404 mObserver.onInterfaceAddressUpdated(new LinkAddress(TEST_LOCAL_ADDRESSES[lastAddr]), iface); in testProvisioningWithInitialConfiguration()
477 static IsProvisionedTestCase provisionedCase(Set<LinkAddress> lpAddrs, Set<RouteInfo> lpRoutes, in provisionedCase()
482 static IsProvisionedTestCase notProvisionedCase(Set<LinkAddress> lpAddrs, in notProvisionedCase()
487 static IsProvisionedTestCase provisioningTest(boolean isProvisioned, Set<LinkAddress> lpAddrs, in provisioningTest()
568 static InitialConfigurationTestCase validConf(String descr, Set<LinkAddress> links, in validConf()
[all …]
/packages/modules/IPsec/src/java/android/net/ipsec/ike/
DChildSessionConfiguration.java31 import android.net.LinkAddress;
60 private final List<LinkAddress> mInternalAddressList = new ArrayList<>();
102 new LinkAddress(addressAttr.address, netmaskAttr.getPrefixLen())); in ChildSessionConfiguration()
105 new LinkAddress(addressAttr.address, IPv4_DEFAULT_PREFIX_LEN)); in ChildSessionConfiguration()
162 List<LinkAddress> internalAddresses, in ChildSessionConfiguration()
213 public List<LinkAddress> getInternalAddresses() { in getInternalAddresses()
266 private final List<LinkAddress> mInternalAddressList = new ArrayList<>();
297 public Builder addInternalAddress(@NonNull LinkAddress address) { in addInternalAddress()
/packages/modules/Connectivity/Tethering/src/android/net/ip/
DIpServer.java34 import android.net.LinkAddress;
266 private LinkAddress mStaticIpv4ServerAddr;
267 private LinkAddress mStaticIpv4ClientAddr;
282 private LinkAddress mIpv4Address;
361 public LinkAddress getAddress() { in getAddress()
475 final LinkAddress address = new LinkAddress( in onLeasesChanged()
520 private RouteInfo getDirectConnectedRoute(@NonNull final LinkAddress ipv4Address) { in getDirectConnectedRoute()
526 @NonNull final Inet4Address dnsServer, @NonNull LinkAddress serverAddr, in makeServingParams()
541 private boolean startDhcp(final LinkAddress serverLinkAddr, final LinkAddress clientLinkAddr) { in startDhcp()
584 private boolean configureDhcp(boolean enable, final LinkAddress serverAddr, in configureDhcp()
[all …]
/packages/modules/Connectivity/Tethering/tests/integration/src/android/net/
DEthernetTetheringTest.java237 assertEquals(new LinkAddress(clientAddr), dhcpResults.ipAddress); in testStaticIpv4()
284 final LinkAddress la = new LinkAddress(addr, prefixlen); in expectLocalOnlyAddresses()
655 public void assertLinkAddressMatches(LinkAddress l1, LinkAddress l2) { in assertLinkAddressMatches()
664 LinkAddress localAddr = local == null ? null : new LinkAddress(local); in requestWithStaticIpv4()
665 LinkAddress clientAddr = client == null ? null : new LinkAddress(client); in requestWithStaticIpv4()
680 LinkAddress expectedAddr = new LinkAddress(expected); in assertInterfaceHasIpAddress()
683 final LinkAddress addr = new LinkAddress(ia.getAddress(), ia.getNetworkPrefixLength()); in assertInterfaceHasIpAddress()
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DNat464XlatTest.java38 import android.net.LinkAddress;
68 static final LinkAddress V6ADDR = new LinkAddress("2001:db8:1::f00/64");
69 static final LinkAddress ADDR = new LinkAddress("192.0.2.5/29");
170 mNai.linkProperties.addLinkAddress(new LinkAddress("fc00::1/64"));
174 mNai.linkProperties.addLinkAddress(new LinkAddress("2001:db8::1/64"));
186 mNai.linkProperties.addLinkAddress(new LinkAddress("192.0.2.2/24"));
190 mNai.linkProperties.removeLinkAddress(new LinkAddress("192.0.2.2/24"));
392 mNai.linkProperties.addLinkAddress(new LinkAddress("2001:db8::1/64"));
434 mNai.linkProperties.addLinkAddress(new LinkAddress("2001:db8::1/64"));
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DTestNetworkRunnable.java26 import android.net.LinkAddress;
69 final LinkAddress[] linkAddresses = new LinkAddress[addresses.length]; in runTest()
73 linkAddresses[i] = new LinkAddress(address, IP4_PREFIX_LEN); in runTest()
75 linkAddresses[i] = new LinkAddress(address, IP6_PREFIX_LEN); in runTest()
/packages/modules/NetworkStack/common/moduleutils/src/android/net/ip/
DInterfaceController.java24 import android.net.LinkAddress;
57 public boolean setInterfaceConfiguration(final LinkAddress ipv4Addr, in setInterfaceConfiguration()
92 public boolean setIPv4Address(final LinkAddress address) { in setIPv4Address()
100 return setIPv4Address(new LinkAddress("0.0.0.0/0")); in clearIPv4Address()
165 public boolean addAddress(LinkAddress addr) { in addAddress()
/packages/modules/NetworkStack/src/com/android/server/
DNetworkObserverRegistry.java24 import android.net.LinkAddress;
134 final LinkAddress address = new LinkAddress(addr, flags, scope); in onInterfaceAddressUpdated()
141 final LinkAddress address = new LinkAddress(addr, flags, scope); in onInterfaceAddressRemoved()
/packages/modules/NetworkStack/tests/unit/src/android/net/shared/
DInitialConfigurationTest.java27 import android.net.LinkAddress;
51 new LinkAddress(parseNumericAddress("192.168.45.45"), 16), in setUp()
52 new LinkAddress(parseNumericAddress("2001:db8::45"), 33))); in setUp()
75 new LinkAddress(parseNumericAddress("192.168.47.47"), 24))); in testEquals()
/packages/modules/NetworkStack/tests/unit/src/android/net/dhcp/
DDhcpServingParamsTest.java30 import android.net.LinkAddress;
62 private static final LinkAddress TEST_LINKADDR = new LinkAddress(TEST_SERVER_ADDR, 20);
156 mBuilder.setServerAddr(new LinkAddress(parseNumericAddress("fe80::1111"), 120)).build(); in testBuild_IPv6Addr()
161 mBuilder.setServerAddr(new LinkAddress(TEST_SERVER_ADDR, 15)).build(); in testBuild_PrefixTooLarge()
167 .setServerAddr(new LinkAddress(TEST_SERVER_ADDR, 31)) in testBuild_PrefixTooSmall()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/message/
DIkeConfigPayload.java20 import android.net.LinkAddress;
690 public final LinkAddress linkAddress;
693 public ConfigAttributeIpv4Subnet(LinkAddress ipv4LinkAddress) { in ConfigAttributeIpv4Subnet()
735 linkAddress = new LinkAddress(address, netmaskToPrefixLen((Inet4Address) netmask)); in ConfigAttributeIpv4Subnet()
971 public final LinkAddress linkAddress;
974 int attributeType, LinkAddress ipv6LinkAddress) { in TunnelModeChildConfigAttrIpv6AddrRangeBase()
1003 linkAddress = new LinkAddress(address, prefixLen); in TunnelModeChildConfigAttrIpv6AddrRangeBase()
1010 private void validateIpv6LinkAddressTypeOrThrow(LinkAddress address) { in validateIpv6LinkAddressTypeOrThrow()
1059 public ConfigAttributeIpv6Address(LinkAddress ipv6LinkAddress) { in ConfigAttributeIpv6Address()
1098 public ConfigAttributeIpv6Subnet(LinkAddress ipv6LinkAddress) { in ConfigAttributeIpv6Subnet()

123456