0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 2000, 2001, 2004-2007, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * file, You can obtain one at http://mozilla.org/MPL/2.0/.
70e5a7403f0e0a3bd292b8287c5fed5772c15270Automatic Updater/* $Id: gai_strerror.c,v 1.22 2007/06/19 23:47:22 tbox Exp $ */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * lwres_gai_strerror() returns an error message corresponding to an
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * error code returned by getaddrinfo(). The following error codes and
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * their meaning are defined in \link netdb.h include/lwres/netdb.h.\endlink
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * \li #EAI_ADDRFAMILY address family for hostname not supported
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * \li #EAI_AGAIN temporary failure in name resolution
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * \li #EAI_BADFLAGS invalid value for #ai_flags
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * \li #EAI_FAIL non-recoverable failure in name resolution
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * \li #EAI_FAMILY ai_family not supported
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * \li #EAI_MEMORY memory allocation failure
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * \li #EAI_NODATA no address associated with hostname
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * \li #EAI_NONAME hostname or servname not provided, or not known
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * \li #EAI_SERVICE servname not supported for ai_socktype
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * \li #EAI_SOCKTYPE ai_socktype not supported
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * \li #EAI_SYSTEM system error returned in errno
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * The message invalid error code is returned if ecode is out of range.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * ai_flags, ai_family and ai_socktype are elements of the struct
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * addrinfo used by lwres_getaddrinfo().
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * \section gai_strerror_see See Also
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * strerror, lwres_getaddrinfo(), getaddrinfo(), RFC2133.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein/*% Text of error messages. */
1378841691ad112fce2376d9f2e54e02676057d3Michael Sawyer "address family for hostname not supported",
1378841691ad112fce2376d9f2e54e02676057d3Michael Sawyer "temporary failure in name resolution",
1378841691ad112fce2376d9f2e54e02676057d3Michael Sawyer "invalid value for ai_flags",
1378841691ad112fce2376d9f2e54e02676057d3Michael Sawyer "non-recoverable failure in name resolution",
1378841691ad112fce2376d9f2e54e02676057d3Michael Sawyer "ai_family not supported",
1378841691ad112fce2376d9f2e54e02676057d3Michael Sawyer "memory allocation failure",
1378841691ad112fce2376d9f2e54e02676057d3Michael Sawyer "no address associated with hostname",
1378841691ad112fce2376d9f2e54e02676057d3Michael Sawyer "hostname nor servname provided, or not known",
1378841691ad112fce2376d9f2e54e02676057d3Michael Sawyer "servname not supported for ai_socktype",
1378841691ad112fce2376d9f2e54e02676057d3Michael Sawyer "ai_socktype not supported",
dd0fdd442633c66003c996ddf7dd229c8630ddc9Brian Wellington "system error returned in errno",
e177c7b81414417858b5d4816946b1b9d72fbf1cMark Andrews "bad protocol",
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein/*% Returns an error message corresponding to an error code returned by getaddrinfo() */
552a117791c17878c5c1b94b0fc3ac4e8491543eMark Andrews (ecode >= (int)(sizeof(gai_messages)/sizeof(*gai_messages))))