NetAddr::IP

NetAddr::IP is a Perl module that can manage IPv4 and IPv6 addresses and subnets.
Download

NetAddr::IP Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Luis E. Mu
  • Publisher web site:
  • http://search.cpan.org/~luismunoz/Crypt-PasswdMD5-1.3/PasswdMD5.pm

NetAddr::IP Tags


NetAddr::IP Description

NetAddr::IP is a Perl module that can manage IPv4 and IPv6 addresses and subnets. NetAddr::IP is a Perl module that can manage IPv4 and IPv6 addresses and subnets.SYNOPSIS use NetAddr::IP qw( Compact Coalesce Zero Ones V4mask V4net :aton :old_storable :old_nth ); my $ip = new NetAddr::IP 'loopback'; print "The address is ", $ip->addr, " with mask ", $ip->mask, "n" ; if ($ip->within(new NetAddr::IP "127.0.0.0", "255.0.0.0")) { print "Is a loopback addressn"; } # This prints 127.0.0.1/32 print "You can also say $ip...n";* The following four functions return ipV6 representations of: :: = Zeros(); FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF: = Ones(); FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:: = V4mask(); ::FFFF:FFFF = V4net();* To accept addresses in the format as returned by inet_aton, invoke the module as: use NetAddr::IP qw(:aton);* To enable usage of legacy data files containing NetAddr::IP objects stored using the Storable module. use NetAddr::IP qw(:old_storable); * To compact many smaller subnets (see: $me->compact($addr1, $addr2,...) @compacted_object_list = Compact(@object_list)* Return a reference to list of NetAddr::IP subnets of $masklen mask length, when $number or more addresses from @list_of_subnets are found to be contained in said subnet. $arrayref = Coalesce($masklen, $number, @list_of_subnets)Requirements:· PerlWhat's New in This Release:· Dependence on Math::BigInt removed, works with earlier versions of Perl. The module was partitioned into three logical pieces as follows:· Util.pm Math and logic operation on bit strings and number that represent IP addresses and masks. Conversions between various number formats. Implemented in C_XS for speed and PURE PERL of transportability.· Lite.pm Operations, simple conversions and comparisons of IP addresses, notations and formats.· IP.pm Complex operations and conversions of IP address notation, nets, subnets, and ranges.· The internal representation of addresses was changed to 128 bit binary strings as returned by inet_pton (ipv6_aton in this module). Both ipV4 and ipV6 notations can be freely mixed and matched.· Additional methods added to force operations into ipV6 space even when ipV4 notation is used.


NetAddr::IP Related Software