TCP/IP Programming Manual

The gai_strerror function call returns a pointer to a character string describing the error code
passed into it. (This function is supported for Parallel Library TCP/IP only.)
C Synopsis
#include <netdb.h>
char *gai_strerror (int ecode);
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
return_value := gai_strerror (ecode);
INT(32) return_value;
INT(32) ecode;
return_value
is a pointer to a string described in ecode.
ecode
input value; specifies one of the following error codes returned by the getaddrinfo function;
the returned strings are as follows:
ReasonError Codes and Returned Strings
Address family for hostname not supported.EAI_ADDRFAMILY:See the EAI_FAMILY returned
string. EAI_ADDRFAMILY is defined but never
returned.
Temporary failure in name resolution.EAI_AGAIN:"The name could not be
resolved this time. Future attempts may
succeed."
Invalid value for ai_flags.EAI_BADFLAGS:"The flags parameter has
an invalid value."
Non-recoverable error in name resolution.EAI_FAIL:"A non-recoverable error
occurred.
ai_family not supported.EAI_FAMILY:"Address family was not
recognized or address length was
invalid."
Memory allocation failure.EAI_MEMORY:"Memory allocation failure."
Neither hostname nor servname supplied or the name
does not resolve using the supplied parameters.
EAI_NONAME:"Name does not resolve to
supplied parameters."
servname not supported for ai_socktype.EAI_SERVICE:"The service passed was not
recognized for the specified socket
type."
ai_socktype not supported.EAI_SOCKTYPE:"The intended socket type
was not recognized."
System error returned in errno.EAI_SYSTEM:"A system error occurred;
error code found in errno."
Usage Guidelines
Call this function to aid in printing human-readable error messages based on the EAI_xxx error
codes returned by the getaddrinfo function.
106 Library Routines