Converts between binary and text address formats.
Library (libc.a)
char *inet_net_ntop (af, src, bits, dst, size) 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 af parameter specifies the family of the address. The src parameter points to a buffer holding an IPv4 address if the af parameter is AF_INET. The bits parameter is the size (in bits) of the buffer pointed to by the src parameter. The dst parameter points to a buffer where the function stores the resulting text string. The size parameter is the size (in bytes) of the buffer pointed to by the dst parameter.
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 parameter is invalid or ENOSPC if the size of the result buffer is inadequate.
inet_net_pton Subroutine, inet_ntop Subroutine, and inet_pton Subroutine.
Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.