Home
last modified time | relevance | path

Searched refs:NetworkUtils (Results 1 – 25 of 59) sorted by relevance

123

/frameworks/base/tests/net/java/android/net/
DNetworkUtilsTest.java19 import android.net.NetworkUtils;
41 assertEquals(8, NetworkUtils.getImplicitNetmask(IPv4Address("4.2.2.2"))); in testGetImplicitNetmask()
42 assertEquals(8, NetworkUtils.getImplicitNetmask(IPv4Address("10.5.6.7"))); in testGetImplicitNetmask()
43 assertEquals(16, NetworkUtils.getImplicitNetmask(IPv4Address("173.194.72.105"))); in testGetImplicitNetmask()
44 assertEquals(16, NetworkUtils.getImplicitNetmask(IPv4Address("172.23.68.145"))); in testGetImplicitNetmask()
45 assertEquals(24, NetworkUtils.getImplicitNetmask(IPv4Address("192.0.2.1"))); in testGetImplicitNetmask()
46 assertEquals(24, NetworkUtils.getImplicitNetmask(IPv4Address("192.168.5.1"))); in testGetImplicitNetmask()
47 assertEquals(32, NetworkUtils.getImplicitNetmask(IPv4Address("224.0.0.1"))); in testGetImplicitNetmask()
48 assertEquals(32, NetworkUtils.getImplicitNetmask(IPv4Address("255.6.7.8"))); in testGetImplicitNetmask()
53 NetworkUtils.netmaskToPrefixLength(addr); in assertInvalidNetworkMask()
[all …]
DLinkPropertiesTest.java50 private static InetAddress ADDRV4 = NetworkUtils.numericToInetAddress("75.208.6.1");
51 private static InetAddress ADDRV6 = NetworkUtils.numericToInetAddress(
53 private static InetAddress DNS1 = NetworkUtils.numericToInetAddress("75.208.7.1");
54 private static InetAddress DNS2 = NetworkUtils.numericToInetAddress("69.78.7.1");
55 private static InetAddress DNS6 = NetworkUtils.numericToInetAddress("2001:4860:4860::8888");
56 private static InetAddress GATEWAY1 = NetworkUtils.numericToInetAddress("75.208.8.1");
57 private static InetAddress GATEWAY2 = NetworkUtils.numericToInetAddress("69.78.8.1");
58 private static InetAddress GATEWAY61 = NetworkUtils.numericToInetAddress("fe80::6:0000:613");
59 private static InetAddress GATEWAY62 = NetworkUtils.numericToInetAddress("fe80::6:2222");
69 return NetworkUtils.numericToInetAddress(addrString); in Address()
[all …]
DLinkAddressTest.java60 private static final InetAddress V4_ADDRESS = NetworkUtils.numericToInetAddress(V4);
61 private static final InetAddress V6_ADDRESS = NetworkUtils.numericToInetAddress(V6);
123 assertEquals(NetworkUtils.numericToInetAddress("127.0.0.1"), ipv4Loopback.getAddress()); in testConstructors()
126 assertEquals(NetworkUtils.numericToInetAddress("::1"), ipv6Loopback.getAddress()); in testConstructors()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/dataconnection/
DDataCallResponseTest.java26 import android.net.NetworkUtils;
39 Arrays.asList(new LinkAddress(NetworkUtils.numericToInetAddress(FAKE_ADDRESS), 0)), in testParcel()
40 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_DNS)), in testParcel()
41 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_GATEWAY)), in testParcel()
56 Arrays.asList(new LinkAddress(NetworkUtils.numericToInetAddress(FAKE_ADDRESS), 0)), in testEquals()
57 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_DNS)), in testEquals()
58 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_GATEWAY)), in testEquals()
63 Arrays.asList(new LinkAddress(NetworkUtils.numericToInetAddress(FAKE_ADDRESS), 0)), in testEquals()
64 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_DNS)), in testEquals()
65 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_GATEWAY)), in testEquals()
[all …]
DCellularDataServiceTest.java24 import android.net.NetworkUtils;
68 Arrays.asList(new LinkAddress(NetworkUtils.numericToInetAddress("10.0.2.15"), 32)), in testConvertDataCallResult()
69 Arrays.asList(NetworkUtils.numericToInetAddress("10.0.2.3")), in testConvertDataCallResult()
70 Arrays.asList(NetworkUtils.numericToInetAddress("10.0.2.15"), in testConvertDataCallResult()
71 NetworkUtils.numericToInetAddress("fe80::2")), in testConvertDataCallResult()
92 Arrays.asList(NetworkUtils.numericToInetAddress("fd00:976a::9"), in testConvertDataCallResult()
93 NetworkUtils.numericToInetAddress("fd00:976a::10")), in testConvertDataCallResult()
94 Arrays.asList(NetworkUtils.numericToInetAddress("fe80::4c61:1832:7b28:d36c"), in testConvertDataCallResult()
95 NetworkUtils.numericToInetAddress("1.2.3.4")), in testConvertDataCallResult()
DDataConnectionTest.java49 import android.net.NetworkUtils;
327 Arrays.asList(new LinkAddress(NetworkUtils.numericToInetAddress(FAKE_ADDRESS), 0)), in testModemSuggestRetry()
328 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_DNS)), in testModemSuggestRetry()
329 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_GATEWAY)), in testModemSuggestRetry()
336 Arrays.asList(new LinkAddress(NetworkUtils.numericToInetAddress(FAKE_ADDRESS), 0)), in testModemSuggestRetry()
337 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_DNS)), in testModemSuggestRetry()
338 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_GATEWAY)), in testModemSuggestRetry()
344 Arrays.asList(new LinkAddress(NetworkUtils.numericToInetAddress(FAKE_ADDRESS), 0)), in testModemSuggestRetry()
345 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_DNS)), in testModemSuggestRetry()
346 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_GATEWAY)), in testModemSuggestRetry()
[all …]
DDcControllerTest.java36 import android.net.NetworkUtils;
135 Arrays.asList(new LinkAddress(NetworkUtils.numericToInetAddress(FAKE_ADDRESS), 0)), in testDataDormant()
136 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_DNS)), in testDataDormant()
137 Arrays.asList(NetworkUtils.numericToInetAddress(FAKE_GATEWAY)), in testDataDormant()
/frameworks/base/core/java/android/net/
DDhcpResults.java19 import android.net.NetworkUtils;
132 NetworkUtils.parcelInetAddress(dest, serverAddress, flags); in writeToParcel()
140 dhcpResults.serverAddress = (Inet4Address) NetworkUtils.unparcelInetAddress(in); in readFromParcel()
148 Inet4Address addr = (Inet4Address) NetworkUtils.numericToInetAddress(addrString); in setIpAddress()
159 gateway = NetworkUtils.numericToInetAddress(addrString); in setGateway()
170 dnsServers.add(NetworkUtils.numericToInetAddress(addrString)); in addDns()
181 serverAddress = (Inet4Address) NetworkUtils.numericToInetAddress(addrString); in setServerAddress()
DIpPrefix.java58 NetworkUtils.maskRawAddress(address, prefixLength); in checkAndMaskAddressAndPrefixLength()
108 Pair<InetAddress, Integer> ipAndMask = NetworkUtils.parseIpAndMask(prefix); in IpPrefix()
186 NetworkUtils.maskRawAddress(addrBytes, prefixLength); in contains()
200 NetworkUtils.maskRawAddress(otherAddress, prefixLength); in containsPrefix()
DStaticIpConfiguration.java185 NetworkUtils.parcelInetAddress(dest, gateway, flags); in writeToParcel()
188 NetworkUtils.parcelInetAddress(dest, dnsServer, flags); in writeToParcel()
195 s.gateway = NetworkUtils.unparcelInetAddress(in); in readFromParcel()
199 s.dnsServers.add(NetworkUtils.unparcelInetAddress(in)); in readFromParcel()
DKeepalivePacketData.java145 srcAddress = NetworkUtils.numericToInetAddress(in.readString()); in KeepalivePacketData()
146 dstAddress = NetworkUtils.numericToInetAddress(in.readString()); in KeepalivePacketData()
DDhcpInfo.java67 buf.append(NetworkUtils.intToInetAddress(addr).getHostAddress()); in putAddress()
/frameworks/base/services/core/java/com/android/server/net/
DIpConfigStore.java23 import android.net.NetworkUtils;
287 NetworkUtils.numericToInetAddress(in.readUTF()), in.readInt()); in readIpConfigurations()
299 gateway = NetworkUtils.numericToInetAddress(in.readUTF()); in readIpConfigurations()
308 NetworkUtils.numericToInetAddress(in.readUTF()), in readIpConfigurations()
312 gateway = NetworkUtils.numericToInetAddress(in.readUTF()); in readIpConfigurations()
324 NetworkUtils.numericToInetAddress(in.readUTF())); in readIpConfigurations()
/frameworks/base/services/tests/servicestests/src/com/android/server/net/
DIpConfigStoreTest.java27 import android.net.NetworkUtils;
81 staticIpConfiguration.dnsServers.add(NetworkUtils.numericToInetAddress(DNS_IP_ADDR_1)); in staticIpMultiNetworks()
82 staticIpConfiguration.dnsServers.add(NetworkUtils.numericToInetAddress(DNS_IP_ADDR_2)); in staticIpMultiNetworks()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DOsuNetworkConnectionTest.java37 import android.net.NetworkUtils;
100 InetAddress addrV4 = NetworkUtils.numericToInetAddress("75.208.6.1"); in createProvisionedLinkProperties()
101 InetAddress dns1 = NetworkUtils.numericToInetAddress("75.208.7.1"); in createProvisionedLinkProperties()
103 InetAddress gateway1 = NetworkUtils.numericToInetAddress("75.208.8.1"); in createProvisionedLinkProperties()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/
DCellularDataService.java22 import android.net.NetworkUtils;
262 InetAddress ia = NetworkUtils.numericToInetAddress(address); in convertDataCallResult()
285 ia = NetworkUtils.numericToInetAddress(dns); in convertDataCallResult()
305 ia = NetworkUtils.numericToInetAddress(gateway); in convertDataCallResult()
/frameworks/base/services/net/java/android/net/ip/
DConnectivityPacketTracker.java21 import android.net.NetworkUtils;
105 NetworkUtils.attachControlPacketFilter(s, ARPHRD_ETHER); in createFd()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiBackupDataV1Parser.java23 import android.net.NetworkUtils;
491 NetworkUtils.numericToInetAddress(linkAddressString), linkPrefixLength); in parseIpConfigurationFromXml()
500 InetAddress gateway = NetworkUtils.numericToInetAddress(gatewayAddressString); in parseIpConfigurationFromXml()
511 NetworkUtils.numericToInetAddress(dnsServerAddressString); in parseIpConfigurationFromXml()
/frameworks/base/services/core/java/com/android/server/connectivity/
DKeepaliveTracker.java27 import android.net.NetworkUtils;
341 srcAddress = NetworkUtils.numericToInetAddress(srcAddrString); in startNattKeepalive()
342 dstAddress = NetworkUtils.numericToInetAddress(dstAddrString); in startNattKeepalive()
DDnsManager.java36 import android.net.NetworkUtils;
358 final String[] assignedServers = NetworkUtils.makeStrings(lp.getDnsServers()); in setDnsConfigurationForNetwork()
378 strictMode ? NetworkUtils.makeStrings( in setDnsConfigurationForNetwork()
/frameworks/base/services/net/java/android/net/dns/
DResolvUtil.java22 import android.net.NetworkUtils;
/frameworks/base/core/java/android/text/format/
DFormatter.java26 import android.net.NetworkUtils;
203 return NetworkUtils.intToInetAddress(ipv4Address).getHostAddress(); in formatIpAddress()
/frameworks/base/media/java/android/media/
DMedia2HTTPConnection.java19 import android.net.NetworkUtils;
164 if (NetworkUtils.numericToInetAddress(host).isLoopbackAddress()) { in isLocalHost()
DMediaHTTPConnection.java19 import android.net.NetworkUtils;
169 if (NetworkUtils.numericToInetAddress(host).isLoopbackAddress()) { in isLocalHost()
/frameworks/base/tests/net/java/com/android/server/connectivity/
DTetheringTest.java75 import android.net.NetworkUtils;
252 NetworkUtils.numericToInetAddress("10.0.0.1"), TEST_MOBILE_IFNAME)); in buildMobileUpstreamState()
256 prop.addDnsServer(NetworkUtils.numericToInetAddress("2001:db8::2")); in buildMobileUpstreamState()
258 new LinkAddress(NetworkUtils.numericToInetAddress("2001:db8::"), in buildMobileUpstreamState()
261 NetworkUtils.numericToInetAddress("2001:db8::1"), TEST_MOBILE_IFNAME)); in buildMobileUpstreamState()
268 NetworkUtils.numericToInetAddress("192.0.0.1"), TEST_XLAT_MOBILE_IFNAME)); in buildMobileUpstreamState()

123