TCP/IP Programming Manual

EAI_AGAIN
temporary failure in name resolution.
EAI_BADFLAGS
invalid value for ai_flags.
EAI_FAIL
non-recoverable failure in name resolution.
EAI_FAMILY
ai_family not supported.
EAI_MEMORY
memory allocation failure.
EAI_NODATA
no address associated with hostname.
EAI_NONAME
hostname or servname not provided, or not known.
EAI_SERVICE
servname not supported for ai_socktype.
EAI_SOCKTYPE
ai_socktype not supported.
EAI_SYSTEM
system error returned in errno.
Errors
The message invalid error code is returned if ecode is out of range. ai_flags,
ai_family, and ai_socktype are elements of the struct addrinfo used by
lwres_getaddrinfo.
Example
The following programming example calls the gai_strerror routine to print error messages:
ret = lwres_getaddrinfo(hostname, servname, &hints, &result);
if(ret != 0) {
fprintf(stderr,"%s", lwres_gai_strerror(error));
return -1;
}
Usage Guidelines
Call this function to aid in printing human-readable error messages based on the EAI_ error codes
returned by the lwres_getaddrinfo function.
lwres_getaddrinfo
The lwres_getaddrinfo function converts hostnames and service names into socket address
structures. This function is defined for protocol-independent hostname-to-address translation. It
performs the functionality of lwres_gethostbyname but in a more sophisticated manner. (This
function is supported for G06.27 and later G-series RVUs and H06.05 and later H-series RVUs of
NonStop TCP/IPv6.)
C Synopsis
#include netdb.h>
142 Library Routines