NAME
FusionInventory::Agent::Tools::Network - Network-related patterns and functions
DESCRIPTION
This module provides some network-related patterns and functions.
PATTERNS
mac_address_pattern
This pattern matches a MAC address in canonical form (aa:bb:cc:dd:ee:ff).
ip_address_pattern
This pattern matches an IP address in canonical form (xyz.xyz.xyz.xyz).
alt_mac_address_pattern
This pattern matches a MAC address in alternative form (aabbccddeeff).
hex_ip_address_pattern
This pattern matches an IP address in hexadecimal form (aabbccdd).
FUNCTIONS
hex2canonical($address)
Convert an ip address from hexadecimal to canonical form.
alt2canonical($address)
Convert a mac address from alternative to canonical form.
getSubnetAddress($address, $mask)
Returns the subnet address for IPv4.
getSubnetAddressIPv6($address, $mask)
Returns the subnet address for IPv6.
getNetworkMask($prefix)
Returns the network mask for IPv4.
getNetworkMaskIPv6($prefix)
Returns the network mask for IPv6.