Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ares_inet_ntop(3) [centos man page]

ARES_INET_NTOP(3)					     Library Functions Manual						 ARES_INET_NTOP(3)

NAME
ares_inet_ntop - convert a network format address to presentation format SYNOPSIS
#include <ares.h> const char * ares_inet_ntop(int af, const void *src, char *dst, ares_socklen_t size); DESCRIPTION
This is a portable version with the identical functionality of the commonly available inet_ntop. The ares_inet_ntop() function converts a numeric address into a text string suitable for presentation. The af argument shall specify the family of the address. This can be AF_INET or AF_INET6. The src argument points to a buffer holding an IPv4 address if the af argument is AF_INET, or an IPv6 address if the af argument is AF_INET6; the address must be in network byte order. The dst argument points to a buffer where the function stores the resulting text string; it shall not be NULL. The size argument specifies the size of this buffer, which shall be large enough to hold the text string (INET_ADDRSTRLEN (16) characters for IPv4, INET6_ADDRSTRLEN (46) characters for IPv6). SEE ALSO
ares_init(3), ares_inet_pton(3) AVAILABILITY
made properly publicly available in c-ares for real in version 1.10.0 AUTHOR
Daniel Stenberg 17 Feb 2013 ARES_INET_NTOP(3)

Check Out this Related Man Page

inet_ntop(3)						     Linux Programmer's Manual						      inet_ntop(3)

NAME
inet_ntop - Parse network address structures SYNOPSIS
#include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> const char *inet_ntop(int af, const void *src, char *dst, size_t cnt); DESCRIPTION
This function converts the network address structure src in the af address family into a character string, which is copied to a character buffer dst, which is cnt bytes long. inet_ntop(3) extends the inet_ntoa(3) function to support multiple address families, inet_ntoa(3) is now considered to be deprecated in favor of inet_ntop(3). The following address families are currently supported: AF_INET src points to a struct in_addr (network byte order format) which is converted to an IPv4 network address in the dotted-quad format, "ddd.ddd.ddd.ddd". The buffer dst must be at least INET_ADDRSTRLEN bytes long. AF_INET6 src points to a struct in6_addr (network byte order format) which is converted to a representation of this address in the most appropriate IPv6 network address format for this address. The buffer dst must be at least INET6_ADDRSTRLEN bytes long. RETURN VALUE
inet_ntop returns a non-null pointer to dst. NULL is returned if there was an error, with errno set to EAFNOSUPPORT if af was not set to a valid address family, or to ENOSPC if the converted address string would exceed the size of dst given by the cnt argument. SEE ALSO
inet_pton(3) BUGS
AF_INET6 converts IPv6-mapped IPv4 addresses into an IPv6 format. Linux Man Page 2000-12-18 inet_ntop(3)
Man Page