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

  1. 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.

  2. If an ecode is specified for which there is no corresponding description, an Unknown Error string is returned.

  3. 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




API introduced: V5R2
Top | UNIX-Type APIs | APIs by category