Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/gai_strerror.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/gai_strerror.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/gai_strerror.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/gai_strerror.html on line 8

gai_strerror()

Return the string associated with a getaddrinfo() error code

Synopsis:

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>

const char * gai_strerror( int ecode );

Arguments:

ecode
The error code number from the getaddrinfo() function.

Library:

libsocket

Use the -l socket option to qcc to link against this library.

Description:

The gai_strerror() function returns a string describing the error code from the getaddrinfo() function. Nonzero error codes are defined in <netdb.h> as follows:

EAI_ADDRFAMILY
The address family for nodename isn't supported.
EAI_AGAIN
There was a temporary failure in name resolution.
EAI_BADFLAGS
Invalid value for ai_flags.
EAI_FAIL
Nonrecoverable failure in name resolution.
EAI_FAMILY
The ai_family isn't supported.
EAI_MEMORY
Memory allocation failure.
EAI_NODATA
No address associated with the nodename.
EAI_NONAME
Either the nodename or the servname argument wasn't provided or isn't known.
EAI_SERVICE
The servname argument isn't supported for ai_socktype.
EAI_SOCKTYPE
The ai_socktype isn't supported.
EAI_SYSTEM
System error returned in errno.

Returns:

If called with a proper ecode argument, a pointer to a string describing the given error code. If the argument isn't one of the EAI_* values, a pointer to a string whose contents indicate an unknown error.


Note: Don't modify the strings that this function returns.

Classification:

POSIX 1003.1

Safety:
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

addrinfo, freeaddrinfo(), getaddrinfo()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/gai_strerror.html on line 188

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/gai_strerror.html on line 188