code: public static TeredoInfo getTeredoInfo(Inet6Address ip) {
      Preconditions.checkArgument(isTeredoAddress(ip),
          "Address '%s' is not a Teredo address.", toAddrString(ip));
  
      byte[] bytes = ip.getAddress();
      Inet4Address server = getInet4Address(Arrays.copyOfRange(bytes, 4, 8));
  
      int flags = ByteStreams.newDataInput(bytes, 8).readShort() & 0xffff;
  
      // Teredo obfuscates the mapped client port, per section 4 of the RFC.
      int port = ~ByteStreams.newDataInput(bytes, 10).readShort() & 0xffff;
  
      byte[] clientBytes = Arrays.copyOfRange(bytes, 12, 16);
      for (int i = 0; i < clientBytes.length; i++) {
        // Teredo obfuscates the mapped client IP, per section 4 of the RFC.
        clientBytes[i] = (byte) ~clientBytes[i];
      }
      Inet4Address client = getInet4Address(clientBytes);
  
      return new TeredoInfo(server, client, port, flags);
    }
docs: Returns the Teredo information embedded in a Teredo address.
  
  @param ip {@link Inet6Address} to be examined for embedded Teredo information
  @return extracted {@code TeredoInfo}
  @throws IllegalArgumentException if the argument is not a valid IPv6 Teredo address