Pike v8.1 release 6

Method NetUtils.host_to_cidr()


Method host_to_cidr

string host_to_cidr(int|string ip)

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 or ip/32 depending on the IPV6-ness of the host IP.