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

getipnodebyaddr(3) OSS Library Calls Reference Manual
2. If addr_family is AF_INET, the function looks up the name for the given IPv4 address.
3. If addr_family is AF_INET6, the function looks up the name for the given IPv6 address.
Information returned by getipnodebyaddr() is dynamically allocated; the hostent structure and
the data areas pointed to by the members of the hostent structure are all dynamically allocated.
Use the freehostent() function to return memory to the system.
The getipnodebyaddr() function must be used in a thread-safe environment.
RETURN VALUES
Upon successful completion, this function returns a pointer to the hostent structure that contains
the host name. The structure returned also contains the values used for src and addr_family, pos-
sibly modied as described in the NOTES subsection of this reference page.
If the call fails, a NULL pointer is returned and one of the following nonzero values is returned
for the error_num parameter:
HOST_NOT_FOUND
The specied address is not valid. This is not a soft error; another type of name
server request might be successful.
NO_RECOVERY
A server failure occurred. This is a nonrecoverable error.
TRY_AGAIN An error occurred that might have been caused by a transient condition. A later
retry might succeed.
ERRORS
This function does not set errno.
RELATED INFORMATION
Functions: freeaddrinfo(3), freehostent(3), gai_strerror(3), getaddrinfo(3), getipnode-
byname(3), getnameinfo(3), if_freenameindex(3), if_indextoname(3), if_nameindex(3),
if_nametoindex(3), inet_pton(3), inet_ntop(3).
STANDARDS CONFORMANCE
This function is an extension to the XPG4 specication.
342 Hewlett-Packard Company 527187-004