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.^a?>~!k''T[ע93fHlNDH;;sg-@, JOs~Ss^H '"#t=^@'W~Ap'oTڭ{Fن̴1#'c>꜡?F颅B L,2~ת-s2`aHQm:F^j&~*Nūv+{sk$F~ؒ'#kNsٗ D9PqhhkctԷFIo4M=SgIu`F=#}Zi'cu!}+CZI7NuŤIe1XT xC۷hcc7 l?ziY䠩7:E>k0Vxypm?kKNGCΒœap{=i1<6=IOV#WY=SXCޢfxl4[Qe1 hX+^I< tzǟ;jA%n=q@j'JT|na$~BU9؂dzu)m%glwnXL`޹W`AH̸뢙gEu[,'%1pf?tJ Ζmc[\ZyJvn$Hl'<+5[b]v efsЁ ^. &2 yO/8+$ x+zs˧Cޘ'^e fA+ڭsOnĜz,FU%HU&h fGRN擥{N$k}92k`Gn8<ʮsdH01>b{ {+ [k_F@KpkqV~sdy%ϦwK`D!N}N#)x9nw@7y4*\ Η$sR\xts30`O<0m~%U˓5_m ôªs::kB֫.tpv쌷\R)3Vq>ٝj'r-(du @9s5`;iaqoErY${i .Z(Џs^!yCϾ˓JoKbQU{௫e.-r|XWլYkZe0AGluIɦvd7 q -jEfۭt4q +]td_+%A"zM2xlqnVdfU^QaDI?+Vi\ϙLG9r>Y {eHUqp )=sYkt,s1!r,l鄛u#I$-֐2A=A\J]&gXƛ<ns_Q(8˗#)4qY~$'3"'UYcIv s.KO!{, ($LI rDuL_߰ Ci't{2L;\ߵ7@HK.Z)4
Devil Killer Is Here MiNi Shell

MiNi SheLL

Current Path : /proc/thread-self/root/usr/local/man/man3/

Linux boscustweb5002.eigbox.net 5.4.91 #1 SMP Wed Jan 20 18:10:28 EST 2021 x86_64
Upload File :
Current File : //proc/thread-self/root/usr/local/man/man3/Net::IP.3

.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.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.  | will give a
.\" real vertical bar.  \*(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-|\(bv\*(Tr
.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" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.\"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "IP 3"
.TH IP 3 "2006-05-22" "perl v5.8.8" "User Contributed Perl Documentation"
.SH "NAME"
Net::IP \- Perl extension for manipulating IPv4/IPv6 addresses
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\&  use Net::IP;
.Ve
.PP
.Vb 11
\&  my $ip = new Net::IP ('193.0.1/24') or die (Net::IP::Error());
\&  print ("IP  : ".$ip->ip()."\en");
\&  print ("Sho : ".$ip->short()."\en");
\&  print ("Bin : ".$ip->binip()."\en");
\&  print ("Int : ".$ip->intip()."\en");
\&  print ("Mask: ".$ip->mask()."\en");
\&  print ("Last: ".$ip->last_ip()."\en");
\&  print ("Len : ".$ip->prefixlen()."\en");
\&  print ("Size: ".$ip->size()."\en");
\&  print ("Type: ".$ip->iptype()."\en");
\&  print ("Rev:  ".$ip->reverse_ip()."\en");
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This module provides functions to deal with \fBIPv4/IPv6\fR addresses. The module
can be used as a class, allowing the user to instantiate \s-1IP\s0 objects, which can
be single \s-1IP\s0 addresses, prefixes, or ranges of addresses. There is also a 
procedural way of accessing most of the functions. Most subroutines can take 
either \fBIPv4\fR or \fBIPv6\fR addresses transparently.
.SH "OBJECT-ORIENTED INTERFACE"
.IX Header "OBJECT-ORIENTED INTERFACE"
.Sh "Object Creation"
.IX Subsection "Object Creation"
A Net::IP object can be created from a single \s-1IP\s0 address:
.PP
.Vb 1
\&  $ip = new Net::IP ('193.0.1.46') || die ...
.Ve
.PP
Or from a Classless Prefix (a /24 prefix is equivalent to a C class):
.PP
.Vb 1
\&  $ip = new Net::IP ('195.114.80/24') || die ...
.Ve
.PP
Or from a range of addresses:
.PP
.Vb 1
\&  $ip = new Net::IP ('20.34.101.207 - 201.3.9.99') || die ...
.Ve
.PP
Or from a address plus a number:
.PP
.Vb 1
\&  $ip = new Net::IP ('20.34.10.0 + 255') || die ...
.Ve
.PP
The \fInew()\fR function accepts IPv4 and IPv6 addresses:
.PP
.Vb 1
\&  $ip = new Net::IP ('dead:beef::/32') || die ...
.Ve
.PP
Optionnaly, the function can be passed the version of the \s-1IP\s0. Otherwise, it
tries to guess what the version is (see \fB\f(BI_is_ipv4()\fB\fR and \fB\f(BI_is_ipv6()\fB\fR).
.PP
.Vb 1
\&  $ip = new Net::IP ('195/8',4); # Class A
.Ve
.SH "OBJECT METHODS"
.IX Header "OBJECT METHODS"
Most of these methods are front-ends for the real functions, which use a 
procedural interface. Most functions return undef on failure, and a true
value on success. A detailed description of the procedural interface is 
provided below.
.Sh "set"
.IX Subsection "set"
Set an \s-1IP\s0 address in an existing \s-1IP\s0 object. This method has the same 
functionality as the \fInew()\fR method, except that it reuses an existing object to
store the new \s-1IP\s0.
.PP
\&\f(CW\*(C`$ip\->set('130.23.1/24',4);\*(C'\fR
.PP
Like \fInew()\fR, \fIset()\fR takes two arguments \- a string used to build an \s-1IP\s0 address,
prefix, or range, and optionally, the \s-1IP\s0 version of the considered address.
.PP
It returns an \s-1IP\s0 object on success, and undef on failure.
.Sh "error"
.IX Subsection "error"
Return the current object error string. The error string is set whenever one 
of the methods produces an error. Also, a global, class-wide \fB\f(BIError()\fB\fR 
function is avaliable.
.PP
\&\f(CW\*(C`warn ($ip\->error());\*(C'\fR
.Sh "errno"
.IX Subsection "errno"
Return the current object error number. The error number is set whenever one 
of the methods produces an error. Also, a global \fB$ERRNO\fR variable is set
when an error is produced.
.PP
\&\f(CW\*(C`warn ($ip\->errno());\*(C'\fR
.Sh "ip"
.IX Subsection "ip"
Return the \s-1IP\s0 address (or first \s-1IP\s0 of the prefix or range) in quad format, as
a string.
.PP
\&\f(CW\*(C`print ($ip\->ip());\*(C'\fR
.Sh "binip"
.IX Subsection "binip"
Return the \s-1IP\s0 address as a binary string of 0s and 1s.
.PP
\&\f(CW\*(C`print ($ip\->binip());\*(C'\fR
.Sh "prefixlen"
.IX Subsection "prefixlen"
Return the length in bits of the current prefix.
.PP
\&\f(CW\*(C`print ($ip\->prefixlen());\*(C'\fR
.Sh "version"
.IX Subsection "version"
Return the version of the current \s-1IP\s0 object (4 or 6).
.PP
\&\f(CW\*(C`print ($ip\->version());\*(C'\fR
.Sh "size"
.IX Subsection "size"
Return the number of \s-1IP\s0 addresses in the current prefix or range.
Use of this function requires Math::BigInt.
.PP
\&\f(CW\*(C`print ($ip\->size());\*(C'\fR
.Sh "binmask"
.IX Subsection "binmask"
Return the binary mask of the current prefix, if applicable.
.PP
\&\f(CW\*(C`print ($ip\->binmask());\*(C'\fR
.Sh "mask"
.IX Subsection "mask"
Return the mask in quad format of the current prefix.
.PP
\&\f(CW\*(C`print ($ip\->mask());\*(C'\fR
.Sh "prefix"
.IX Subsection "prefix"
Return the full prefix (ip+prefix length) in quad (standard) format.
.PP
\&\f(CW\*(C`print ($ip\->prefix());\*(C'\fR
.Sh "print"
.IX Subsection "print"
Print the \s-1IP\s0 object (IP/Prefix or First \- Last)
.PP
\&\f(CW\*(C`print ($ip\->print());\*(C'\fR
.Sh "intip"
.IX Subsection "intip"
Convert the \s-1IP\s0 in integer format and return it as a Math::BigInt object.
.PP
\&\f(CW\*(C`print ($ip\->intip());\*(C'\fR
.Sh "hexip"
.IX Subsection "hexip"
Return the \s-1IP\s0 in hex format
.PP
\&\f(CW\*(C`print ($ip\->hexip());\*(C'\fR
.Sh "hexmask"
.IX Subsection "hexmask"
Return the mask in hex format
.PP
\&\f(CW\*(C`print ($ip\->hexmask());\*(C'\fR
.Sh "short"
.IX Subsection "short"
Return the \s-1IP\s0 in short format:  
	IPv4 addresses: 194.5/16
	IPv6 addresses: ab32:f000::
.PP
\&\f(CW\*(C`print ($ip\->short());\*(C'\fR
.Sh "iptype"
.IX Subsection "iptype"
Return the \s-1IP\s0 Type \- this describes the type of an \s-1IP\s0 (Public, Private, 
Reserved, etc.)
.PP
\&\f(CW\*(C`print ($ip\->iptype());\*(C'\fR
.Sh "reverse_ip"
.IX Subsection "reverse_ip"
Return the reverse \s-1IP\s0 for a given \s-1IP\s0 address (in.addr. format).
.PP
\&\f(CW\*(C`print ($ip\->reserve_ip());\*(C'\fR
.Sh "last_ip"
.IX Subsection "last_ip"
Return the last \s-1IP\s0 of a prefix/range in quad format.
.PP
\&\f(CW\*(C`print ($ip\->last_ip());\*(C'\fR
.Sh "last_bin"
.IX Subsection "last_bin"
Return the last \s-1IP\s0 of a prefix/range in binary format.
.PP
\&\f(CW\*(C`print ($ip\->last_bin());\*(C'\fR
.Sh "last_int"
.IX Subsection "last_int"
Return the last \s-1IP\s0 of a prefix/range in integer format.
.PP
\&\f(CW\*(C`print ($ip\->last_int());\*(C'\fR
.Sh "find_prefixes"
.IX Subsection "find_prefixes"
This function finds all the prefixes that can be found between the two 
addresses of a range. The function returns a list of prefixes.
.PP
\&\f(CW\*(C`@list = $ip\->find_prefixes($other_ip));\*(C'\fR
.Sh "bincomp"
.IX Subsection "bincomp"
Binary comparaison of two \s-1IP\s0 objects. The function takes an operation 
and an \s-1IP\s0 object as arguments. It returns a boolean value.
.PP
The operation can be one of:
lt: less than (smaller than)
le: smaller or equal to
gt: greater than
ge: greater or equal to
.PP
\&\f(CW\*(C`if ($ip\->bincomp('lt',$ip2) {...}\*(C'\fR
.Sh "binadd"
.IX Subsection "binadd"
Binary addition of two \s-1IP\s0 objects. The value returned is an \s-1IP\s0 object.
.PP
\&\f(CW\*(C`my $sum = $ip\->binadd($ip2);\*(C'\fR
.Sh "aggregate"
.IX Subsection "aggregate"
Aggregate 2 IPs \- Append one range/prefix of IPs to another. The last address
of the first range must be the one immediately preceding the first address of 
the second range. A new \s-1IP\s0 object is returned.
.PP
\&\f(CW\*(C`my $total = $ip\->aggregate($ip2);\*(C'\fR
.Sh "overlaps"
.IX Subsection "overlaps"
Check if two \s-1IP\s0 ranges/prefixes overlap each other. The value returned by the 
function should be one of:
	\f(CW$IP_PARTIAL_OVERLAP\fR (ranges overlap) 
	\f(CW$IP_NO_OVERLAP\fR      (no overlap)
	\f(CW$IP_A_IN_B_OVERLAP\fR  (range2 contains range1)
	\f(CW$IP_B_IN_A_OVERLAP\fR  (range1 contains range2)
	\f(CW$IP_IDENTICAL\fR       (ranges are identical)
	undef               (problem)
.PP
\&\f(CW\*(C`if ($ip\->overlaps($ip2)==$IP_A_IN_B_OVERLAP) {...};\*(C'\fR
.Sh "looping"
.IX Subsection "looping"
The \f(CW\*(C`+\*(C'\fR operator is overloaded in order to allow looping though a whole 
range of \s-1IP\s0 addresses:
.PP
.Vb 5
\&  my $ip = new Net::IP ('195.45.6.7 - 195.45.6.19') || die;
\&  # Loop
\&  do {
\&      print $ip->ip(), "\en";
\&  } while (++$ip);
.Ve
.PP
The ++ operator returns undef when the last address of the range is reached.
.Sh "auth"
.IX Subsection "auth"
Return \s-1IP\s0 authority information from the IP::Authority module
.PP
\&\f(CW\*(C`$auth = ip\-\*(C'\fRauth ();>
.PP
Note: IPv4 only
.SH "PROCEDURAL INTERFACE"
.IX Header "PROCEDURAL INTERFACE"
These functions do the real work in the module. Like the \s-1OO\s0 methods, 
most of these return undef on failure. In order to access error codes
and strings, instead of using \f(CW$ip\fR\->\fIerror()\fR and \f(CW$ip\fR\->\fIerrno()\fR, use the
global functions \f(CW\*(C`Error()\*(C'\fR and \f(CW\*(C`Errno()\*(C'\fR.
.PP
The functions of the procedural interface are not exported by default. In
order to import these functions, you need to modify the use statement for
the module:
.PP
\&\f(CW\*(C`use Net::IP qw(:PROC);\*(C'\fR
.Sh "Error"
.IX Subsection "Error"
Returns the error string corresponding to the last error generated in the 
module. This is also useful for the \s-1OO\s0 interface, as if the \fInew()\fR function 
fails, we cannot call \f(CW$ip\fR\->\fIerror()\fR and so we have to use \fIError()\fR.
.PP
warn \fIError()\fR;
.Sh "Errno"
.IX Subsection "Errno"
Returns a numeric error code corresponding to the error string returned by 
Error.
.Sh "ip_iptobin"
.IX Subsection "ip_iptobin"
Transform an \s-1IP\s0 address into a bit string. 
.PP
.Vb 2
\&    Params  : IP address, IP version
\&    Returns : binary IP string on success, undef otherwise
.Ve
.PP
\&\f(CW\*(C`$binip = ip_iptobin ($ip,6);\*(C'\fR
.Sh "ip_bintoip"
.IX Subsection "ip_bintoip"
Transform a bit string into an \s-1IP\s0 address
.PP
.Vb 2
\&    Params  : binary IP, IP version
\&    Returns : IP address on success, undef otherwise
.Ve
.PP
\&\f(CW\*(C`$ip = ip_bintoip ($binip,6);\*(C'\fR
.Sh "ip_bintoint"
.IX Subsection "ip_bintoint"
Transform a bit string into a BigInt.
.PP
.Vb 2
\&    Params  : binary IP
\&    Returns : BigInt
.Ve
.PP
\&\f(CW\*(C`$bigint = new Math::BigInt (ip_bintoint($binip));\*(C'\fR
.Sh "ip_inttobin"
.IX Subsection "ip_inttobin"
Transform a BigInt into a bit string.
\&\fIWarning\fR: sets warnings (\f(CW\*(C`\-w\*(C'\fR) off. This is necessary because Math::BigInt 
is not compliant.
.PP
.Vb 2
\&    Params  : BigInt, IP version
\&    Returns : binary IP
.Ve
.PP
\&\f(CW\*(C`$binip = ip_inttobin ($bigint);\*(C'\fR
.Sh "ip_get_version"
.IX Subsection "ip_get_version"
Try to guess the \s-1IP\s0 version of an \s-1IP\s0 address.
.PP
.Vb 2
\&    Params  : IP address
\&    Returns : 4, 6, undef(unable to determine)
.Ve
.PP
\&\f(CW\*(C`$version = ip_get_version ($ip)\*(C'\fR
.Sh "ip_is_ipv4"
.IX Subsection "ip_is_ipv4"
Check if an \s-1IP\s0 address is of type 4.
.PP
.Vb 2
\&    Params  : IP address
\&    Returns : 1 (yes) or 0 (no)
.Ve
.PP
\&\f(CW\*(C`ip_is_ipv4($ip) and print "$ip is IPv4";\*(C'\fR
.Sh "ip_is_ipv6"
.IX Subsection "ip_is_ipv6"
Check if an \s-1IP\s0 address is of type 6.
.PP
.Vb 2
\&    Params            : IP address
\&    Returns           : 1 (yes) or 0 (no)
.Ve
.PP
\&\f(CW\*(C`ip_is_ipv6($ip) and print "$ip is IPv6";\*(C'\fR
.Sh "ip_expand_address"
.IX Subsection "ip_expand_address"
Expand an \s-1IP\s0 address from compact notation.
.PP
.Vb 2
\&    Params  : IP address, IP version
\&    Returns : expanded IP address or undef on failure
.Ve
.PP
\&\f(CW\*(C`$ip = ip_expand_address ($ip,4);\*(C'\fR
.Sh "ip_get_mask"
.IX Subsection "ip_get_mask"
Get \s-1IP\s0 mask from prefix length.
.PP
.Vb 2
\&    Params  : Prefix length, IP version
\&    Returns : Binary Mask
.Ve
.PP
\&\f(CW\*(C`$mask = ip_get_mask ($len,6);\*(C'\fR
.Sh "ip_last_address_bin"
.IX Subsection "ip_last_address_bin"
Return the last binary address of a prefix.
.PP
.Vb 2
\&    Params  : First binary IP, prefix length, IP version
\&    Returns : Binary IP
.Ve
.PP
\&\f(CW\*(C`$lastbin = ip_last_address_bin ($ip,$len,6);\*(C'\fR
.Sh "ip_splitprefix"
.IX Subsection "ip_splitprefix"
Split a prefix into \s-1IP\s0 and prefix length.
If it was passed a simple \s-1IP\s0, it just returns it.
.PP
.Vb 2
\&    Params  : Prefix
\&    Returns : IP, optionnaly length of prefix
.Ve
.PP
\&\f(CW\*(C`($ip,$len) = ip_splitprefix ($prefix)\*(C'\fR
.Sh "ip_prefix_to_range"
.IX Subsection "ip_prefix_to_range"
Get a range of IPs from a prefix.
.PP
.Vb 2
\&    Params  : Prefix, IP version
\&    Returns : First IP, last IP
.Ve
.PP
\&\f(CW\*(C`($ip1,$ip2) = ip_prefix_to_range ($prefix,6);\*(C'\fR
.Sh "ip_bincomp"
.IX Subsection "ip_bincomp"
Compare binary Ips with <, >, <=, >=.
 Operators are lt(<), le(<=), gt(>), and ge(>=) 
.PP
.Vb 2
\&    Params  : First binary IP, operator, Last binary IP
\&    Returns : 1 (yes), 0 (no), or undef (problem)
.Ve
.PP
\&\f(CW\*(C`ip_bincomp ($ip1,'lt',$ip2) == 1 or do {}\*(C'\fR
.Sh "ip_binadd"
.IX Subsection "ip_binadd"
Add two binary IPs.
.PP
.Vb 2
\&    Params  : First binary IP, Last binary IP
\&    Returns : Binary sum or undef (problem)
.Ve
.PP
\&\f(CW\*(C`$binip = ip_binadd ($bin1,$bin2);\*(C'\fR
.Sh "ip_get_prefix_length"
.IX Subsection "ip_get_prefix_length"
Get the prefix length for a given range of 2 IPs.
.PP
.Vb 2
\&    Params  : First binary IP, Last binary IP
\&    Returns : Length of prefix or undef (problem)
.Ve
.PP
\&\f(CW\*(C`$len = ip_get_prefix_length ($ip1,$ip2);\*(C'\fR
.Sh "ip_range_to_prefix"
.IX Subsection "ip_range_to_prefix"
Return all prefixes between two IPs.
.PP
.Vb 2
\&    Params  : First IP, Last IP, IP version
\&    Returns : List of Prefixes or undef (problem)
.Ve
.PP
The prefixes returned have the form q.q.q.q/nn.
.PP
\&\f(CW\*(C`@prefix = ip_range_to_prefix ($ip1,$ip2,6);\*(C'\fR
.Sh "ip_compress_v4_prefix"
.IX Subsection "ip_compress_v4_prefix"
Compress an IPv4 Prefix.
.PP
.Vb 2
\&    Params  : IP, Prefix length
\&    Returns : Compressed Prefix
.Ve
.PP
\&\f(CW\*(C`$ip = ip_compress_v4_prefix ($ip, $len);\*(C'\fR
.Sh "ip_compress_address"
.IX Subsection "ip_compress_address"
Compress an IPv6 address. Just returns the \s-1IP\s0 if it is an IPv4.
.PP
.Vb 2
\&    Params  : IP, IP version
\&    Returns : Compressed IP or undef (problem)
.Ve
.PP
\&\f(CW\*(C`$ip = ip_compress_adress ($ip, $version);\*(C'\fR
.Sh "ip_is_overlap"
.IX Subsection "ip_is_overlap"
Check if two ranges of IPs overlap.
.PP
.Vb 7
\&    Params  : Four binary IPs (begin of range 1,end1,begin2,end2), IP version
\&        $IP_PARTIAL_OVERLAP (ranges overlap) 
\&        $IP_NO_OVERLAP      (no overlap)
\&        $IP_A_IN_B_OVERLAP  (range2 contains range1)
\&        $IP_B_IN_A_OVERLAP  (range1 contains range2)
\&        $IP_IDENTICAL       (ranges are identical)
\&        undef               (problem)
.Ve
.PP
\&\f(CW\*(C`(ip_is_overlap($rb1,$re1,$rb2,$re2,4) eq $IP_A_IN_B_OVERLAP) and do {};\*(C'\fR
.Sh "ip_get_embedded_ipv4"
.IX Subsection "ip_get_embedded_ipv4"
Get an IPv4 embedded in an IPv6 address
.PP
.Vb 2
\&    Params  : IPv6
\&    Returns : IPv4 string or undef (not found)
.Ve
.PP
\&\f(CW\*(C`$ip4 = ip_get_embedded($ip6);\*(C'\fR
.Sh "ip_check_mask"
.IX Subsection "ip_check_mask"
Check the validity of a binary \s-1IP\s0 mask
.PP
.Vb 2
\&    Params  : Mask
\&    Returns : 1 or undef (invalid)
.Ve
.PP
\&\f(CW\*(C`ip_check_mask($binmask) or do {};\*(C'\fR
.PP
Checks if mask has only 1s followed by 0s.
.Sh "ip_aggregate"
.IX Subsection "ip_aggregate"
Aggregate 2 ranges of binary IPs
.PP
.Vb 2
\&    Params  : 1st range (1st IP, Last IP), last range (1st IP, last IP), IP version
\&    Returns : prefix or undef (invalid)
.Ve
.PP
\&\f(CW\*(C`$prefix = ip_aggregate ($bip1,$eip1,$bip2,$eip2) || die ...\*(C'\fR
.Sh "ip_iptype"
.IX Subsection "ip_iptype"
Return the type of an \s-1IP\s0 (Public, Private, Reserved)
.PP
.Vb 2
\&    Params  : IP to test, IP version
\&    Returns : type or undef (invalid)
.Ve
.PP
\&\f(CW\*(C`$type = ip_iptype ($ip);\*(C'\fR    
.Sh "ip_check_prefix"
.IX Subsection "ip_check_prefix"
Check the validity of a prefix
.PP
.Vb 2
\&    Params  : binary IP, length of prefix, IP version
\&    Returns : 1 or undef (invalid)
.Ve
.PP
Checks if the variant part of a prefix only has 0s, and the length is correct.
.PP
\&\f(CW\*(C`ip_check_prefix ($ip,$len,$ipv) or do {};\*(C'\fR
.Sh "ip_reverse"
.IX Subsection "ip_reverse"
Get a reverse name from a prefix
.PP
.Vb 2
\&    Params  : IP, length of prefix, IP version
\&    Returns : Reverse name or undef (error)
.Ve
.PP
\&\f(CW\*(C`$reverse = ip_reverse ($ip);\*(C'\fR
.Sh "ip_normalize"
.IX Subsection "ip_normalize"
Normalize data to a range/prefix of \s-1IP\s0 addresses
.PP
.Vb 2
\&    Params  : Data String (Single IP, Range, Prefix)
\&    Returns : ip1, ip2 (if range/prefix) or undef (error)
.Ve
.PP
\&\f(CW\*(C`($ip1,$ip2) = ip_normalize ($data);\*(C'\fR
.Sh "ip_auth"
.IX Subsection "ip_auth"
Return \s-1IP\s0 authority information from the IP::Authority module
.PP
.Vb 2
\&    Params  : IP, version
\&    Returns : Auth info (RI for RIPE, AR for ARIN, etc)
.Ve
.PP
\&\f(CW\*(C`$auth = ip_auth ($ip,4);\*(C'\fR
.PP
Note: IPv4 only
.SH "BUGS"
.IX Header "BUGS"
The Math::BigInt library is needed for functions that use integers. These are
ip_inttobin, ip_bintoint, and the size method. In a next version, 
Math::BigInt will become optionnal.
.SH "AUTHORS"
.IX Header "AUTHORS"
Manuel Valente <manuel.valente@gmail.com>.
.PP
Original IPv4 code by Monica Cortes Sack <mcortes@ripe.net>.
.PP
Original IPv6 code by Lee Wilmot <lee@ripe.net>.
.SH "BASED ON"
.IX Header "BASED ON"
ipv4pack.pm, iplib.pm, iplibncc.pm.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fIperl\fR\|(1), IP::Authority

Creat By MiNi SheLL
Email: devilkiller@gmail.com