Vulcan::NetMap - network mappings of data centers


 use Vulcan::NetMap;

 my $map = Vulcan::NetMap->load( '/conf/file' );
 my $info = $map->search( $ip );


A YAML file, containing a HASH of subnet definitions indexed by data centers. Each subnet definition should be a HASH of masks indexed by subnets. e.g.

 dc2: 16 16 24


dc( %param )

Returns a list of data centers in the config. List is sorted by size or segment if $param{sort} is defined.

search( $ip, %param )

Returns dc, net, mask of $ip if within the net map. net and mask are returned in integer if $param{int} is defined.

mask( $mask )

Returns the integer value of a (dotted or decimal) netmask.

ip2n( $ip )

Returns the integer value of a dotted ip.

n2ip( $int )

Returns dotted ip form of an integer.