Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    NetAddr::IP 4.062

    Download button

    No screenshots available
    Downloads: 552  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Luis E. Muñoz | More programs
    Perl Artistic License / FREE
    June 20th, 2012, 13:27 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    NetAddr::IP description

    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)


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    IPv6 addresses | IPv4 addresses | manage subnets | NetAddr::IP | IPv4 | IPv6

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM