Method NetUtils.host_to_cidr()
- Method host_to_cidr
stringhost_to_cidr(int|stringip)- Description
Return the CIDR notation for the single host defined by
x.- Parameter
ip The host ip in either string or raw form
- Returns
either
ip/128 orip/32 depending on the IPV6-ness of the host IP.