Method NetUtils.cidr_to_netmask()
- Method cidr_to_netmask
array(int) cidr_to_netmask(stringcidr)- Description
Converts a string with an IP address and mask (in CIDR notation) into a binary IP address and bitmask.
- Parameter
cidr The CIDR-notation input string.
- Returns
An array containing:
Array intipThe binary representation of the IP address.
intmaskThe bitmask.
Returns 0 if the string could not be parsed.