Open System Services Library Calls Reference Manual (G06.28+, H06.05+)
gethostbyname2(3) OSS Library Calls Reference Manual
NO_RECOVERY
This is a nonrecoverable error.
EXAMPLE
This example makes a call to gethostbyname2() by passing the host name and address family as
arguments. If an answer is found, a pointer to the hostent structure is returned and stored in hp.
NULL is returned if no answer is found.
int af;
char *name;
struct hostent *hp;
hp = gethostbyname2(name, af);
FILES
/etc/hosts The Internet network hostname database file.
Each record in the file occupies a single line and has three fields: the host
address, the hostname, and aliases.
/etc/resolv.conf
The default resolver configuration file.
RELATED INFORMATION
Files: hosts(4), resolv.conf(5).
3−36 Hewlett-Packard Company 527187-007