Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

lwres_getipnodebyname(3) OSS Library Calls Reference Manual
NAME
lwres_getipnodebyname - Gets host information based on the host name
LIBRARY
G-series native OSS processes: /G/system/sysnn/zinetsrl
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zinetdll |
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yinetdll |
SYNOPSIS
#include <netdb.h>
struct hostent *lwres_getipnodebyname(
const char *name,
int af,
int flags,
int *error_ptr);
PARAMETERS
name Points to a node name or numeric address string, such as an IPv4 dotted-decimal
address or an IPv6 hexadecimal address.
af Sets the address type searched for by the function and returned by the function.
af is either AF_INET (for IPv4) or AF_INET6 (for IPv6).
flags Contains bits to specify the types of addresses that are searched for and the types
of addresses that are returned. The flag bits are:
AI_V4MAPPED
Used with an af of AF_INET6, causes IPv4 addresses to be
returned as IPv4-mapped IPv6 addresses.
AI_ALL Used with an af of AF_INET6, causes all known addresses
(IPv6 and IPv4) to be returned. If AI_V4MAPPED is also set,
the IPv4 addresses are returned as mapped IPv6 addresses.
AI_ADDRCONFIG
Causes return of an IPv6 or IPv4 address only if there is an
active network interface of that type. This is not currently
implemented in the BIND 9 Lightweight resolver, and the flag is
ignored.
AI_DEFAULT
This is the default value. It sets the AI_V4MAPPED and
AI_ADDRCONFIG flag bits.
error_ptr Points to the error code returned by the lwres_getipnodebyname( ) function.
See the ERRORS section of this reference page.
DESCRIPTION
The lwres_getipnodebyname( ) function provides the same functionality as the
lwres_gethostbyname( ) function, but is protocol-independent. This function provides the same
information as the getipnodebyname( ) function but uses the Domain Name System (DNS) light-
weight resolver server lwresd instead of the named DNS server.
The lwres_getipnodebyname( ) function searches host entries sequentially until a match with
the name value occurs.
4166 Hewlett-Packard Company 527187-017