Home
last modified time | relevance | path

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

/frameworks/base/core/java/android/net/
DLinkAddress.java40 private int prefixLength; field in LinkAddress
42 private void init(InetAddress address, int prefixLength) { in init() argument
43 if (address == null || prefixLength < 0 || in init()
44 ((address instanceof Inet4Address) && prefixLength > 32) || in init()
45 (prefixLength > 128)) { in init()
47 "/" + prefixLength); in init()
50 this.prefixLength = prefixLength; in init()
53 public LinkAddress(InetAddress address, int prefixLength) { in LinkAddress() argument
54 init(address, prefixLength); in LinkAddress()
69 int prefixLength = -1; in LinkAddress() local
[all …]
DVpnService.java303 private void check(InetAddress address, int prefixLength) { in check() argument
308 if (prefixLength < 0 || prefixLength > 32) { in check()
312 if (prefixLength < 0 || prefixLength > 128) { in check()
327 public Builder addAddress(InetAddress address, int prefixLength) { in addAddress() argument
328 check(address, prefixLength); in addAddress()
333 mAddresses.add(new LinkAddress(address, prefixLength)); in addAddress()
345 public Builder addAddress(String address, int prefixLength) { in addAddress() argument
346 return addAddress(InetAddress.parseNumericAddress(address), prefixLength); in addAddress()
355 public Builder addRoute(InetAddress address, int prefixLength) { in addRoute() argument
356 check(address, prefixLength); in addRoute()
[all …]
DNetworkUtils.java145 public static int prefixLengthToNetmaskInt(int prefixLength) in prefixLengthToNetmaskInt() argument
147 if (prefixLength < 0 || prefixLength > 32) { in prefixLengthToNetmaskInt()
150 int value = 0xffffffff << (32 - prefixLength); in prefixLengthToNetmaskInt()
181 public static InetAddress getNetworkPart(InetAddress address, int prefixLength) { in getNetworkPart() argument
188 if (prefixLength < 0 || prefixLength > array.length * 8) { in getNetworkPart()
192 int offset = prefixLength / 8; in getNetworkPart()
193 int reminder = prefixLength % 8; in getNetworkPart()
DDhcpResults.java187 public boolean addLinkAddress(String addrString, int prefixLength) { in addLinkAddress() argument
196 LinkAddress linkAddress = new LinkAddress(addr, prefixLength); in addLinkAddress()
/frameworks/base/core/jni/
Dandroid_net_NetUtils.cpp35 uint32_t *prefixLength,
46 uint32_t *prefixLength,
120 uint32_t prefixLength; in android_net_utils_runDhcpCommon() local
137 result = ::dhcp_do_request_renew(nameStr, ipaddr, gateway, &prefixLength, in android_net_utils_runDhcpCommon()
140 result = ::dhcp_do_request(nameStr, ipaddr, gateway, &prefixLength, in android_net_utils_runDhcpCommon()
158 env->NewStringUTF(ipaddr), prefixLength); in android_net_utils_runDhcpCommon()
/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/java/com/android/server/
DNetworkManagementService.java586 int prefixLength = 0; in getInterfaceConfig() local
594 prefixLength = Integer.parseInt(st.nextToken()); in getInterfaceConfig()
599 cfg.setLinkAddress(new LinkAddress(addr, prefixLength)); in getInterfaceConfig()
789 int prefixLength = in getRoutes() local
792 LinkAddress linkAddress = new LinkAddress(destAddr, prefixLength); in getRoutes()
821 int prefixLength = Integer.parseInt(prefix, 16); in getRoutes() local
826 LinkAddress linkAddress = new LinkAddress(destAddr, prefixLength); in getRoutes()