/frameworks/base/core/java/android/net/shared/ |
D | Inet4AddressUtils.java | 90 public static int prefixLengthToV4NetmaskIntHTH(int prefixLength) in prefixLengthToV4NetmaskIntHTH() argument 92 if (prefixLength < 0 || prefixLength > 32) { in prefixLengthToV4NetmaskIntHTH() 96 return prefixLength == 0 ? 0 : 0xffffffff << (32 - prefixLength); in prefixLengthToV4NetmaskIntHTH() 106 public static int prefixLengthToV4NetmaskIntHTL(int prefixLength) in prefixLengthToV4NetmaskIntHTL() argument 108 return Integer.reverseBytes(prefixLengthToV4NetmaskIntHTH(prefixLength)); in prefixLengthToV4NetmaskIntHTL() 121 int prefixLength = Integer.bitCount(i); in netmaskToPrefixLength() local 123 if (trailingZeros != 32 - prefixLength) { in netmaskToPrefixLength() 126 return prefixLength; in netmaskToPrefixLength() 150 public static Inet4Address getBroadcastAddress(Inet4Address addr, int prefixLength) in getBroadcastAddress() argument 153 | ~prefixLengthToV4NetmaskIntHTH(prefixLength); in getBroadcastAddress() [all …]
|
/frameworks/base/core/java/android/net/ |
D | IpPrefix.java | 55 private final int prefixLength; field in IpPrefix 62 NetworkUtils.maskRawAddress(address, prefixLength); in checkAndMaskAddressAndPrefixLength() 75 public IpPrefix(@NonNull byte[] address, @IntRange(from = 0, to = 128) int prefixLength) { in IpPrefix() 77 this.prefixLength = prefixLength; in IpPrefix() 92 public IpPrefix(@NonNull InetAddress address, @IntRange(from = 0, to = 128) int prefixLength) { in IpPrefix() 96 this.prefixLength = prefixLength; in IpPrefix() 118 this.prefixLength = ipAndMask.second; in IpPrefix() 135 return Arrays.equals(this.address, that.address) && this.prefixLength == that.prefixLength; in equals() 145 return Arrays.hashCode(address) + 11 * prefixLength; in hashCode() 181 return prefixLength; in getPrefixLength() [all …]
|
D | LinkAddress.java | 71 private int prefixLength; field in LinkAddress 155 private void init(InetAddress address, int prefixLength, int flags, int scope) { in init() argument 158 prefixLength < 0 || in init() 159 (address instanceof Inet4Address && prefixLength > 32) || in init() 160 (prefixLength > 128)) { in init() 162 "/" + prefixLength); in init() 165 this.prefixLength = prefixLength; in init() 182 public LinkAddress(@NonNull InetAddress address, @IntRange(from = 0, to = 128) int prefixLength, in LinkAddress() 184 init(address, prefixLength, flags, scope); in LinkAddress() 197 @IntRange(from = 0, to = 128) int prefixLength) { in LinkAddress() [all …]
|
D | VpnService.java | 301 public boolean addAddress(InetAddress address, int prefixLength) { in addAddress() argument 302 check(address, prefixLength); in addAddress() 304 return getService().addVpnAddress(address.getHostAddress(), prefixLength); in addAddress() 331 public boolean removeAddress(InetAddress address, int prefixLength) { in removeAddress() argument 332 check(address, prefixLength); in removeAddress() 334 return getService().removeVpnAddress(address.getHostAddress(), prefixLength); in removeAddress() 457 private static void check(InetAddress address, int prefixLength) { in check() argument 462 if (prefixLength < 0 || prefixLength > 32) { in check() 466 if (prefixLength < 0 || prefixLength > 128) { in check() 551 public Builder addAddress(@NonNull InetAddress address, int prefixLength) { in addAddress() argument [all …]
|
D | NetworkUtils.java | 203 public static int prefixLengthToNetmaskInt(int prefixLength) in prefixLengthToNetmaskInt() argument 205 return Inet4AddressUtils.prefixLengthToV4NetmaskIntHTL(prefixLength); in prefixLengthToNetmaskInt() 252 public static void maskRawAddress(byte[] array, int prefixLength) { in maskRawAddress() argument 253 if (prefixLength < 0 || prefixLength > array.length * 8) { in maskRawAddress() 255 " bytes has invalid prefix length " + prefixLength); in maskRawAddress() 258 int offset = prefixLength / 8; in maskRawAddress() 259 int remainder = prefixLength % 8; in maskRawAddress() 276 public static InetAddress getNetworkPart(InetAddress address, int prefixLength) { in getNetworkPart() argument 278 maskRawAddress(array, prefixLength); in getNetworkPart() 304 int prefixLength = -1; in parseIpAndMask() local [all …]
|
D | DhcpResults.java | 209 public boolean setIpAddress(String addrString, int prefixLength) { in setIpAddress() argument 212 ipAddress = new LinkAddress(addr, prefixLength); in setIpAddress() 214 Log.e(TAG, "setIpAddress failed with addrString " + addrString + "/" + prefixLength); in setIpAddress()
|
D | INetdEventCallback.aidl | 59 int prefixLength); in onNat64PrefixEvent() argument
|
D | IConnectivityManager.aidl | 192 boolean addVpnAddress(String address, int prefixLength); in addVpnAddress() argument 193 boolean removeVpnAddress(String address, int prefixLength); in removeVpnAddress() argument
|
/frameworks/base/services/net/java/android/net/ip/ |
D | RouterAdvertisementDaemon.java | 485 final int prefixLength = ipp.getPrefixLength(); 486 if (prefixLength != 64) { 499 .put(asByte(prefixLength)) 523 final int prefixLength = ipp.getPrefixLength(); 524 if (prefixLength > 64) { 529 (prefixLength == 0) ? 1 : (prefixLength <= 8) ? 2 : 3); 534 .put(asByte(prefixLength)) 539 if (prefixLength > 0) { 540 ra.put(addr, 0, (prefixLength <= 64) ? 8 : 16);
|
D | InterfaceController.java | 55 ifConfig.prefixLength = addr.getPrefixLength(); in setInterfaceAddress() 62 ifConfig.ipv4Addr, ifConfig.prefixLength, e); in setInterfaceAddress()
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ |
D | WifiConfigurationHelper.java | 244 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/services/net/java/android/net/shared/ |
D | InitialConfiguration.java | 192 private static boolean isCompliantIPv6PrefixLength(int prefixLength) { in isCompliantIPv6PrefixLength() argument 193 return (RFC6177_MIN_PREFIX_LENGTH <= prefixLength) in isCompliantIPv6PrefixLength() 194 && (prefixLength <= RFC7421_PREFIX_LENGTH); in isCompliantIPv6PrefixLength()
|
/frameworks/base/tests/net/java/android/net/ip/ |
D | InterfaceControllerTest.java | 73 assertEquals(TEST_PREFIXLENGTH, parcel.prefixLength); in testSetIPv4Address() 85 assertEquals(0, parcel.prefixLength); in testClearIPv4Address()
|
/frameworks/base/core/java/com/android/server/net/ |
D | BaseNetdEventCallback.java | 36 int prefixLength) { in onNat64PrefixEvent() argument
|
/frameworks/base/tests/net/java/android/net/shared/ |
D | Inet4AddressUtilsTest.java | 119 private void checkAddressMasking(String expectedAddr, String addr, int prefixLength) { in checkAddressMasking() argument 120 final int prefix = prefixLengthToV4NetmaskIntHTH(prefixLength); in checkAddressMasking()
|
/frameworks/base/core/java/android/app/ |
D | ApplicationErrorReport.java | 398 int prefixLength = 10 * 1024; in sanitizeString() local 400 int acceptableLength = prefixLength + suffixLength; in sanitizeString() 407 sb.append(s.substring(0, prefixLength)); in sanitizeString()
|
/frameworks/base/services/core/java/com/android/server/connectivity/ |
D | NetdEventListenerService.java | 219 boolean added, String prefixString, int prefixLength) in onNat64PrefixEvent() argument 223 callback.onNat64PrefixEvent(netId, added, prefixString, prefixLength); in onNat64PrefixEvent()
|
D | Vpn.java | 1513 public synchronized boolean addAddress(String address, int prefixLength) { in addAddress() argument 1517 boolean success = jniAddAddress(mInterface, address, prefixLength); in addAddress() 1522 public synchronized boolean removeAddress(String address, int prefixLength) { in removeAddress() argument 1526 boolean success = jniDelAddress(mInterface, address, prefixLength); in removeAddress()
|
/frameworks/base/services/core/java/com/android/server/ |
D | ConnectivityService.java | 1797 String prefixString, int prefixLength) { 1798 mHandler.post(() -> handleNat64PrefixEvent(netId, added, prefixString, prefixLength)); 2891 int prefixLength) { in handleNat64PrefixEvent() argument 2896 (added ? "added" : "removed"), netId, prefixString, prefixLength)); in handleNat64PrefixEvent() 2902 prefixLength); in handleNat64PrefixEvent() 2904 loge("Invalid NAT64 prefix " + prefixString + "/" + prefixLength); in handleNat64PrefixEvent() 6812 public boolean addVpnAddress(String address, int prefixLength) { in addVpnAddress() argument 6816 return mVpns.get(user).addAddress(address, prefixLength); in addVpnAddress() 6821 public boolean removeVpnAddress(String address, int prefixLength) { in removeVpnAddress() argument 6825 return mVpns.get(user).removeAddress(address, prefixLength); in removeVpnAddress()
|
D | NetworkManagementService.java | 767 cfgParcel.prefixLength = cfg.getLinkAddress().getPrefixLength(); in toStableParcel() 785 cfg.setLinkAddress(new LinkAddress(addr, p.prefixLength)); in fromStableParcel()
|
/frameworks/av/media/libstagefright/ |
D | ACodec.cpp | 7767 constexpr size_t prefixLength = sizeof(prefix) - 1; in setVendorParameters() local 7775 if (key != nullptr && !strncmp(key, prefix, prefixLength) in setVendorParameters() 7779 && strlen(key + prefixLength) < sizeof(reducedKey) in setVendorParameters() 7783 strcpy(reducedKey, key + prefixLength); in setVendorParameters() 7908 constexpr size_t prefixLength = sizeof(prefix) - 1; in getVendorParameters() local 7910 sizeof(OMX_CONFIG_ANDROID_VENDOR_PARAMTYPE::cKey) + prefixLength]; in getVendorParameters() 7931 strcpy(key + prefixLength, (const char *)config->cName); in getVendorParameters()
|
/frameworks/base/config/ |
D | boot-image-profile.txt | 26249 HSPLjava/io/UnixFileSystem;->prefixLength(Ljava/lang/String;)I 28169 HSPLjava/time/format/DateTimeFormatterBuilder$PrefixTree;->prefixLength(Ljava/lang/String;)I
|
D | hiddenapi-greylist-max-o.txt | 31036 Landroid/icu/text/NFRule;->prefixLength(Ljava/lang/String;Ljava/lang/String;)I 31656 Landroid/icu/text/RbnfLenientScanner;->prefixLength(Ljava/lang/String;Ljava/lang/String;)I 46766 Landroid/net/IpPrefix;->prefixLength:I 114017 Ljava/time/format/DateTimeFormatterBuilder$PrefixTree;->prefixLength(Ljava/lang/String;)I
|