Open System Services Library Calls Reference Manual (G06.28+, H06.05+)
OSS Library Calls (g - h) getipnodebyname(3)
NAME
getipnodebyname - Gets host information based on IP node name (protocol-independent)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zinetsrl
H-series OSS processes: /G/system/zdllnnn/zinetdll
SYNOPSIS
#include <sys/socket.h>
#include <netdb.h>
struct hostent *getipnodebyname(
const char *name,
int addr_family,
int flags,
int *error_num
);
PARAMETERS
name Specifies the node name or a numeric string (such as an IPv4 dotted-decimal
address or an IPv6 hexadecimal address) to search for
addr_family Specifies the address type (either AF_INET or AF_INET6) to use for the search
flags Specifies the conditions for returning an address; flags can be one or more of the
following as a logically ORed value:
AI_ADDRCONFIG
Requests the return of only IPv6 records if a host has at least one
IPv6 source address configured, or only IPv4 records if a host
has at least one IPv4 source address configured.
AI_ALL Requests the return of all matching IPv4 and IPv6 records. This
flag is ignored unless AI_V4MAPPED is also set.
AI_CANONNAME
Requests the return of the canonical name for the host if name is
not NULL or a numeric string.
AI_NUMERICHOST
Specifies that the name value is a numeric address string. If this
flag is set and name is not a numeric address string, the returned
address is set to EAI_NONAME.
You can use this flag to prevent a name resolution service from
being called.
AI_PASSIVE Returns an address that can be passed to the bind() function. If
name is NULL, the address is set to INADDR_ANY or
IN6ADDR_ANY_INIT, as appropriate for the address family.
If this flag is not set, the returned address can be passed to the
connect() function. If name is NULL, the address is set to the
loopback address.
527187-007 Hewlett-Packard Company 3−43