Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for isMappedIPv4Address (0.11 sec)

  1. guava-tests/test/com/google/common/net/InetAddressesTest.java

        assertFalse(InetAddresses.isMappedIPv4Address("::"));
        assertFalse(InetAddresses.isMappedIPv4Address("::ffff"));
        assertFalse(InetAddresses.isMappedIPv4Address("::ffff:0"));
        assertFalse(InetAddresses.isMappedIPv4Address("::fffe:0:0"));
        assertFalse(InetAddresses.isMappedIPv4Address("::1:ffff:0:0"));
        assertFalse(InetAddresses.isMappedIPv4Address("foo"));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 24 16:44:05 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

     */
    internal fun canonicalizeInetAddress(address: ByteArray): ByteArray {
      return when {
        isMappedIpv4Address(address) -> address.sliceArray(12 until 16)
        else -> address
      }
    }
    
    /** Returns true for IPv6 addresses like `0000:0000:0000:0000:0000:ffff:XXXX:XXXX`. */
    private fun isMappedIpv4Address(address: ByteArray): Boolean {
      if (address.size != 16) return false
    
      for (i in 0 until 10) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/net/InetAddresses.java

       * @param ipString {@code String} to be examined for embedded IPv4-mapped IPv6 address format
       * @return {@code true} if the argument is a valid "mapped" address
       * @since 10.0
       */
      public static boolean isMappedIPv4Address(String ipString) {
        byte[] bytes = ipStringToBytes(ipString, null);
        if (bytes != null && bytes.length == 16) {
          for (int i = 0; i < 10; i++) {
            if (bytes[i] != 0) {
              return false;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/net/InetAddresses.java

       * @param ipString {@code String} to be examined for embedded IPv4-mapped IPv6 address format
       * @return {@code true} if the argument is a valid "mapped" address
       * @since 10.0
       */
      public static boolean isMappedIPv4Address(String ipString) {
        byte[] bytes = ipStringToBytes(ipString, null);
        if (bytes != null && bytes.length == 16) {
          for (int i = 0; i < 10; i++) {
            if (bytes[i] != 0) {
              return false;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 47.1K bytes
    - Viewed (0)
Back to top