NAME
App::Manoc::Utils::IPAddress - collection of functions to handle IP addresses
VERSION
version 2.99.2
FUNCTIONS
check_addr($addr)
Return true if $addr
is a valid IPv4 address string.
check_partial_addr($addr)
Return true if $addr
looks like a partial IPv4 address string.
check_ipv6_addr
NOT IMPLEMENTED YET
ip2int
Convert a string to an unsigned long (32-bit) in network order.
int2ip
Convert an unsigned long (32-bit) in network order to a dotted notation ipaddres
prefix2netmask_i
Convert a networkk prefix length to a netmask represented as an integer.
prefix2netmask
Convert a networkk prefix length to a netmask represented as a string.
prefix2wildcard
Convert a network prefix length to a network wildcard
netmask2prefix
Convert a network netmask (as an ipv4 address string) to prefix length.
netmask2prefix("255.255.255.0"); # return 24
Return undef if input is not a valid netmask.
padded_ipaddr
Return a zero padded representation of an IPv4 address string.
padded_ipaddr("10.1.1.0"); # return "010.001.001.000"
Useful when storing ip addresses as strings in databases.
unpadded_ipaddr
Remove zero padding from an IPv4 address string.
AUTHORS
Gabriele Mambrini <gmambro@cpan.org>
Enrico Liguori
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Gabriele Mambrini.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.