Calculates the number of usable IP addresses in a CIDR block. For IPv4, this is 2^(32-prefix) - 2 for network and broadcast addresses. But for /31 and /32, we return special values.
The CIDR block to calculate usable IPs for
The number of usable IP addresses
If the CIDR is invalid
Calculates the number of usable IP addresses in a CIDR block. For IPv4, this is 2^(32-prefix) - 2 for network and broadcast addresses. But for /31 and /32, we return special values.