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 flags
);
PARAMETERS
sa Points to the sockaddr_in or sockaddr_in6 struct containing the IP address and
port number.
salen Specifies 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 flags value NI_NUMERICHOST is used).
hostlen Specifies 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 fit the specified buffer.
serv Contains either the service name associated with the port number or the numeric
form of the port number (if the flags value of NI_NUMERICSERV is used).
servlen Specifies 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 fit the specified buffer.
flags Contains one or more of the following values:
NI_NOFQDN Specifies to return only the host name part of the fully qualified
domain name (FQDN) for local hosts. If you omit this flag, the
function returns the host’s fully qualified (canonical) domain
name.
NI_NUMERICHOST
Specifies to return the numeric form of the host address instead
of the host name.
NI_NAMEREQD
Specifies to return an error if the host name is not found in the
DNS.
4−110 Hewlett-Packard Company 527187-004