.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Net::IPv6Addr 3pm" .TH Net::IPv6Addr 3pm "2021-09-21" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::IPv6Addr \- Check and manipulate IPv6 addresses .SH "VERSION" .IX Header "VERSION" This documents version 1.02 of Net::IPv6Addr corresponding to git commit f9065cb7b044da442df16443d65593a5a3fc6baa released on Wed Mar 31 11:11:47 2021 +0900. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& use Net::IPv6Addr; \& my $addr = "dead:beef:cafe:babe::f0ad"; \& Net::IPv6Addr::ipv6_parse($addr); \& my $x = Net::IPv6Addr\->new($addr); \& print $x\->to_string_preferred(), "\en"; .Ve .PP produces output .PP .Vb 1 \& dead:beef:cafe:babe:0:0:0:f0ad .Ve .PP (This example is included as \fIsynopsis.pl\fR in the distribution.) .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`Net::IPv6Addr\*(C'\fR checks whether strings contain valid IPv6 addresses, and converts IPv6 addresses into various formats. .PP All of \*(L"new\*(R", \*(L"is_ipv6\*(R", and \*(L"ipv6_parse\*(R" can process the following formats: .IP "Preferred form: x:x:x:x:x:x:x:x" 4 .IX Item "Preferred form: x:x:x:x:x:x:x:x" \&\f(CW\*(C`2001:db8:0:0:0:ff00:42:8329\*(C'\fR .Sp This is the form described as the \*(L"preferred form\*(R" in section 2.2 of \&\*(L"\s-1RFC1884\*(R"\s0 et al. Output with \*(L"to_string_preferred\*(R". .IP "Compressed form with double colon: x::x etc." 4 .IX Item "Compressed form with double colon: x::x etc." \&\f(CW\*(C`2001:db8::ff00:42:8329\*(C'\fR .Sp This is the \*(L"canonical text representation format\*(R" of \*(L"\s-1RFC5952\*(R"\s0. Output with \*(L"to_string_compressed\*(R". .IP "Mixed IPv4/IPv6 format: x:x:x:x:x:x:d.d.d.d" 4 .IX Item "Mixed IPv4/IPv6 format: x:x:x:x:x:x:d.d.d.d" \&\f(CW\*(C`2001:db8:0:0:0:ff00:0.66.131.41\*(C'\fR .Sp Output with \*(L"to_string_ipv4\*(R". .IP "Mixed IPv4/IPv6 with compression: x::x:d.d.d.d, etc." 4 .IX Item "Mixed IPv4/IPv6 with compression: x::x:d.d.d.d, etc." \&\f(CW\*(C`2001:db8::ff00:0.66.131.41\*(C'\fR .Sp Output with \*(L"to_string_ipv4_compressed\*(R". .IP "Big integers" 4 .IX Item "Big integers" An IPv6 can be changed to a Math::BigInt object or a digit string using \*(L"to_bigint\*(R". Big integers can also be input with \&\*(L"from_bigint\*(R". .IP "Base\-85\-encoded: [0\-9A\-Za\-z!#$%&()*+;<=>?@^_`{|}~\-]{20}" 4 .IX Item "Base-85-encoded: [0-9A-Za-z!#$%&()*+;<=>?@^_`{|}~-]{20}" \&\f(CW\*(C`9R}vSQ9RqiCvG6zn?Zyh\*(C'\fR .Sp This encoding was given in \*(L"\s-1RFC1924\*(R"\s0 as an April Fool's joke. Output with \*(L"to_string_base85\*(R". .PP In addition, the following formats can be output: .IP "Arrays" 4 .IX Item "Arrays" An IPv6 can be processed into its component pieces with \*(L"to_array\*(R" or \*(L"to_intarray\*(R". .IP "Reverse-address pointer" 4 .IX Item "Reverse-address pointer" An IPv6 can be processed into its reverse-address pointer, as defined by \*(L"\s-1RFC1886\*(R"\s0, using \*(L"to_string_ip6_int\*(R". .SH "METHODS AND FUNCTIONS" .IX Header "METHODS AND FUNCTIONS" The methods and functions are listed in alphabetical order. All except \&\*(L"new\*(R" serve as both object methods and standalone functions. .SS "from_bigint" .IX Subsection "from_bigint" .Vb 2 \& use Net::IPv6Addr \*(Aqfrom_bigint\*(Aq; \& print from_bigint (\*(Aq12345678901234567890\*(Aq)\->to_string_compressed (); .Ve .PP produces output .PP .Vb 1 \& ::ab54:a98c:eb1f:ad2 .Ve .PP (This example is included as \fIfrom\-bigint.pl\fR in the distribution.) .PP Given a string or a Math::BigInt object containing a number, this converts it into a Net::IPv6Addr object. .PP \fIParameters\fR .IX Subsection "Parameters" .PP A string or a Math::BigInt object. If the input is a scalar, it's converted into a Math::BigInt object. .PP \fIReturns\fR .IX Subsection "Returns" .PP A Net::IPv6Addr object .PP \fINotes\fR .IX Subsection "Notes" .PP Invalid input will generate an exception. .PP This function was added in \*(L"0.95\*(R". .SS "in_network" .IX Subsection "in_network" .Vb 5 \& use Net::IPv6Addr; \& my $obj = Net::IPv6Addr\->new (\*(Aqdead:beef:cafe:babe:dead:beef:cafe:babe\*(Aq); \& if ($obj\->in_network (\*(Aqdead:beef:ca0::/21\*(Aq)) { \& print $obj\->to_string_compressed, " is in network.\en"; \& } .Ve .PP produces output .PP .Vb 1 \& dead:beef:cafe:babe:dead:beef:cafe:babe is in network. .Ve .PP (This example is included as \fIinet.pl\fR in the distribution.) .PP \fIParameters\fR .IX Subsection "Parameters" .PP If used as an object method, a network and its size in bits .PP .Vb 1 \& my $ok = $x\->in_network ("aa:bb:cc:dd::", 64); .Ve .PP If used as a subroutine, an IPv6 address string in any format, followed by a network address string and its size in bits. .PP .Vb 2 \& my $addr = \*(Aqfd00::54:20c:29fe:fe14:ab4b\*(Aq; \& my $ok = Net::IPv6Addr::in_network ($addr, "aa:bb:cc:dd::", 64); .Ve .PP The network size may also be given with the / notation after the network address string: .PP .Vb 1 \& my $ok = $x\->in_network("aa:bb:cc:dd::/64"); .Ve .PP \fIReturns\fR .IX Subsection "Returns" .PP A true value if the address \f(CW$x\fR is a member of the network given as the argument, or false otherwise. .PP \fINotes\fR .IX Subsection "Notes" .PP Invalid input will generate an exception. .PP Prior to version \*(L"0.9\*(R", this did not work correctly unless the net size was a multiple of sixteen. .SS "in_network_of_size" .IX Subsection "in_network_of_size" .Vb 3 \& use Net::IPv6Addr \*(Aqin_network_of_size\*(Aq; \& my $obj = in_network_of_size (\*(Aqdead:beef:cafe:babe:dead:beef:cafe:babe\*(Aq, 42); \& print $obj\->to_string_compressed (); .Ve .PP produces output .PP .Vb 1 \& dead:beef:cac0:: .Ve .PP (This example is included as \fIinos.pl\fR in the distribution.) .PP Given an input IPv6 address \f(CW$x\fR, this returns the \f(CW$n\fR most-significant bits of \f(CW$x\fR as a new Net::IPv6Addr object. .PP \fIParameters\fR .IX Subsection "Parameters" .PP If used as an object method, network size in bits: .PP .Vb 1 \& my $obj = $x\->in_network_of_size (64); .Ve .PP If used as a subroutine, an IPv6 address string in any format and a network size in bits: .PP .Vb 1 \& my $obj = in_network_of_size ($addr, 64); .Ve .PP Network size may also be given with \f(CW\*(C`/\*(C'\fR notation: .PP .Vb 1 \& my $obj = in_network_of_size ("$addr/64"); .Ve .PP \fIReturns\fR .IX Subsection "Returns" .PP The \f(CW$n\fR most-significant bits of \f(CW$x\fR as a new Net::IPv6Addr object. .PP \fINotes\fR .IX Subsection "Notes" .PP Invalid input will generate an exception. .PP Prior to version \*(L"0.9\*(R", this did not work correctly unless the net size was a multiple of sixteen. .SS "ipv6_chkip" .IX Subsection "ipv6_chkip" .Vb 1 \& my $niok = ipv6_chkip (\*(Aqdead:beef:cafe:babe::f0ad\*(Aq); .Ve .PP \fIParameters\fR .IX Subsection "Parameters" .PP An IPv6 address string, without a prefix. .PP \fIReturns\fR .IX Subsection "Returns" .PP A true value (a code reference for the parser for this \s-1IP\s0) if it's a valid address; a false value (\f(CW\*(C`undef\*(C'\fR) if not. .SS "ipv6_parse" .IX Subsection "ipv6_parse" .Vb 1 \& my ($ni, $pl) = ipv6_parse (\*(Aqdead:beef:cafe:babe::f0ad\*(Aq); .Ve .PP \fIParameters\fR .IX Subsection "Parameters" .PP Either a string containing an IPv6 address string, which may also include a \f(CW\*(C`/\*(C'\fR character and a numeric prefix length, .PP .Vb 1 \& my ($x, $y) = ipv6_parse ("a::/24"); .Ve .PP or an IPv6 address string, with an optional second argument consisting of a numeric prefix length: .PP .Vb 1 \& my ($x, $y) = ipv6_parse(\*(Aqa::\*(Aq, \*(Aq24\*(Aq); .Ve .PP \fIReturns\fR .IX Subsection "Returns" .PP Called in array context, the return value is a list consisting of the address string and the prefix, if it parses correctly. Called in scalar context, the address and prefix are concatenated with \*(L"/\*(R". .PP \fINotes\fR .IX Subsection "Notes" .PP Throws an exception on malformed input. .SS "is_ipv6" .IX Subsection "is_ipv6" .Vb 1 \& my $niok = is_ipv6 (\*(Aqdead:beef:cafe:babe::f0ad\*(Aq); .Ve .PP \fIParameters\fR .IX Subsection "Parameters" .PP Identical to \*(L"ipv6_parse\*(R". .PP \fIReturns\fR .IX Subsection "Returns" .PP This returns the return value of \*(L"ipv6_parse\*(R", called in scalar context, if it does parse out correctly, otherwise it returns \&\f(CW\*(C`undef\*(C'\fR. Unlike \*(L"ipv6_parse\*(R", \f(CW\*(C`is_ipv6\*(C'\fR does not throw exceptions. .SS "new" .IX Subsection "new" .Vb 1 \& my $ni = Net::IPv6Addr\->new (\*(Aqdead:beef:cafe:babe::f0ad\*(Aq); .Ve .PP Create a new Net::IPv6Addr object from a string. Internally, the object is a blessed array reference containing the eight parts of the address as integers. .PP \fIParameters\fR .IX Subsection "Parameters" .PP A string to be interpreted as an IPv6 address. .PP \fIReturns\fR .IX Subsection "Returns" .PP A \f(CW\*(C`Net::IPv6Addr\*(C'\fR object if successful. .PP \fINotes\fR .IX Subsection "Notes" .PP Throws an exception if the string isn't a valid address. .SS "to_array" .IX Subsection "to_array" .Vb 5 \& use Net::IPv6Addr \*(Aqto_array\*(Aq; \& my @int = to_array (\*(Aqdead::beef\*(Aq); \& my $ipobj = Net::IPv6Addr\->new (\*(Aqdead::beef\*(Aq); \& my @int2 = $ipobj\->to_array (); \& print "@int\en@int2\en"; .Ve .PP produces output .PP .Vb 2 \& dead 0000 0000 0000 0000 0000 0000 beef \& dead 0000 0000 0000 0000 0000 0000 beef .Ve .PP (This example is included as \fIarray.pl\fR in the distribution.) .PP Convert an IPv6 address into an array of eight hexadecimal numbers. .PP \fIParameters\fR .IX Subsection "Parameters" .PP If used as an object method, none; if used as a subroutine, an IPv6 address string in any format. .PP \fIReturns\fR .IX Subsection "Returns" .PP An array [0..7] of 16\-bit hexadecimal numbers (strings). .PP \fINotes\fR .IX Subsection "Notes" .PP Invalid input will generate an exception. .PP See also \*(L"to_intarray\*(R" and \*(L"to_bigint\*(R". .SS "to_bigint" .IX Subsection "to_bigint" .Vb 5 \& use Net::IPv6Addr \*(Aqto_bigint\*(Aq; \& my $int = to_bigint (\*(Aqdead::beef\*(Aq); \& my $ipobj = Net::IPv6Addr\->new (\*(Aqdead::beef\*(Aq); \& my $int2 = $ipobj\->to_bigint (); \& print "$int\en$int2\en"; .Ve .PP produces output .PP .Vb 2 \& 295986882420777848964380943247191621359 \& 295986882420777848964380943247191621359 .Ve .PP (This example is included as \fIbigint.pl\fR in the distribution.) .PP Convert an IPv6 address into a Math::BigInt object containing the \&\s-1IP\s0 address as a single number. .PP \fIParameters\fR .IX Subsection "Parameters" .PP If used as an object method, none; if used as a subroutine, an IPv6 address string in any format. .PP \fIReturns\fR .IX Subsection "Returns" .PP The BigInt representation of the given IPv6 address. .PP \fINotes\fR .IX Subsection "Notes" .PP Invalid input will generate an exception. .PP See also \*(L"from_bigint\*(R", \*(L"to_intarray\*(R" and \*(L"to_array\*(R". .SS "to_intarray" .IX Subsection "to_intarray" .Vb 5 \& use Net::IPv6Addr \*(Aqto_array\*(Aq; \& my @int = to_array (\*(Aqdead::beef\*(Aq); \& my $ipobj = Net::IPv6Addr\->new (\*(Aqdead::beef\*(Aq); \& my @int2 = $ipobj\->to_array (); \& print "@int\en@int2\en"; .Ve .PP produces output .PP .Vb 2 \& dead 0000 0000 0000 0000 0000 0000 beef \& dead 0000 0000 0000 0000 0000 0000 beef .Ve .PP (This example is included as \fIarray.pl\fR in the distribution.) .PP Convert an IPv6 address into an array of eight integer numbers. .PP \fIParameters\fR .IX Subsection "Parameters" .PP If used as an object method, none; if used as a subroutine, an IPv6 address string in any format. .PP \fIReturns\fR .IX Subsection "Returns" .PP An array [0..7] of numbers. .PP \fINotes\fR .IX Subsection "Notes" .PP Invalid input will generate an exception. .PP See also \*(L"to_array\*(R" and \*(L"to_bigint\*(R". .SS "to_string_base85" .IX Subsection "to_string_base85" \fIParameters\fR .IX Subsection "Parameters" .PP If used as an object method, none; if used as a subroutine, an IPv6 address string in any format. .PP \fIReturns\fR .IX Subsection "Returns" .PP The IPv6 address in the style detailed by \*(L"\s-1RFC1924\*(R"\s0. .PP \fINotes\fR .IX Subsection "Notes" .PP Invalid input will generate an exception. .PP The base 85 encoding described in \*(L"\s-1RFC1924\*(R"\s0 was an April Fool's joke. .SS "to_string_compressed" .IX Subsection "to_string_compressed" .Vb 2 \& use Net::IPv6Addr \*(Aqto_string_compressed\*(Aq; \& print to_string_compressed (\*(Aqdead:beef:0000:0000:0000:0000:cafe:babe\*(Aq); .Ve .PP produces output .PP .Vb 1 \& dead:beef::cafe:babe .Ve .PP (This example is included as \fIcompressed.pl\fR in the distribution.) .PP This provides the \*(L"canonical text representation format\*(R" of \&\*(L"\s-1RFC5952\*(R"\s0. .PP \fIParameters\fR .IX Subsection "Parameters" .PP If used as an object method, none; if used as a subroutine, an IPv6 address string in any format. .PP \fIReturns\fR .IX Subsection "Returns" .PP The IPv6 address in the \*(L"compressed\*(R" (\*(L"\s-1RFC1884\*(R"\s0 et al.) or \&\*(L"canonical\*(R" (\*(L"\s-1RFC5952\*(R"\s0) format. Hexadecimal numbers are reduced to lower case, consecutive zero elements are reduced to double colons, and leading zeros are removed from strings of hexadecimal digits. All treatment of ambiguities is as per \s-1RFC5952.\s0 (See \&\fIt/rfc5952.t\fR for tests.) .PP \fINotes\fR .IX Subsection "Notes" .PP Invalid input will generate an exception. .SS "to_string_ip6_int" .IX Subsection "to_string_ip6_int" .Vb 5 \& use Net::IPv6Addr \*(Aqto_string_ip6_int\*(Aq; \& my $s = to_string_ip6_int (\*(Aqdead::beef\*(Aq); \& my $ipobj = Net::IPv6Addr\->new (\*(Aqdead::beef\*(Aq); \& my $s2 = $ipobj\->to_string_ip6_int (); \& print "$s\en$s2\en"; .Ve .PP produces output .PP .Vb 2 \& f.e.e.b.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.a.e.d.IP6.INT. \& f.e.e.b.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.a.e.d.IP6.INT. .Ve .PP (This example is included as \fIstring\-ip6\-int.pl\fR in the distribution.) .PP \fIParameters\fR .IX Subsection "Parameters" .PP If used as an object method, none; if used as a subroutine, an IPv6 address string in any format. .PP \fIReturns\fR .IX Subsection "Returns" .PP The reverse-address pointer as defined by \*(L"\s-1RFC1886\*(R"\s0. .PP \fINotes\fR .IX Subsection "Notes" .PP Invalid input will generate an exception. .PP The reverse process of converting these into Net::IPv6Addr objects is not supported. .SS "to_string_ipv4" .IX Subsection "to_string_ipv4" .Vb 2 \& use Net::IPv6Addr \*(Aq:all\*(Aq; \& print to_string_ipv4_compressed (\*(Aqdead:beef:0:3:2:1:cafe:babe\*(Aq); .Ve .PP produces output .PP .Vb 1 \& dead:beef::3:2:1:202.254.186.190 .Ve .PP (This example is included as \fIto\-string\-ipv4.pl\fR in the distribution.) .PP \fIParameters\fR .IX Subsection "Parameters" .PP If used as an object method, none; if used as a subroutine, an IPv6 address string in any format. .PP \fIReturns\fR .IX Subsection "Returns" .PP The IPv6 address in the IPv4 format detailed by \*(L"\s-1RFC1884\*(R"\s0 et al. .PP \fINotes\fR .IX Subsection "Notes" .PP When used as a subroutine, invalid input will generate an exception. .PP From version \*(L"0.95\*(R", this allows any IPv6 address to be produced, not just the restricted forms allowed previously. .SS "to_string_ipv4_compressed" .IX Subsection "to_string_ipv4_compressed" .Vb 2 \& use Net::IPv6Addr \*(Aq:all\*(Aq; \& print to_string_ipv4_compressed (\*(Aqdead:beef:0:3:2:1:cafe:babe\*(Aq); .Ve .PP produces output .PP .Vb 1 \& dead:beef::3:2:1:202.254.186.190 .Ve .PP (This example is included as \fIto\-string\-ipv4\-comp.pl\fR in the distribution.) .PP \fIParameters\fR .IX Subsection "Parameters" .PP If used as an object method, none; if used as a subroutine, an IPv6 address string in any format. .PP \fIReturns\fR .IX Subsection "Returns" .PP The IPv6 address in the compressed IPv4 format detailed by \&\*(L"\s-1RFC1884\*(R"\s0 et al. .PP \fINotes\fR .IX Subsection "Notes" .PP When used as a subroutine, invalid input will generate an exception. .PP From version \*(L"0.95\*(R", this allows any IPv6 address to be produced, not just the restricted forms allowed previously. .SS "to_string_preferred" .IX Subsection "to_string_preferred" .Vb 2 \& use Net::IPv6Addr \*(Aqto_string_preferred\*(Aq; \& print to_string_preferred (\*(Aqdead:beef:cafe:babe::f0ad\*(Aq); .Ve .PP produces output .PP .Vb 1 \& dead:beef:cafe:babe:0:0:0:f0ad .Ve .PP (This example is included as \fIpreferred.pl\fR in the distribution.) .PP \fIParameters\fR .IX Subsection "Parameters" .PP If used as an object method, none; if used as a subroutine, an IPv6 address string in any format. .PP \fIReturns\fR .IX Subsection "Returns" .PP The IPv6 address, formatted in the \*(L"preferred\*(R" way (as detailed by \&\*(L"\s-1RFC1884\*(R"\s0 et al). .PP \fINotes\fR .IX Subsection "Notes" .PP Invalid input will generate an exception. .SH "EXPORTS" .IX Header "EXPORTS" As of version 1.02, \*(L"from_bigint\*(R", \*(L"in_network\*(R", \*(L"in_network_of_size\*(R", \*(L"ipv6_chkip\*(R", \*(L"ipv6_parse\*(R", \*(L"is_ipv6\*(R", \*(L"to_array\*(R", \*(L"to_bigint\*(R", \*(L"to_intarray\*(R", \*(L"to_string_base85\*(R", \*(L"to_string_compressed\*(R", \*(L"to_string_ip6_int\*(R", \*(L"to_string_ipv4\*(R", \*(L"to_string_ipv4_compressed\*(R", \*(L"to_string_preferred\*(R" may be exported on demand. All the exported functions may be exported using .PP .Vb 1 \& use Net::IPv6Addr \*(Aq:all\*(Aq; .Ve .SH "DEPENDENCIES" .IX Header "DEPENDENCIES" .IP "Math::BigInt" 4 .IX Item "Math::BigInt" This is used by \*(L"to_bigint\*(R" and \*(L"from_bigint\*(R". .SS "Reverse dependencies" .IX Subsection "Reverse dependencies" Search grep.cpan.me for uses of this module .SH "SEE ALSO" .IX Header "SEE ALSO" .SS "RFCs" .IX Subsection "RFCs" The following RFCs (requests for comment, internet standards documentation) contain information on IPv6. .PP \fIAddressing Architecture series\fR .IX Subsection "Addressing Architecture series" .PP These are all the same standard, with updates. The most recent one is the active one. .IP "\s-1RFC1884\s0 " 4 .IX Item "RFC1884 " \&\fIIPv6 Addressing Architecture\fR \- December 1995 .IP "\s-1RFC2373\s0 " 4 .IX Item "RFC2373 " \&\fI\s-1IP\s0 Version 6 Addressing Architecture\fR \- July 1998 .IP "\s-1RFC3513\s0 " 4 .IX Item "RFC3513 " \&\fIInternet Protocol Version 6 (IPv6) Addressing Architecture\fR \- April 2003 .IP "\s-1RFC4291\s0 " 4 .IX Item "RFC4291 " \&\fI\s-1IP\s0 Version 6 Addressing Architecture\fR \- February 2006 .PP \fIOther\fR .IX Subsection "Other" .IP "\s-1RFC1886\s0 " 4 .IX Item "RFC1886 " \&\fI\s-1DNS\s0 Extensions to support \s-1IP\s0 version 6\fR \- December 1995 .IP "\s-1RFC1924\s0 " 4 .IX Item "RFC1924 " \&\fIA Compact Representation of IPv6 Addresses\fR \- 1 April 1996 .Sp This was an April Fool's joke. .IP "\s-1RFC5952\s0 " 4 .IX Item "RFC5952 " \&\fIA Recommendation for IPv6 Address Text Representation\fR \- August 2010 .Sp This contains a \*(L"recommendation for a canonical text representation format of IPv6 addresses\*(R" which corresponds to the output of \&\*(L"to_string_compressed\*(R" in this module. .PP The links go to the plain text online versions of the RFCs. .SS "Other \s-1CPAN\s0 modules" .IX Subsection "Other CPAN modules" There are a very large number of \s-1CPAN\s0 modules which deal with IPv6 addresses. The following list gives all the ones I know about which overlap with this module, in alphabetical order. .IP "Data::Validate::IP" 4 .IX Item "Data::Validate::IP" This module uses Socket to validate \s-1IP\s0 addresses. It offers a number of facilities for special-purpose sub networks, like \&\f(CW\*(C`is_discard_ipv6\*(C'\fR, which are not offered in Net::IPv6Addr. .IP "IPv6::Address" 4 .IX Item "IPv6::Address" Its description says \*(L"A pure Perl IPv6 address manipulation library. Emphasis on manipulation of prefixes and addresses.\*(R" .Sp It insists on having a prefix with the \s-1IP\s0 address, so .Sp .Vb 1 \& my $ipv6 = IPv6::Address\->new (\*(Aq2001:0:0:1:0:0:0:1\*(Aq); .Ve .Sp actually fails, you have to use .Sp .Vb 1 \& my $ipv6 = IPv6::Address\->new (\*(Aq2001:0:0:1:0:0:0:1/64\*(Aq); .Ve .IP "Net::IP" 4 .IX Item "Net::IP" Features binary IPs (strings like '101001'), etc. .IP "Net::IP::Minimal" 4 .IX Item "Net::IP::Minimal" It's a simplified version of \*(L"Net::IP\*(R". .IP "Net::IPAddress::Util" 4 .IX Item "Net::IPAddress::Util" It's a \*(L"Version-agnostic representation of an \s-1IP\s0 address\*(R". I have not tried this module. .IP "Net::IPv6Address" 4 .IX Item "Net::IPv6Address" This module is broken and strongly not recommended. .IP "NetAddr::IP" 4 .IX Item "NetAddr::IP" .PD 0 .IP "NetAddr::IP::Lite" 4 .IX Item "NetAddr::IP::Lite" .PD These are two things in the same distribution. The documentation is quite offputting, but there are a lot of users of the module and stars on metacpan. .IP "Regexp::IPv6" 4 .IX Item "Regexp::IPv6" This module consists of a regex for validating IPv6s. Because this module had a lot more and better tests than Net::IPv6Addr, I included the tests and one regex from \f(CW\*(C`Regexp::IPv6\*(C'\fR in this module. (See \&\fIt/Regexp\-IPv6.t\fR ) Unlike \f(CW\*(C`Net::IPv6Addr\*(C'\fR, \&\f(CW\*(C`Regexp::IPv6\*(C'\fR disallows \f(CW\*(C`::\*(C'\fR, \*(L"the unspecified addresses\*(R". See the module's documentation for details. .SS "Other" .IX Subsection "Other" .IP "Online validator" 4 .IX Item "Online validator" .SH "HISTORY" .IX Header "HISTORY" This module was originally written by Tony Monroe in 2001 to simplify the task of maintaining \s-1DNS\s0 records after he set himself up with Freenet6. .PP In 2017 the module was adopted by Ben Bullock with the help of Neil Bowers as part of \*(L"\s-1CPAN\s0 day\*(R". Significant changes to the module since then include the following: .IP "1.02" 4 .IX Item "1.02" Net::IPv4Addr dependence removed. This module suffered from the \&\*(L"octal bug\*(R". This module had only been used to validate ipv4 addresses and was easy to remove. .Sp Math::Base85 dependence removed. This module is only needed to support the April Fool's joke method of IPv6 addresses, so if the user doesn't already have Math::Base85, the module now disables support for the April Fool addresses. .IP "1.0" 4 .IX Item "1.0" Checking of base 85 addresses and prefixes was made stricter in response to user complaints. .IP "0.95" 4 .IX Item "0.95" The \*(L"from_bigint\*(R" method was added and the documentation updated to reflect the current internet standards. .Sp The restriction on mixed address inputs removed in \*(L"0.92\*(R" was also removed in the output routines \*(L"to_string_ipv4\*(R" and \&\*(L"to_string_ipv4_compressed\*(R". .IP "0.92" 4 .IX Item "0.92" The valid format consisting of a compressed-but-non-zero six-element IPv6 followed by an IPv4, such as \f(CW\*(C`fe80::204:61ff:254.157.241.86\*(C'\fR, is accepted by the module. .IP "0.9" 4 .IX Item "0.9" \&\*(L"in_network\*(R" and \*(L"in_network_of_size\*(R" were fixed to allow more kinds of previxes. .IP "0.8" 4 .IX Item "0.8" Exporting of some functions was added. Prior to this, everything had to be done fully-qualified, as in \&\f(CW\*(C`Net::IPv6Addr::to_string_compressed\*(C'\fR. .SH "AUTHOR" .IX Header "AUTHOR" Tony Monroe(*) .PP The module's interface resembles Net::IPv4Addr by Francis J. Lacoste . .PP Some fixes and subroutines from Jyrki Soini . .PP (*) The current module maintainer (\s-1BKB\s0) does not have any contact information for Tony Monroe. Those wishing to contact him can do so via Neil Bowers (see his \s-1CPAN\s0 user page for contact details ). .SH "LICENSE" .IX Header "LICENSE" This distribution is copyright (c) 2001\-2002 Tony Monroe. All rights reserved. This software is distributed under the same license terms as Perl itself. This software comes with \s-1NO WARRANTIES WHATSOEVER,\s0 express, implied, or otherwise.