Fn inet_cidr_ntop converts an address from network to presentation format.
Ft af describes the type of address that is being passed in Ft src . Currently only AF_INET is supported.
Ft src is an address in network byte order, its length is determined from Ft af .
Ft bits specifies the number of bits in the netmask unless it is -1 in which case the CIDR representation is omitted.
Ft dst is a caller supplied buffer of at least Ft size bytes.
Fn inet_cidr_ntop returns Ft dst on success or NULL. Check errno for reason.
Fn inet_cidr_pton converts and address from presentation format, with optional CIDR reperesentation, to network format. The resulting address is zero filled if there were insufficint bits in Ft src .
Ft af describes the type of address that is being passed in via Ft src and determines the size of Ft dst .
Ft src is an address in presentation format.
Ft bits returns the number of bits in the netmask or -1 if a CIDR representation was not supplied.
Fn inet_cidr_pton returns 0 on succces or -1 on error. Check errno for reason. ENOENT indicates an invalid netmask.