1.1.24.19 inet_ntop
C
const char *inet_ntop(int af, const void *a0, char *s, socklen_t l)
Description
Convert IPv4 and IPv6 addresses from binary to text form.
Parameters
Parameters | Description |
---|---|
af | Address family, either AF_INET or AF_INET6 . |
a0 | Pointer to IP address in network byte order. |
s | Pointer to string buffer to output to. |
l | Size of buffer supplied. |
Returns
Pointer to converted string within supplied buffer or 0 for error (errno set).
Remarks
errno | Description |
---|---|
EAFNOSUPPORT | af was not a valid address family. |
ENOSPC | The converted address string would exceed the size given by size. |