Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

gai_strerror(3) OSS Library Calls Reference Manual
NAME
gai_strerror - Returns error message strings for errors detected by the getaddrinfo( ) function
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 <netdb.h>
char *gai_strerror(
int ecode);
PARAMETERS
ecode Specifies one of the following error codes; the returned strings are also shown:
EAI_ADDRFAMILY
Address family was not recognized or address length was
invalid.
This value is not currently used by getaddrinfo( ).
EAI_AGAIN The name could not be resolved this time. Future attempts may
succeed.
EAI_BADFLAGS
The flags parameter has an invalid value.
EAI_FAIL A non-recoverable error occurred.
EAI_FAMILY Address family was not recognized or address length was
invalid.
EAI_MEMORY
Memory allocation failure.
EAI_NONAME
Name does not resolve to supplied parameters.
EAI_SERVICE
The service passed was not recognized for the specified socket
type.
EAI_SOCKTYPE
The intended socket type was not recognized.
EAI_SYSTEM
A system error occurred; error code found in errno.
DESCRIPTION
The gai_strerror( ) function aids in printing human-readable error messages based on the
EAI_xxx error codes returned by the getaddrinfo( ) function.
EXAMPLES
err = getaddrinfo(hostname, servicename, &hints, &res);
if(err != 0) {
(void)fprintf(stderr,"myFunc: getaddrinfo returned error %i ",err);
(void)fprintf(stderr,"%s\n", gai_strerror(err));
return -1;
32 Hewlett-Packard Company 527187-017