INET_PTON(3)

NAME
inet_ntop, inet_pton - address to printable and back conversion functions

SYNOPSIS
const char *inet_ntop(int af, const void *ap, char *cp, size_t len);
int inet_pton(int af, const char *cp, void *ap);

DESCRIPTION
inet_ntop() converts an AF_INET or AF_INET6 address into printable form.
af specifies the address family of the address being converted. ap points to the address to convert. len is the length of the result. cp is a pointer to the printable form of the address.

inet_pton() converts a printed form address into the appropriate binary form.
af specifies the address family to convert into. cp is a pointer to the printed form of the address. ap is a pointer to the binary form of the address after conversion.

HISTORY
This implementation and manual page were done at the US Naval Research Laboratory.

BUGS
No known bugs.

COMPATIBILITY
These functions are intended to replace the equivalent older Internet-specific functions, such as inet_ntoa()and inet_aton().