Home
last modified time | relevance | path

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

/frameworks/base/core/java/android/net/
DLinkAddress.java62 private int prefixLength; field in LinkAddress
130 private void init(InetAddress address, int prefixLength, int flags, int scope) { in init() argument
133 prefixLength < 0 || in init()
134 (address instanceof Inet4Address && prefixLength > 32) || in init()
135 (prefixLength > 128)) { in init()
137 "/" + prefixLength); in init()
140 this.prefixLength = prefixLength; in init()
155 public LinkAddress(InetAddress address, int prefixLength, int flags, int scope) { in LinkAddress() argument
156 init(address, prefixLength, flags, scope); in LinkAddress()
166 public LinkAddress(InetAddress address, int prefixLength) { in LinkAddress() argument
[all …]
DIpPrefix.java51 private final int prefixLength; field in IpPrefix
58 NetworkUtils.maskRawAddress(address, prefixLength); in checkAndMaskAddressAndPrefixLength()
71 public IpPrefix(byte[] address, int prefixLength) { in IpPrefix() argument
73 this.prefixLength = prefixLength; in IpPrefix()
86 public IpPrefix(InetAddress address, int prefixLength) { in IpPrefix() argument
90 this.prefixLength = prefixLength; in IpPrefix()
110 this.prefixLength = ipAndMask.second; in IpPrefix()
127 return Arrays.equals(this.address, that.address) && this.prefixLength == that.prefixLength; in equals()
137 return Arrays.hashCode(address) + 11 * prefixLength; in hashCode()
172 return prefixLength; in getPrefixLength()
[all …]
DVpnService.java290 public boolean addAddress(InetAddress address, int prefixLength) { in addAddress() argument
291 check(address, prefixLength); in addAddress()
293 return getService().addVpnAddress(address.getHostAddress(), prefixLength); in addAddress()
320 public boolean removeAddress(InetAddress address, int prefixLength) { in removeAddress() argument
321 check(address, prefixLength); in removeAddress()
323 return getService().removeVpnAddress(address.getHostAddress(), prefixLength); in removeAddress()
417 private static void check(InetAddress address, int prefixLength) { in check() argument
422 if (prefixLength < 0 || prefixLength > 32) { in check()
426 if (prefixLength < 0 || prefixLength > 128) { in check()
495 public Builder addAddress(InetAddress address, int prefixLength) { in addAddress() argument
[all …]
DNetworkUtils.java162 public static int prefixLengthToNetmaskInt(int prefixLength) in prefixLengthToNetmaskInt() argument
164 if (prefixLength < 0 || prefixLength > 32) { in prefixLengthToNetmaskInt()
167 int value = 0xffffffff << (32 - prefixLength); in prefixLengthToNetmaskInt()
190 int prefixLength = Integer.bitCount(i); in netmaskToPrefixLength() local
192 if (trailingZeros != 32 - prefixLength) { in netmaskToPrefixLength()
195 return prefixLength; in netmaskToPrefixLength()
241 public static void maskRawAddress(byte[] array, int prefixLength) { in maskRawAddress() argument
242 if (prefixLength < 0 || prefixLength > array.length * 8) { in maskRawAddress()
244 " bytes has invalid prefix length " + prefixLength); in maskRawAddress()
247 int offset = prefixLength / 8; in maskRawAddress()
[all …]
DDhcpResults.java146 public boolean setIpAddress(String addrString, int prefixLength) { in setIpAddress() argument
149 ipAddress = new LinkAddress(addr, prefixLength); in setIpAddress()
151 Log.e(TAG, "setIpAddress failed with addrString " + addrString + "/" + prefixLength); in setIpAddress()
DIConnectivityManager.aidl171 boolean addVpnAddress(String address, int prefixLength); in addVpnAddress() argument
172 boolean removeVpnAddress(String address, int prefixLength); in removeVpnAddress() argument
/frameworks/base/services/net/java/android/net/ip/
DRouterAdvertisementDaemon.java469 final int prefixLength = ipp.getPrefixLength();
470 if (prefixLength != 64) {
483 .put(asByte(prefixLength))
507 final int prefixLength = ipp.getPrefixLength();
508 if (prefixLength > 64) {
513 (prefixLength == 0) ? 1 : (prefixLength <= 8) ? 2 : 3);
518 .put(asByte(prefixLength))
523 if (prefixLength > 0) {
524 ra.put(addr, 0, (prefixLength <= 64) ? 8 : 16);
DIpClient.java577 private static boolean isCompliantIPv6PrefixLength(int prefixLength) { in isCompliantIPv6PrefixLength() argument
578 return (NetworkConstants.RFC6177_MIN_PREFIX_LENGTH <= prefixLength) in isCompliantIPv6PrefixLength()
579 && (prefixLength <= NetworkConstants.RFC7421_PREFIX_LENGTH); in isCompliantIPv6PrefixLength()
/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/core/java/android/app/
DApplicationErrorReport.java391 int prefixLength = 10 * 1024; in sanitizeString() local
393 int acceptableLength = prefixLength + suffixLength; in sanitizeString()
400 sb.append(s.substring(0, prefixLength)); in sanitizeString()
/frameworks/base/services/net/java/android/net/dhcp/
DDhcpPacket.java1123 int prefixLength; in toDhcpResults() local
1126 prefixLength = NetworkUtils.netmaskToPrefixLength(mSubnetMask); in toDhcpResults()
1132 prefixLength = NetworkUtils.getImplicitNetmask(ipAddress); in toDhcpResults()
1137 results.ipAddress = new LinkAddress(ipAddress, prefixLength); in toDhcpResults()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/mocks/
DConnectivityServiceMock.java923 public boolean addVpnAddress(String address, int prefixLength) { in addVpnAddress() argument
928 public boolean removeVpnAddress(String address, int prefixLength) { in removeVpnAddress() argument
/frameworks/base/services/core/java/com/android/server/connectivity/
DVpn.java1456 public synchronized boolean addAddress(String address, int prefixLength) { in addAddress() argument
1460 boolean success = jniAddAddress(mInterface, address, prefixLength); in addAddress()
1465 public synchronized boolean removeAddress(String address, int prefixLength) { in removeAddress() argument
1469 boolean success = jniDelAddress(mInterface, address, prefixLength); in removeAddress()
/frameworks/base/services/net/java/android/net/apf/
DApfFilter.java1548 public static int ipv4BroadcastAddress(byte[] addrBytes, int prefixLength) { in ipv4BroadcastAddress() argument
1549 return bytesToBEInt(addrBytes) | (int) (uint32(-1) >>> prefixLength); in ipv4BroadcastAddress()
/frameworks/base/services/core/java/com/android/server/
DNetworkManagementService.java1025 int prefixLength = 0; in getInterfaceConfig() local
1033 prefixLength = Integer.parseInt(st.nextToken()); in getInterfaceConfig()
1038 cfg.setLinkAddress(new LinkAddress(addr, prefixLength)); in getInterfaceConfig()
DConnectivityService.java5784 public boolean addVpnAddress(String address, int prefixLength) { in addVpnAddress() argument
5788 return mVpns.get(user).addAddress(address, prefixLength); in addVpnAddress()
5793 public boolean removeVpnAddress(String address, int prefixLength) { in removeVpnAddress() argument
5797 return mVpns.get(user).removeAddress(address, prefixLength); in removeVpnAddress()
/frameworks/av/media/libstagefright/
DACodec.cpp7542 constexpr size_t prefixLength = sizeof(prefix) - 1; in setVendorParameters() local
7550 if (key != nullptr && !strncmp(key, prefix, prefixLength) in setVendorParameters()
7554 && strlen(key + prefixLength) < sizeof(reducedKey) in setVendorParameters()
7558 strcpy(reducedKey, key + prefixLength); in setVendorParameters()
7683 constexpr size_t prefixLength = sizeof(prefix) - 1; in getVendorParameters() local
7685 sizeof(OMX_CONFIG_ANDROID_VENDOR_PARAMTYPE::cKey) + prefixLength]; in getVendorParameters()
7706 strcpy(key + prefixLength, (const char *)config->cName); in getVendorParameters()
/frameworks/base/config/
Dhiddenapi-light-greylist.txt3418 Landroid/net/LinkAddress;->prefixLength:I
8744 Ljava/io/File;->prefixLength:I
8772 Ljava/io/FileSystem;->prefixLength(Ljava/lang/String;)I
Dboot-image-profile.txt44716 HSPLjava/io/FileSystem;->prefixLength(Ljava/lang/String;)I
45144 HSPLjava/io/UnixFileSystem;->prefixLength(Ljava/lang/String;)I
47852 HSPLjava/time/format/DateTimeFormatterBuilder$PrefixTree;->prefixLength(Ljava/lang/String;)I