Net::IPv6Addr -- check validity of IPv6 addresses |
Net::IPv6Addr -- check validity of IPv6 addresses
use Net::IPv6Addr;
Net::IPv6Addr::ipv6_parse($addr); $x = new Net::IPv6Addr("dead:beef:cafe:babe::f0ad"); print $x->to_string_preferred(), "\n";
Net::IPv6Addr
checks strings for valid IPv6 addresses, as
specified in RFC1884. You throw possible addresses at it, it
either accepts them or throws an exception.
If Math::Base85
is installed, then this module is able to process
addresses formatted in the style referenced by RFC1924.
The public interface of this module is rather small.
A string to be interpreted as an IPv6 address.
A Net::IPv6Addr
object if successful.
Throws an exception if the string isn't a valid address.
A string containing an IPv6 address string. Optionally, it may
also include a /
character, and a numeric prefix length, in that
order.
-or-
An IPv6 address string. Optionally, a numeric prefix length.
What you gave it, more or less, if it does parse out correctly.
Throws an exception on malformed input. This is not an object method or class method; it's just a subroutine.
A string containing an IPv6 address string. Optionally, it may
also include a /
character, and a numeric prefix length, in that
order.
-or-
An IPv6 address string. Optionally, a numeric prefix length.
What you gave it, more or less, if it does parse out correctly, otherwise returns undef. =head2 Notes
This is not an object method or class method; it is just a subroutine.
An IPv6 address string.
Something true if it's a valid address; something false otherwise.
If used as an object method, none; if used as a plain old subroutine, an IPv6 address string in any format.
The IPv6 address, formatted in the ``preferred'' way (as detailed by RFC1884).
Invalid input will generate an exception.
If used as an object method, none; if used as a plain old subroutine, an IPv6 address string in any format.
The IPv6 address in ``compresed'' format (as detailed by RFC1884).
Invalid input will generate an exception.
If used as an object method, none; if used as a plain old subroutine, an IPv6 address string in any format.
The IPv6 address in IPv4 format (as detailed by RFC1884).
Invalid input (such as an address that was not originally IPv4) will generate an exception.
If used as an object method, none; if used as a plain old subroutine, an IPv6 address string in any format.
The IPv6 address in compressed IPv4 format (as detailed by RFC1884).
Invalid input (such as an address that was not originally IPv4) will generate an exception.
If used as an object method, none; if used as a plain old subroutine, an IPv6 address string in any format.
The IPv6 address in the style detailed by RFC1924.
Invalid input will generate an exception.
If used as an object method, none; if used as a plain old subroutine, an IPv6 address string in any format.
The BigInt representation of IPv6 address.
Invalid input will generate an exception.
If used as an object method, none; if used as a plain old subroutine, an IPv6 address string in any format.
An array [0..7] of 16 bit hexadecimal numbers.
Invalid input will generate an exception.
If used as an object method, none; if used as a plain old subroutine, an IPv6 address string in any format.
An array [0..7] of decimal numbers.
Invalid input will generate an exception.
If used as an object method, none; if used as a plain old subroutine, an IPv6 address string in any format.
The reverse-address pointer as defined by RFC1886.
Invalid input will generate an exception.
If used as an object method, network size in bits
If used as a plain old subroutine, an IPv6 address string in any format and network size in bits. Network size may be given with / notation.
Network IPv6Addr of given size.
Invalid input will generate an exception.
If used as an object method, network and its size in bits
If used as a plain old subroutine, an IPv6 address string in any format network address string and size in bits. Network size may be given with / notation.
Something true, if address is member of the network, false otherwise.
Invalid input will generate an exception.
probably exist in this module. Please report them.
Tony Monroe <tmonroe plus perl at nog dot net>.
The module's interface probably looks like it vaguely resembles Net::IPv4Addr by Francis J. Lacoste <francis dot lacoste at iNsu dot COM>.
Some fixes and subroutines from Jyrki Soini <jyrki dot soini at sonera dot com>.
This was originally written to simplify the task of maintaining DNS records after I set myself up with Freenet6. Interesting that there's really only one DNS-related subroutine in here.
RFC1884, RFC1886, RFC1924, the perl manpage, the Net::IPv4Addr manpage, the Math::Base85 manpage, the Math::BigInt manpage
Net::IPv6Addr -- check validity of IPv6 addresses |