Evaluates whether the argument is a Teredo address. Teredo addresses begin with the "2001::/32" prefix. @param ip Inet6Address to be examined for Teredo address format @return true if the argument is a Teredo address
(Inet6Address ip)
| 669 | |
| 670 | |
| 671 | public static boolean isTeredoAddress(Inet6Address ip) { |
| 672 | byte[] bytes = ip.getAddress(); |
| 673 | return (bytes[0] == (byte) 0x20) && (bytes[1] == (byte) 0x01) && (bytes[2] == 0) |
| 674 | && (bytes[3] == 0); |
| 675 | } |
| 676 | |
| 677 | /** |
| 678 | * Returns the Teredo information embedded in a Teredo address. |
no outgoing calls
no test coverage detected