Home
last modified time | relevance | path

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

12

/frameworks/base/core/tests/coretests/src/android/net/
DNetworkUtilsTest.java19 import android.net.NetworkUtils;
39 assertEquals(8, NetworkUtils.getImplicitNetmask(IPv4Address("4.2.2.2"))); in testGetImplicitNetmask()
40 assertEquals(8, NetworkUtils.getImplicitNetmask(IPv4Address("10.5.6.7"))); in testGetImplicitNetmask()
41 assertEquals(16, NetworkUtils.getImplicitNetmask(IPv4Address("173.194.72.105"))); in testGetImplicitNetmask()
42 assertEquals(16, NetworkUtils.getImplicitNetmask(IPv4Address("172.23.68.145"))); in testGetImplicitNetmask()
43 assertEquals(24, NetworkUtils.getImplicitNetmask(IPv4Address("192.0.2.1"))); in testGetImplicitNetmask()
44 assertEquals(24, NetworkUtils.getImplicitNetmask(IPv4Address("192.168.5.1"))); in testGetImplicitNetmask()
45 assertEquals(32, NetworkUtils.getImplicitNetmask(IPv4Address("224.0.0.1"))); in testGetImplicitNetmask()
46 assertEquals(32, NetworkUtils.getImplicitNetmask(IPv4Address("255.6.7.8"))); in testGetImplicitNetmask()
51 NetworkUtils.netmaskToPrefixLength(addr); in assertInvalidNetworkMask()
[all …]
DLinkPropertiesTest.java34 private static InetAddress ADDRV4 = NetworkUtils.numericToInetAddress("75.208.6.1");
35 private static InetAddress ADDRV6 = NetworkUtils.numericToInetAddress(
37 private static InetAddress DNS1 = NetworkUtils.numericToInetAddress("75.208.7.1");
38 private static InetAddress DNS2 = NetworkUtils.numericToInetAddress("69.78.7.1");
39 private static InetAddress DNS6 = NetworkUtils.numericToInetAddress("2001:4860:4860::8888");
40 private static InetAddress GATEWAY1 = NetworkUtils.numericToInetAddress("75.208.8.1");
41 private static InetAddress GATEWAY2 = NetworkUtils.numericToInetAddress("69.78.8.1");
42 private static InetAddress GATEWAY61 = NetworkUtils.numericToInetAddress("fe80::6:0000:613");
43 private static InetAddress GATEWAY62 = NetworkUtils.numericToInetAddress("fe80::6:2222");
53 return NetworkUtils.numericToInetAddress(addrString); in Address()
[all …]
DLinkAddressTest.java54 private static final InetAddress V4_ADDRESS = NetworkUtils.numericToInetAddress(V4);
55 private static final InetAddress V6_ADDRESS = NetworkUtils.numericToInetAddress(V6);
111 assertEquals(NetworkUtils.numericToInetAddress("127.0.0.1"), ipv4Loopback.getAddress()); in testConstructors()
114 assertEquals(NetworkUtils.numericToInetAddress("::1"), ipv6Loopback.getAddress()); in testConstructors()
/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.java55 NetworkUtils.maskRawAddress(address, prefixLength); in checkAndMaskAddressAndPrefixLength()
105 Pair<InetAddress, Integer> ipAndMask = NetworkUtils.parseIpAndMask(prefix); in IpPrefix()
183 NetworkUtils.maskRawAddress(addrBytes, prefixLength); in contains()
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()
DVpnService.java31 import android.net.NetworkUtils;
210 return NetworkUtils.protectFromVpn(socket); in protect()
DDhcpInfo.java67 buf.append(NetworkUtils.intToInetAddress(addr).getHostAddress()); in putAddress()
DLinkAddress.java187 Pair<InetAddress, Integer> ipAndMask = NetworkUtils.parseIpAndMask(address); in LinkAddress()
DConnectivityManager.java1563 return requestRouteToHostAddress(networkType, NetworkUtils.intToInetAddress(hostAddress)); in requestRouteToHost()
3213 if (netId == NetworkUtils.getBoundNetworkForProcess()) { in setProcessDefaultNetwork()
3216 if (NetworkUtils.bindProcessToNetwork(netId)) { in setProcessDefaultNetwork()
3258 int netId = NetworkUtils.getBoundNetworkForProcess(); in getProcessDefaultNetwork()
3302 return NetworkUtils.bindProcessToNetworkForHostResolution( in setProcessDefaultNetworkForHostResolution()
DProxy.java200 if (NetworkUtils.numericToInetAddress(host).isLoopbackAddress()) { in isLocalHost()
DNetworkUtils.java38 public class NetworkUtils { class
/frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/
DDataCallResponse.java22 import android.net.NetworkUtils;
152 ia = NetworkUtils.numericToInetAddress(addr); in setLinkProperties()
183 ia = NetworkUtils.numericToInetAddress(addr); in setLinkProperties()
200 ia = NetworkUtils.numericToInetAddress(dnsAddr); in setLinkProperties()
226 ia = NetworkUtils.numericToInetAddress(addr); in setLinkProperties()
DDcController.java21 import android.net.NetworkUtils;
309 if (NetworkUtils.addressTypeMatches( in onDataStateChanged()
/frameworks/base/services/core/java/com/android/server/net/
DIpConfigStore.java23 import android.net.NetworkUtils;
208 NetworkUtils.numericToInetAddress(in.readUTF()), in.readInt()); in readIpAndProxyConfigurations()
220 gateway = NetworkUtils.numericToInetAddress(in.readUTF()); in readIpAndProxyConfigurations()
229 NetworkUtils.numericToInetAddress(in.readUTF()), in readIpAndProxyConfigurations()
233 gateway = NetworkUtils.numericToInetAddress(in.readUTF()); in readIpAndProxyConfigurations()
245 NetworkUtils.numericToInetAddress(in.readUTF())); in readIpAndProxyConfigurations()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DSoftApManager.java30 import android.net.NetworkUtils;
223 NetworkUtils.numericToInetAddress("192.168.43.1"), 24)); in startTethering()
255 NetworkUtils.numericToInetAddress("0.0.0.0"), 0)); in stopTethering()
DWifiServiceImpl.java47 import android.net.NetworkUtils;
1190 … info.ipAddress = NetworkUtils.inetAddressToInt((Inet4Address) dhcpResults.ipAddress.getAddress()); in getDhcpInfo()
1194 info.gateway = NetworkUtils.inetAddressToInt((Inet4Address) dhcpResults.gateway); in getDhcpInfo()
1201 info.dns1 = NetworkUtils.inetAddressToInt((Inet4Address)dns); in getDhcpInfo()
1203 info.dns2 = NetworkUtils.inetAddressToInt((Inet4Address)dns); in getDhcpInfo()
1210 info.serverAddress = NetworkUtils.inetAddressToInt(serverAddress); in getDhcpInfo()
/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()
DNetworkDiagnostics.java24 import android.net.NetworkUtils;
87 private static final InetAddress TEST_DNS4 = NetworkUtils.numericToInetAddress("8.8.8.8");
88 private static final InetAddress TEST_DNS6 = NetworkUtils.numericToInetAddress(
DKeepalivePacketData.java21 import android.net.NetworkUtils;
/frameworks/base/core/java/android/text/format/
DFormatter.java26 import android.net.NetworkUtils;
185 return NetworkUtils.intToInetAddress(ipv4Address).getHostAddress(); in formatIpAddress()
/frameworks/base/media/java/android/media/
DMediaHTTPConnection.java19 import android.net.NetworkUtils;
162 if (NetworkUtils.numericToInetAddress(host).isLoopbackAddress()) { in isLocalHost()
/frameworks/base/services/core/java/com/android/server/
DNetworkManagementService.java61 import android.net.NetworkUtils;
1009 addr = NetworkUtils.numericToInetAddress(st.nextToken()); in getInterfaceConfig()
1326 cmd.appendArg(NetworkUtils.numericToInetAddress(s).getHostAddress()); in setDnsForwarders()
1392 InetAddress addr = NetworkUtils.getNetworkPart( in modifyNat()
1442 NetworkUtils.numericToInetAddress(localAddr).getHostAddress(), in attachPppd()
1443 NetworkUtils.numericToInetAddress(remoteAddr).getHostAddress(), in attachPppd()
1444 NetworkUtils.numericToInetAddress(dns1Addr).getHostAddress(), in attachPppd()
1445 NetworkUtils.numericToInetAddress(dns2Addr).getHostAddress()); in attachPppd()
2020 InetAddress a = NetworkUtils.numericToInetAddress(s); in setDnsServersForNetwork()
/frameworks/base/wifi/java/android/net/wifi/
DWifiInfo.java22 import android.net.NetworkUtils;
494 result = NetworkUtils.inetAddressToInt((Inet4Address)mIpAddress); in getIpAddress()
/frameworks/base/services/net/java/android/net/dhcp/
DDhcpClient.java32 import android.net.NetworkUtils;
290 NetworkUtils.attachDhcpFilter(mPacketSock); in initPacketSocket()
306 NetworkUtils.protectFromVpn(mUdpSock); in initUdpSocket()

12