|
NAMErealhostname_sa —
convert a struct sockaddr to the real host
name
LIBRARYSystem Utilities Library (libutil, -lutil)SYNOPSIS#include <sys/types.h>
#include <netinet/in.h>
#include <libutil.h>
int
DESCRIPTIONThe functionrealhostname_sa () converts
addr to the corresponding host name. This is done by
resolving addr to a host name and then ensuring that the
host name resolves back to addr.
host must point to a buffer of at least hsize bytes, and will always be written to by this function. If the name resolution does not work both ways or if the host name is longer than hsize bytes, getnameinfo(3) with NI_NUMERICHOST specified, is used to convert addr to an ASCII form. If the string written to host is hsize bytes long, host will not be NUL terminated. RETURN VALUESTherealhostname_sa () function will return one of the
following constants which are defined in
<libutil.h> :
SEE ALSOgetaddrinfo(3), getnameinfo(3), realhostname(3)
Visit the GSP FreeBSD Man Page Interface. |