|
NAMErealhostname —
convert an IP number to the real host name
LIBRARYSystem Utilities Library (libutil, -lutil)SYNOPSIS#include <libutil.h>
int
DESCRIPTIONThe functionrealhostname () converts
ip to the corresponding host name. This is done by
resolving ip to a host name and then ensuring that the
host name resolves back to ip.
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, inet_ntoa(3) is used to convert ip to an ASCII form. If the string written to host is hsize bytes long, host will not be NUL terminated. RETURN VALUESTherealhostname () function will return one of the
following constants which are defined in
<libutil.h> :
SEE ALSOgethostbyaddr(3), gethostbyname(3), inet_ntoa(3), realhostname_sa(3)HISTORYTherealhostname () function first appeared in
FreeBSD 3.2.
Visit the GSP FreeBSD Man Page Interface. |