Converts between binary and text address formats.
char *inet_net_ntop int af; const void *src; int bits; char *dst; size_t size;
This function converts a network address and the number of bits in the network part of the address into the CIDR format ascii text (for example, 220.127.116.11/24). The argument, af, specifies the family of the address. The argument, src, points to a buffer holding an IPv4 address if the af argument is AF_INET. The argument, dst, points to a buffer where the function stores the resulting text string.
If successful, a pointer to a buffer containing the text string is returned. If unsuccessful, NULL is returned. Upon failure, errno is set to EAFNOSUPPORT if the af argument is invalid or ENOSPC if the size of the result buffer is inadequate.
The inet_net_pton (inet_net_pton Subroutine) subroutine, inet_ntop (inet_ntop Subroutine) subroutine, inet_pton (inet_pton Subroutine) subroutine.
Subroutines Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.