Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
gethostbyname_r(3) OSS Library Calls Reference Manual
h_addr_list Points to an array of null-terminated pointers to the addresses from the name
server, in network order.
ERRORS
If the length of the buffer supplied by the caller is not large enough to store the result, this func-
tion returns a null pointer and sets both h_errno and the integer to by h_errnop to the value
ERANGE.
If the gethostbyname_r( ) function fails, h_errno and the integer pointed to by h_errnop might
be set to one of the following values:
HOST_NOT_FOUND
The name is not a valid hostname or alias. Another type of name server request
might be successful.
TRY_AGAIN A transient condition might have caused an error. A later retry might succeed.
NO_RECOVERY
This is a nonrecoverable error.
NO_DATA | NO_ADDRESS
The address you used is not valid. Another type of name server request might be
successful.
ERANGE Insufficient storage was supplied via buffer and buflen to contain the data to be
referenced by the resulting hostent structure.
Additionally, for H06.20 or earlier H-series RVUs, J06.09 or earlier J-series RVUs, or G-series
RVUs, gethostbyname_r( ) might set errno to the following values:
[ERANGE] Insufficient storage was supplied via buffer and buflen to contain the data to be
referenced by the resulting hostent structure.
FILES
/etc/hosts The Internet network hostname database.
/etc/resov.conf The resolver configuration file.
RELATED INFORMATION
Functions: gethostbyaddr(3), gethostbyaddr_r(3), gethostent(3), gethostent_r(3),
lwres_gethostbyaddr_r(3), lwres_gethostbyname_r(3), endhostent(3), sethostent(3).
Files: hosts(4), resolv.conf(4), resolv.conf(5), thread_safety(5).
STANDARDS CONFORMANCE
H06.21 and later H-series RVUs and J06.10 and later J-series RVUs
This function conforms to IEEE Std 1003.1 2004, POSIX System Application Program Interface.
Standard POSIX Threads Library version of this function
This function is an extension to the UNIX98 specification. Interfaces documented on this refer-
ence page conform to the following industry standards:
• IEEE Std 1003.1-c1995, POSIX System Application Program Interface
The use of the header file spthread.h is an HP exception to the POSIX standard.
3−64 Hewlett-Packard Company 527187-017