![]()  | 
![]()  | 
![]()  | 
![]()  | 
![]()  | 
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. | 
Return the string associated with a getaddrinfo() error code
#include <sys/types.h> #include <sys/socket.h> #include <netdb.h> const char * gai_strerror( int ecode );
libsocket
Use the -l socket option to qcc to link against this library.
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:
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.
![]()  | 
Don't modify the strings that this function returns. | 
| Safety: | |
|---|---|
| Cancellation point | No | 
| Interrupt handler | Yes | 
| Signal handler | Yes | 
| Thread | Yes | 
addrinfo, freeaddrinfo(), getaddrinfo()
![]()  | 
![]()  | 
![]()  | 
![]()  |