Net::IPv4Addr 0.10 review
DownloadNet::IPv4Addr is a Perl extension for manipulating IPv4 addresses. SYNOPSIS use Net::IPv4Addr qw( :all ); my ($ip,$cidr) =
|
|
Net::IPv4Addr is a Perl extension for manipulating IPv4 addresses.
SYNOPSIS
use Net::IPv4Addr qw( :all );
my ($ip,$cidr) = ipv4_parse( "127.0.0.1/24" );
my ($ip,$cidr) = ipv4_parse( "192.168.100.10 / 255.255.255.0" );
my ($net,$msk) = ipv4_network( "192.168.100.30" );
my $broadcast = ipv4_broadcast( "192.168.100.30/26" );
if ( ipv4_in_network( "192.168.100.0", $her_ip ) ) {
print "Welcome !";
}
etc.
Net::IPv4Addr provides functions for parsing IPv4 addresses both in traditional address/netmask format and in the new CIDR format. There are also methods for calculating the network and broadcast address and also to see check if a given address is in a specific network.
Requirements:
Perl
Net::IPv4Addr 0.10 search tags