Converts between binary and text address formats.
Library (libc.a)
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, 9.3.149.0/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 inadquate.
The inet_net_pton subroutine, inet_ntop subroutine, inet_pton subroutine.
Subroutines Overview in AIX Version 4 General Programming Concepts: Writing and Debugging Programs.