Open System Services Library Calls Reference Manual (G06.27+, H06.04+)

lwres_getnameinfo(3) OSS Library Calls Reference Manual
NAME
lwres_getnameinfo - Translates a protocol-independent host address to host name
LIBRARY
G-series native OSS processes: /G/system/sysnn/zinetsrl
H-series OSS processes: /G/system/zdllnnn/zinetdll
SYNOPSIS
#include <netdb.h>
int lwres_getnameinfo (
const struct sockaddr *sa,
socklen_t salen,
char *host,
size_t hostlen,
char *serv,
size_t servlen,
int ags
);
PARAMETERS
sa Points to the sockaddr_in or sockaddr_in6 struct containing the IP address and
port number.
salen Species the length of the sa argument.
host Contains the returned host name associated with the IP address or the numeric
form of the host address (if the ags value NI_NUMERICHOST is used).
hostlen Species the size of the host buffer to receive the returned value. If you specify
0 (zero), no value is returned for host. Otherwise, the value returned is truncated
as necessary to t the specied buffer.
serv Contains either the service name associated with the port number or the numeric
form of the port number (if the ags value of NI_NUMERICSERV is used).
servlen Species the size of the serv buffer to receive the returned value. If you specify
0 (zero), no value is returned for serv. Otherwise, the value returned is truncated
as necessary to t the specied buffer.
flags Contains one or more of the following values:
NI_NOFQDN Species to return only the host name part of the fully qualied
domain name (FQDN) for local hosts. If you omit this ag, the
function returns the hosts fully qualied (canonical) domain
name.
NI_NUMERICHOST
Species to return the numeric form of the host address instead
of the host name.
NI_NAMEREQD
Species to return an error if the host name is not found in the
DNS.
4110 Hewlett-Packard Company 527187-004