/frameworks/base/core/java/android/net/ |
D | LinkAddress.java | 40 private final int prefixLength; field in LinkAddress 42 public LinkAddress(InetAddress address, int prefixLength) { in LinkAddress() argument 43 if (address == null || prefixLength < 0 || in LinkAddress() 44 ((address instanceof Inet4Address) && prefixLength > 32) || in LinkAddress() 45 (prefixLength > 128)) { in LinkAddress() 47 prefixLength); in LinkAddress() 50 this.prefixLength = prefixLength; in LinkAddress() 55 this.prefixLength = interfaceAddress.getNetworkPrefixLength(); in LinkAddress() 60 return (address == null ? "" : (address.getHostAddress() + "/" + prefixLength)); in toString() 78 this.prefixLength == linkAddress.prefixLength; in equals() [all …]
|
D | VpnService.java | 301 private void check(InetAddress address, int prefixLength) { in check() argument 306 if (prefixLength < 0 || prefixLength > 32) { in check() 310 if (prefixLength < 0 || prefixLength > 128) { in check() 325 public Builder addAddress(InetAddress address, int prefixLength) { in addAddress() argument 326 check(address, prefixLength); in addAddress() 332 mAddresses.append(String.format(" %s/%d", address.getHostAddress(), prefixLength)); in addAddress() 344 public Builder addAddress(String address, int prefixLength) { in addAddress() argument 345 return addAddress(InetAddress.parseNumericAddress(address), prefixLength); in addAddress() 354 public Builder addRoute(InetAddress address, int prefixLength) { in addRoute() argument 355 check(address, prefixLength); in addRoute() [all …]
|
D | NetworkUtils.java | 142 public static int prefixLengthToNetmaskInt(int prefixLength) in prefixLengthToNetmaskInt() argument 144 if (prefixLength < 0 || prefixLength > 32) { in prefixLengthToNetmaskInt() 147 int value = 0xffffffff << (32 - prefixLength); in prefixLengthToNetmaskInt() 178 public static InetAddress getNetworkPart(InetAddress address, int prefixLength) { in getNetworkPart() argument 185 if (prefixLength < 0 || prefixLength > array.length * 8) { in getNetworkPart() 189 int offset = prefixLength / 8; in getNetworkPart() 190 int reminder = prefixLength % 8; in getNetworkPart()
|
D | DhcpInfoInternal.java | 37 public int prefixLength; field in DhcpInfoInternal 82 info.netmask = NetworkUtils.prefixLengthToNetmaskInt(prefixLength); in makeDhcpInfo() 96 return new LinkAddress(NetworkUtils.numericToInetAddress(ipAddress), prefixLength); in makeLinkAddress() 144 return "addr: " + ipAddress + "/" + prefixLength + in toString()
|
/frameworks/base/core/jni/ |
D | android_net_NetUtils.cpp | 34 uint32_t *prefixLength, 43 uint32_t *prefixLength, 66 jfieldID prefixLength; member 113 uint32_t prefixLength; in android_net_utils_runDhcpCommon() local 124 result = ::dhcp_do_request_renew(nameStr, ipaddr, gateway, &prefixLength, in android_net_utils_runDhcpCommon() 127 result = ::dhcp_do_request(nameStr, ipaddr, gateway, &prefixLength, in android_net_utils_runDhcpCommon() 158 env->SetIntField(info, dhcpInfoInternalFieldIds.prefixLength, prefixLength); in android_net_utils_runDhcpCommon() 228 …dhcpInfoInternalFieldIds.prefixLength = env->GetFieldID(dhcpInfoInternalClass, "prefixLength", "I"… in register_android_net_NetworkUtils()
|
/frameworks/base/test-runner/src/android/test/ |
D | ClassPathPackageInfoSource.java | 184 int prefixLength = pathPrefix.length(); in findClassesInJar() local 190 int index = entryName.indexOf('/', prefixLength); in findClassesInJar()
|
/frameworks/base/services/java/com/android/server/ |
D | NetworkManagementService.java | 385 int prefixLength = 0; in getInterfaceConfig() local 393 prefixLength = Integer.parseInt(st.nextToken(" ")); in getInterfaceConfig() 398 cfg.addr = new LinkAddress(addr, prefixLength); in getInterfaceConfig() 611 int prefixLength = in getRoutes() local 614 LinkAddress linkAddress = new LinkAddress(destAddr, prefixLength); in getRoutes() 643 int prefixLength = Integer.parseInt(prefix, 16); in getRoutes() local 648 LinkAddress linkAddress = new LinkAddress(destAddr, prefixLength); in getRoutes()
|
/frameworks/base/wifi/java/android/net/wifi/ |
D | WifiConfigStore.java | 479 dhcpInfoInternal.prefixLength = linkAddress.getNetworkPrefixLength(); in getIpConfiguration()
|