Searched defs:prefixLength (Results 1 - 5 of 5) sorted by relevance

/frameworks/base/core/java/android/net/
H A DLinkAddress.java40 private final int prefixLength; field in class:LinkAddress
42 public LinkAddress(InetAddress address, int prefixLength) { argument
43 if (address == null || prefixLength < 0 ||
44 ((address instanceof Inet4Address) && prefixLength > 32) ||
45 (prefixLength > 128)) {
47 prefixLength);
50 this.prefixLength = prefixLength;
55 this.prefixLength = interfaceAddress.getNetworkPrefixLength();
60 return (address == null ? "" : (address.getHostAddress() + "/" + prefixLength));
[all...]
H A DDhcpInfoInternal.java36 public int prefixLength; field in class:DhcpInfoInternal
86 info.netmask = NetworkUtils.prefixLengthToNetmaskInt(prefixLength);
100 return new LinkAddress(NetworkUtils.numericToInetAddress(ipAddress), prefixLength);
160 return "addr: " + ipAddress + "/" + prefixLength +
H A DNetworkUtils.java139 * @param prefixLength
142 public static int prefixLengthToNetmaskInt(int prefixLength) argument
144 if (prefixLength < 0 || prefixLength > 32) {
147 int value = 0xffffffff << (32 - prefixLength);
174 * Get InetAddress masked with prefixLength. Will never return null.
175 * @param IP address which will be masked with specified prefixLength
176 * @param prefixLength the prefixLength used to mask the IP
178 public static InetAddress getNetworkPart(InetAddress address, int prefixLength) { argument
[all...]
H A DVpnService.java299 * Private method to validate address and prefixLength.
301 private void check(InetAddress address, int prefixLength) { argument
306 if (prefixLength < 0 || prefixLength > 32) {
307 throw new IllegalArgumentException("Bad prefixLength");
310 if (prefixLength < 0 || prefixLength > 128) {
311 throw new IllegalArgumentException("Bad prefixLength");
325 public Builder addAddress(InetAddress address, int prefixLength) { argument
326 check(address, prefixLength);
344 addAddress(String address, int prefixLength) argument
354 addRoute(InetAddress address, int prefixLength) argument
379 addRoute(String address, int prefixLength) argument
[all...]
/frameworks/base/core/jni/
H A Dandroid_net_NetUtils.cpp34 uint32_t *prefixLength,
44 uint32_t *prefixLength,
68 jfieldID prefixLength; member in struct:android::fieldIds
116 uint32_t prefixLength; local
128 result = ::dhcp_do_request_renew(nameStr, ipaddr, gateway, &prefixLength,
131 result = ::dhcp_do_request(nameStr, ipaddr, gateway, &prefixLength,
162 env->SetIntField(info, dhcpInfoInternalFieldIds.prefixLength, prefixLength);
233 dhcpInfoInternalFieldIds.prefixLength = env->GetFieldID(dhcpInfoInternalClass, "prefixLength", "
[all...]

Completed in 47 milliseconds