Skip to main content

normalize_nas_address

Function normalize_nas_address 

Source
pub fn normalize_nas_address(address: &str) -> Option<(IpAddr, u8)>
Expand description

Canonical network of a NAS address: a bare IP is a host route, and host bits of a CIDR are masked, so 10.0.0.1, 10.0.0.1/32 and (for a /24) 10.0.0.7/24 and 10.0.0.0/24 compare equal. None for anything that is not an IP or an IP/prefix with a non-zero, in-range prefix length.