1*86d7f5d3SJohn Marino.\" $KAME: gai_strerror.3,v 1.1 2005/01/05 03:04:47 itojun Exp $ 2*86d7f5d3SJohn Marino.\" $OpenBSD: gai_strerror.3,v 1.4 2004/12/20 23:04:53 millert Exp $ 3*86d7f5d3SJohn Marino.\" 4*86d7f5d3SJohn Marino.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") 5*86d7f5d3SJohn Marino.\" Copyright (C) 2000, 2001 Internet Software Consortium. 6*86d7f5d3SJohn Marino.\" 7*86d7f5d3SJohn Marino.\" Permission to use, copy, modify, and distribute this software for any 8*86d7f5d3SJohn Marino.\" purpose with or without fee is hereby granted, provided that the above 9*86d7f5d3SJohn Marino.\" copyright notice and this permission notice appear in all copies. 10*86d7f5d3SJohn Marino.\" 11*86d7f5d3SJohn Marino.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 12*86d7f5d3SJohn Marino.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 13*86d7f5d3SJohn Marino.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 14*86d7f5d3SJohn Marino.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 15*86d7f5d3SJohn Marino.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 16*86d7f5d3SJohn Marino.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17*86d7f5d3SJohn Marino.\" PERFORMANCE OF THIS SOFTWARE. 18*86d7f5d3SJohn Marino.\" 19*86d7f5d3SJohn Marino.\" $FreeBSD: src/lib/libc/net/gai_strerror.3,v 1.5 2006/09/17 21:27:33 ru Exp $ 20*86d7f5d3SJohn Marino.\" $DragonFly: src/lib/libc/net/gai_strerror.3,v 1.2 2008/10/07 06:57:40 swildner Exp $ 21*86d7f5d3SJohn Marino.\" 22*86d7f5d3SJohn Marino.Dd October 4, 2008 23*86d7f5d3SJohn Marino.Dt GAI_STRERROR 3 24*86d7f5d3SJohn Marino.Os 25*86d7f5d3SJohn Marino.Sh NAME 26*86d7f5d3SJohn Marino.Nm gai_strerror 27*86d7f5d3SJohn Marino.Nd get error message string from EAI_xxx error code 28*86d7f5d3SJohn Marino.Sh LIBRARY 29*86d7f5d3SJohn Marino.Lb libc 30*86d7f5d3SJohn Marino.Sh SYNOPSIS 31*86d7f5d3SJohn Marino.In sys/types.h 32*86d7f5d3SJohn Marino.In sys/socket.h 33*86d7f5d3SJohn Marino.In netdb.h 34*86d7f5d3SJohn Marino.Ft "const char *" 35*86d7f5d3SJohn Marino.Fn gai_strerror "int ecode" 36*86d7f5d3SJohn Marino.Sh DESCRIPTION 37*86d7f5d3SJohn MarinoThe 38*86d7f5d3SJohn Marino.Fn gai_strerror 39*86d7f5d3SJohn Marinofunction returns an error message string corresponding to the error code 40*86d7f5d3SJohn Marinoreturned by 41*86d7f5d3SJohn Marino.Xr getaddrinfo 3 42*86d7f5d3SJohn Marinoor 43*86d7f5d3SJohn Marino.Xr getnameinfo 3 . 44*86d7f5d3SJohn Marino.Pp 45*86d7f5d3SJohn MarinoThe following error codes and their meaning are defined in 46*86d7f5d3SJohn Marino.In netdb.h : 47*86d7f5d3SJohn Marino.Pp 48*86d7f5d3SJohn Marino.Bl -tag -width ".Dv EAI_ADDRFAMILY" -offset indent -compact 49*86d7f5d3SJohn Marino.It Dv EAI_ADDRFAMILY 50*86d7f5d3SJohn Marinoaddress family for 51*86d7f5d3SJohn Marino.Fa hostname 52*86d7f5d3SJohn Marinonot supported 53*86d7f5d3SJohn Marino.It Dv EAI_AGAIN 54*86d7f5d3SJohn Marinotemporary failure in name resolution 55*86d7f5d3SJohn Marino.It Dv EAI_BADFLAGS 56*86d7f5d3SJohn Marinoinvalid value for 57*86d7f5d3SJohn Marino.Fa ai_flags 58*86d7f5d3SJohn Marino.It Dv EAI_BADHINTS 59*86d7f5d3SJohn Marinoinvalid value for 60*86d7f5d3SJohn Marino.Fa hints 61*86d7f5d3SJohn Marino.It Dv EAI_FAIL 62*86d7f5d3SJohn Marinonon-recoverable failure in name resolution 63*86d7f5d3SJohn Marino.It Dv EAI_FAMILY 64*86d7f5d3SJohn Marino.Fa ai_family 65*86d7f5d3SJohn Marinonot supported 66*86d7f5d3SJohn Marino.It Dv EAI_MEMORY 67*86d7f5d3SJohn Marinomemory allocation failure 68*86d7f5d3SJohn Marino.It Dv EAI_NODATA 69*86d7f5d3SJohn Marinono address associated with 70*86d7f5d3SJohn Marino.Fa hostname 71*86d7f5d3SJohn Marino.It Dv EAI_NONAME 72*86d7f5d3SJohn Marino.Fa hostname 73*86d7f5d3SJohn Marinoor 74*86d7f5d3SJohn Marino.Fa servname 75*86d7f5d3SJohn Marinonot provided, or not known 76*86d7f5d3SJohn Marino.It Dv EAI_OVERFLOW 77*86d7f5d3SJohn Marinoargument buffer overflow 78*86d7f5d3SJohn Marino.It Dv EAI_PROTOCOL 79*86d7f5d3SJohn Marinoresolved protocol is unknown 80*86d7f5d3SJohn Marino.It Dv EAI_SERVICE 81*86d7f5d3SJohn Marino.Fa servname 82*86d7f5d3SJohn Marinonot supported for 83*86d7f5d3SJohn Marino.Fa ai_socktype 84*86d7f5d3SJohn Marino.It Dv EAI_SOCKTYPE 85*86d7f5d3SJohn Marino.Fa ai_socktype 86*86d7f5d3SJohn Marinonot supported 87*86d7f5d3SJohn Marino.It Dv EAI_SYSTEM 88*86d7f5d3SJohn Marinosystem error returned in 89*86d7f5d3SJohn Marino.Va errno 90*86d7f5d3SJohn Marino.El 91*86d7f5d3SJohn Marino.Sh RETURN VALUES 92*86d7f5d3SJohn MarinoThe 93*86d7f5d3SJohn Marino.Fn gai_strerror 94*86d7f5d3SJohn Marinofunction 95*86d7f5d3SJohn Marinoreturns a pointer to the error message string corresponding to 96*86d7f5d3SJohn Marino.Fa ecode . 97*86d7f5d3SJohn MarinoIf 98*86d7f5d3SJohn Marino.Fa ecode 99*86d7f5d3SJohn Marinois out of range, an implementation-specific error message string is returned. 100*86d7f5d3SJohn Marino.Sh SEE ALSO 101*86d7f5d3SJohn Marino.Xr getaddrinfo 3 , 102*86d7f5d3SJohn Marino.Xr getnameinfo 3 103