lwres_gai_strerror.3 revision 40f53fa8d9c6a4fc38c0014495e7a42b08f52481
Copyright (C) 2000 Internet Software Consortium.

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

$Id: lwres_gai_strerror.3,v 1.3 2000/08/01 01:21:12 tale Exp $

.Dd Jun 30, 2000 .Dt LWRES_GAI_STRERROR 3 .Os BIND9 9 .Sh NAME .Nm gai_strerror .Nd print suitable error string .Sh SYNOPSIS .Fd #include <lwres/netdb.h> .Fd .Ft char * .Fo gai_strerror .Fa "int ecode" .Fc .Sh DESCRIPTION .Fn gai_strerror returns a suitable error message for the error code .Fa ecode . The message \*qinvalid error code\*q is returned if .Fa ecode is out of range. The following error codes and their meaning are defined in .Aq Pa include/lwres/netdb.h . They can be returned by .Fn getaddrinfo . l -tag -width EAI_ADDRFAMILY -offset indent -compact t Dv EAI_ADDRFAMILY address family for hostname not supported t Dv EAI_AGAIN temporary failure in name resolution t Dv EAI_BADFLAGS invalid value for .Li ai_flags t Dv EAI_FAIL non-recoverable failure in name resolution t Dv EAI_FAMILY .Li ai_family not supported t Dv EAI_MEMORY memory allocation failure t Dv EAI_NODATA no address associated with hostname t Dv EAI_NONAME hostname or servname not provided, or not known t Dv EAI_SERVICE servname not supported for .Li ai_socktype t Dv EAI_SOCKTYPE .Li ai_socktype not supported t Dv EAI_SYSTEM system error returned in errno .El

p .Li ai_flags , .Li ai_family and .Li ai_socktype are elements of the .Dv "struct addrinfo" used by .Fn lwres_getaddrinfo . .Sh SEE ALSO .Xr errno 2 , .Xr perror 3 , .Xr lwres_getaddrinfo 3 , .Xr getaddrinfo 3 , .Xr RFC2133 .