gai_strerror()--Retrieve Address Information Runtime Error Message
Syntax
#include <sys/socket.h> #include <netdb.h> char *gai_strerror(int ecode);
Service Program Name: QSOSRV2
Default Public Authority: *USE
Threadsafe: Yes
The gai_strerror() function retrieves a text string that describes a return value received from calling the getaddrinfo() or getnameinfo() API.
Parameters
- ecode
- (Input) The return value received from getaddrinfo() or getnameinfo().
Authorities
No authorization is required.
Return Value
gai_strerror() returns a pointer to the return value text.
Usage Notes
- gai_strerror() returns a pointer to the string. The
null-terminated string is stored in the CCSID of the job. If the job is 65535
and the string is something other than EBCDIC single byte or EBCDIC mixed, the
text is converted to the default job CCSID.
- If an ecode is specified for which there is no corresponding
description, an Unknown Error string is returned.
- The null-terminated string addressed by the pointer returned is overlayed by subsequent invocations of the gai_strerror() API from within the same thread.
Related Information
- getaddrinfo()--Get Address Information
- getnameinfo()--Get Name Information for Socket
Address
API introduced: V5R2