Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
lwres_getipnodebyaddr(3) OSS Library Calls Reference Manual
NAME
lwres_getipnodebyaddr - Searches host entries until a match is found
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 <sys/socket.h>
#include <netdb.h>
struct hostent *lwres_getipnodebyaddr(
const void *src,
socklen_t len, |
int af,
int *error_ptr);
PARAMETERS
src Points to an IP address for which the host name should be returned; the address
specified should be in binary format and network order.
len Specifies the length of the IP address: 4 octets for an AF_INET address or 16
octets for an AF_INET6 address.
af Specifies that the host to be found must have an address that is a member of this
address family: either AF_INET or AF_INET6.
error_ptr Points to the integer containing an error code, if any.
DESCRIPTION
The lwres_getipnodebyaddr( ) function returns a pointer to a hostent structure whose members
specify data from a name server. This function provides the same information as the getipnode-
byaddr( ) function but uses the Domain Name System (DNS) lightweight resolver server lwresd
instead of the named DNS server.
NOTES
lwres_getipnodebyaddr( ) provides the same functionality as lwres_gethostbyaddr( ), but is
protocol-independent.
RETURN VALUES
A successful function call returns a pointer to the hostent structure that contains the host name.
The structure returned also contains the values used for src and address-family.
ERRORS
If an error occurs, lwres_getipnodebyaddr() sets error_ptr to an appropriate error code and the
function returns a NULL pointer. The following error codes and their meanings are defined in the
netdb.h header file:
HOST_NOT_FOUND
The specified host was not found.
TRY_AGAIN A temporary, and possibly transient, error occurred, such as a failure of a server
to respond.
4−164 Hewlett-Packard Company 527187-017