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

lwres_gethostbyname(3) OSS Library Calls Reference Manual
NAME
lwres_gethostbyname - Gets the Internet address (IPv4) of the host whose name is specied
LIBRARY
G-series native OSS processes: /G/system/sysnn/zinetsrl
H-series OSS processes: /G/system/zdllnnn/zinetdll
SYNOPSIS
#include <netdb.h>
extern lwres_h_errno
struct hostent *lwres_gethostbyname(
const char *name );
PARAMETERS
name Points to either the ofcial name or an alias of the host whose Internet address is
to be found.
DESCRIPTION
The lwres_gethostbyname() function gets the address of the host with the specied Internet host
name. This function provides the same information as the gethostbyname() function but uses
the Domain Name System (DNS) lightweight resolver server lwresd instead of the named DNS
server.
NOTES
The name value passed to the lwres_gethostbyname() function is case-sensitive.
The hostent structure is statically declared. Subsequent calls to lwres_gethostbyname() replace
the existing data in the hostent structure.
RETURNED VALUES
Upon successful completion of the call, the returned value points to a structure (based on the
hostent structure) in which information for the specied host is returned. The information
includes the ofcial name, aliases, and addresses for the host.
ERRORS
If the call fails, lwres_gethostbyname() returns NULL to indicate an error. In this case, the glo-
bal variable lwres_h_errno contains one of the following error codes as dened in the netdb.h
header le:
HOST_NOT_FOUND
The host or address was not found.
TRY_AGAIN A recoverable error occurred, for example, a timeout. Retrying the lookup might
succeed.
NO_RECOVERY
A nonrecoverable error occurred.
NO_DATA | NO_ADDRESS
The name exists, but has no address information associated with it (or vice versa
in the case of a reverse lookup). The code NO_ADDRESS is a synonym for
NO_DATA for backwards compatibility.
4104 Hewlett-Packard Company 527187-004