Net::CIDR::Set

Manipulate sets of IP addresses
Download

Net::CIDR::Set Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Andy Armstrong
  • Publisher web site:
  • http://search.cpan.org/~andya/

Net::CIDR::Set Tags


Net::CIDR::Set Description

Manipulate sets of IP addresses Net::CIDR::Set is a Perl module that represents sets of IP addresses and allows standard set operations (union, intersection, membership test etc) to be performed on them.In spite of the name it can work with sets consisting of arbitrary ranges of IP addresses - not just CIDR blocks.Both IPv4 and IPv6 addresses are handled - but they may not be mixed in the same set. You may explicitly set the personality of a set: my $ip4set = Net::CIDR::Set->new({ type => 'ipv4 }, '10.0.0.0/8');Normally this isn't necessary - the set will guess its personality from the first data that is added to it.SYNOPSIS use Net::CIDR::Set; my $priv = Net::CIDR::Set->new( '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16' ); for my $ip ( @addr ) { if ( $priv->contains( $ip ) ) { print "$ip is private\n"; } } Requirements: · Perl


Net::CIDR::Set Related Software