Home
last modified time | relevance | path

Searched refs:prefixLength (Results 1 – 12 of 12) sorted by relevance

/frameworks/base/core/java/android/net/
DIpPrefix.java48 private final int prefixLength; field in IpPrefix
55 NetworkUtils.maskRawAddress(address, prefixLength); in checkAndMaskAddressAndPrefixLength()
68 public IpPrefix(byte[] address, int prefixLength) { in IpPrefix() argument
70 this.prefixLength = prefixLength; in IpPrefix()
83 public IpPrefix(InetAddress address, int prefixLength) { in IpPrefix() argument
87 this.prefixLength = prefixLength; in IpPrefix()
107 this.prefixLength = ipAndMask.second; in IpPrefix()
124 return Arrays.equals(this.address, that.address) && this.prefixLength == that.prefixLength; in equals()
134 return Arrays.hashCode(address) + 11 * prefixLength; in hashCode()
169 return prefixLength; in getPrefixLength()
[all …]
DLinkAddress.java60 private int prefixLength; field in LinkAddress
98 private void init(InetAddress address, int prefixLength, int flags, int scope) { in init() argument
101 prefixLength < 0 || in init()
102 ((address instanceof Inet4Address) && prefixLength > 32) || in init()
103 (prefixLength > 128)) { in init()
105 "/" + prefixLength); in init()
108 this.prefixLength = prefixLength; in init()
123 public LinkAddress(InetAddress address, int prefixLength, int flags, int scope) { in LinkAddress() argument
124 init(address, prefixLength, flags, scope); in LinkAddress()
134 public LinkAddress(InetAddress address, int prefixLength) { in LinkAddress() argument
[all …]
DVpnService.java224 public boolean addAddress(InetAddress address, int prefixLength) { in addAddress() argument
225 check(address, prefixLength); in addAddress()
227 return getService().addVpnAddress(address.getHostAddress(), prefixLength); in addAddress()
254 public boolean removeAddress(InetAddress address, int prefixLength) { in removeAddress() argument
255 check(address, prefixLength); in removeAddress()
257 return getService().removeVpnAddress(address.getHostAddress(), prefixLength); in removeAddress()
311 private static void check(InetAddress address, int prefixLength) { in check() argument
316 if (prefixLength < 0 || prefixLength > 32) { in check()
320 if (prefixLength < 0 || prefixLength > 128) { in check()
389 public Builder addAddress(InetAddress address, int prefixLength) { in addAddress() argument
[all …]
DNetworkUtils.java176 public static int prefixLengthToNetmaskInt(int prefixLength) in prefixLengthToNetmaskInt() argument
178 if (prefixLength < 0 || prefixLength > 32) { in prefixLengthToNetmaskInt()
181 int value = 0xffffffff << (32 - prefixLength); in prefixLengthToNetmaskInt()
236 public static void maskRawAddress(byte[] array, int prefixLength) { in maskRawAddress() argument
237 if (prefixLength < 0 || prefixLength > array.length * 8) { in maskRawAddress()
239 " bytes has invalid prefix length " + prefixLength); in maskRawAddress()
242 int offset = prefixLength / 8; in maskRawAddress()
243 int remainder = prefixLength % 8; in maskRawAddress()
260 public static InetAddress getNetworkPart(InetAddress address, int prefixLength) { in getNetworkPart() argument
262 maskRawAddress(array, prefixLength); in getNetworkPart()
[all …]
DDhcpResults.java152 public boolean setIpAddress(String addrString, int prefixLength) { in setIpAddress() argument
155 ipAddress = new LinkAddress(addr, prefixLength); in setIpAddress()
157 Log.e(TAG, "setIpAddress failed with addrString " + addrString + "/" + prefixLength); in setIpAddress()
DIConnectivityManager.aidl169 boolean addVpnAddress(String address, int prefixLength); in addVpnAddress() argument
170 boolean removeVpnAddress(String address, int prefixLength); in removeVpnAddress() argument
/frameworks/base/core/jni/
Dandroid_net_NetUtils.cpp37 uint32_t *prefixLength,
48 uint32_t *prefixLength,
101 uint32_t prefixLength; in android_net_utils_runDhcpCommon() local
118 result = ::dhcp_do_request_renew(nameStr, ipaddr, gateway, &prefixLength, in android_net_utils_runDhcpCommon()
121 result = ::dhcp_do_request(nameStr, ipaddr, gateway, &prefixLength, in android_net_utils_runDhcpCommon()
135 env->NewStringUTF(ipaddr), prefixLength); in android_net_utils_runDhcpCommon()
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/
DWifiConfigurationHelper.java244 int prefixLength = getPrefixLength(jsonConfig.getInt("prefix_length")); in getWifiConfiguration() local
245 staticIpConfig.ipAddress = new LinkAddress(ipAddress, prefixLength); in getWifiConfiguration()
348 private static int getPrefixLength(int prefixLength) { in getPrefixLength() argument
349 if (prefixLength < 0 || prefixLength > 32) { in getPrefixLength()
352 return prefixLength; in getPrefixLength()
/frameworks/base/test-runner/src/android/test/
DClassPathPackageInfoSource.java184 int prefixLength = pathPrefix.length(); in findClassesInJar() local
190 int index = entryName.indexOf('/', prefixLength); in findClassesInJar()
/frameworks/base/services/core/java/com/android/server/
DNetworkManagementService.java838 int prefixLength = 0; in getInterfaceConfig() local
846 prefixLength = Integer.parseInt(st.nextToken()); in getInterfaceConfig()
851 cfg.setLinkAddress(new LinkAddress(addr, prefixLength)); in getInterfaceConfig()
1032 int prefixLength = in getRoutes() local
1035 LinkAddress linkAddress = new LinkAddress(destAddr, prefixLength); in getRoutes()
1064 int prefixLength = Integer.parseInt(prefix, 16); in getRoutes() local
1069 LinkAddress linkAddress = new LinkAddress(destAddr, prefixLength); in getRoutes()
DConnectivityService.java4260 public boolean addVpnAddress(String address, int prefixLength) { in addVpnAddress() argument
4264 return mVpns.get(user).addAddress(address, prefixLength); in addVpnAddress()
4269 public boolean removeVpnAddress(String address, int prefixLength) { in removeVpnAddress() argument
4273 return mVpns.get(user).removeAddress(address, prefixLength); in removeVpnAddress()
/frameworks/base/services/core/java/com/android/server/connectivity/
DVpn.java792 public synchronized boolean addAddress(String address, int prefixLength) { in addAddress() argument
796 boolean success = jniAddAddress(mInterface, address, prefixLength); in addAddress()
803 public synchronized boolean removeAddress(String address, int prefixLength) { in removeAddress() argument
807 boolean success = jniDelAddress(mInterface, address, prefixLength); in removeAddress()