7 * gai_strerror is based on
8 * http://www.opengroup.org/onlinepubs/009695399/functions/gai_strerror.html
10 const char *gai_strerror(int ecode
)
12 static char buffer
[256];
14 /* check for each known error code */
18 return "The name could not be resolved at this time";
21 return "The flags had an invalid value";
24 return "A non-recoverable error occurred";
27 return "The address family was not recognized or the "
28 "address length was invalid for the specified "
32 return "There was a memory allocation failure";
35 return "The name does not resolve for the supplied "
36 "parameters, NI_NAMEREQD is set and the host's "
37 "name cannot be located, or both nodename and "
41 return "The service passed was not recognized for the "
42 "specified socket type";
45 return "The intended socket type was not recognized";
50 "A system error occurred: %s",
55 return "An argument buffer overflowed";
58 /* unknown error code */
61 "An unknown error code was passed to gai_strerror: %d",