xref: /dflybsd-src/lib/libc/net/gai_strerror.3 (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
186d7f5d3SJohn Marino.\"	$KAME: gai_strerror.3,v 1.1 2005/01/05 03:04:47 itojun Exp $
286d7f5d3SJohn Marino.\"	$OpenBSD: gai_strerror.3,v 1.4 2004/12/20 23:04:53 millert Exp $
386d7f5d3SJohn Marino.\"
486d7f5d3SJohn Marino.\" Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
586d7f5d3SJohn Marino.\" Copyright (C) 2000, 2001  Internet Software Consortium.
686d7f5d3SJohn Marino.\"
786d7f5d3SJohn Marino.\" Permission to use, copy, modify, and distribute this software for any
886d7f5d3SJohn Marino.\" purpose with or without fee is hereby granted, provided that the above
986d7f5d3SJohn Marino.\" copyright notice and this permission notice appear in all copies.
1086d7f5d3SJohn Marino.\"
1186d7f5d3SJohn Marino.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
1286d7f5d3SJohn Marino.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1386d7f5d3SJohn Marino.\" AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
1486d7f5d3SJohn Marino.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1586d7f5d3SJohn Marino.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
1686d7f5d3SJohn Marino.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1786d7f5d3SJohn Marino.\" PERFORMANCE OF THIS SOFTWARE.
1886d7f5d3SJohn Marino.\"
1986d7f5d3SJohn Marino.\" $FreeBSD: src/lib/libc/net/gai_strerror.3,v 1.5 2006/09/17 21:27:33 ru Exp $
2086d7f5d3SJohn Marino.\" $DragonFly: src/lib/libc/net/gai_strerror.3,v 1.2 2008/10/07 06:57:40 swildner Exp $
2186d7f5d3SJohn Marino.\"
2286d7f5d3SJohn Marino.Dd October 4, 2008
2386d7f5d3SJohn Marino.Dt GAI_STRERROR 3
2486d7f5d3SJohn Marino.Os
2586d7f5d3SJohn Marino.Sh NAME
2686d7f5d3SJohn Marino.Nm gai_strerror
2786d7f5d3SJohn Marino.Nd get error message string from EAI_xxx error code
2886d7f5d3SJohn Marino.Sh LIBRARY
2986d7f5d3SJohn Marino.Lb libc
3086d7f5d3SJohn Marino.Sh SYNOPSIS
3186d7f5d3SJohn Marino.In sys/types.h
3286d7f5d3SJohn Marino.In sys/socket.h
3386d7f5d3SJohn Marino.In netdb.h
3486d7f5d3SJohn Marino.Ft "const char *"
3586d7f5d3SJohn Marino.Fn gai_strerror "int ecode"
3686d7f5d3SJohn Marino.Sh DESCRIPTION
3786d7f5d3SJohn MarinoThe
3886d7f5d3SJohn Marino.Fn gai_strerror
3986d7f5d3SJohn Marinofunction returns an error message string corresponding to the error code
4086d7f5d3SJohn Marinoreturned by
4186d7f5d3SJohn Marino.Xr getaddrinfo 3
4286d7f5d3SJohn Marinoor
4386d7f5d3SJohn Marino.Xr getnameinfo 3 .
4486d7f5d3SJohn Marino.Pp
4586d7f5d3SJohn MarinoThe following error codes and their meaning are defined in
4686d7f5d3SJohn Marino.In netdb.h :
4786d7f5d3SJohn Marino.Pp
4886d7f5d3SJohn Marino.Bl -tag -width ".Dv EAI_ADDRFAMILY" -offset indent -compact
4986d7f5d3SJohn Marino.It Dv EAI_ADDRFAMILY
5086d7f5d3SJohn Marinoaddress family for
5186d7f5d3SJohn Marino.Fa hostname
5286d7f5d3SJohn Marinonot supported
5386d7f5d3SJohn Marino.It Dv EAI_AGAIN
5486d7f5d3SJohn Marinotemporary failure in name resolution
5586d7f5d3SJohn Marino.It Dv EAI_BADFLAGS
5686d7f5d3SJohn Marinoinvalid value for
5786d7f5d3SJohn Marino.Fa ai_flags
5886d7f5d3SJohn Marino.It Dv EAI_BADHINTS
5986d7f5d3SJohn Marinoinvalid value for
6086d7f5d3SJohn Marino.Fa hints
6186d7f5d3SJohn Marino.It Dv EAI_FAIL
6286d7f5d3SJohn Marinonon-recoverable failure in name resolution
6386d7f5d3SJohn Marino.It Dv EAI_FAMILY
6486d7f5d3SJohn Marino.Fa ai_family
6586d7f5d3SJohn Marinonot supported
6686d7f5d3SJohn Marino.It Dv EAI_MEMORY
6786d7f5d3SJohn Marinomemory allocation failure
6886d7f5d3SJohn Marino.It Dv EAI_NODATA
6986d7f5d3SJohn Marinono address associated with
7086d7f5d3SJohn Marino.Fa hostname
7186d7f5d3SJohn Marino.It Dv EAI_NONAME
7286d7f5d3SJohn Marino.Fa hostname
7386d7f5d3SJohn Marinoor
7486d7f5d3SJohn Marino.Fa servname
7586d7f5d3SJohn Marinonot provided, or not known
7686d7f5d3SJohn Marino.It Dv EAI_OVERFLOW
7786d7f5d3SJohn Marinoargument buffer overflow
7886d7f5d3SJohn Marino.It Dv EAI_PROTOCOL
7986d7f5d3SJohn Marinoresolved protocol is unknown
8086d7f5d3SJohn Marino.It Dv EAI_SERVICE
8186d7f5d3SJohn Marino.Fa servname
8286d7f5d3SJohn Marinonot supported for
8386d7f5d3SJohn Marino.Fa ai_socktype
8486d7f5d3SJohn Marino.It Dv EAI_SOCKTYPE
8586d7f5d3SJohn Marino.Fa ai_socktype
8686d7f5d3SJohn Marinonot supported
8786d7f5d3SJohn Marino.It Dv EAI_SYSTEM
8886d7f5d3SJohn Marinosystem error returned in
8986d7f5d3SJohn Marino.Va errno
9086d7f5d3SJohn Marino.El
9186d7f5d3SJohn Marino.Sh RETURN VALUES
9286d7f5d3SJohn MarinoThe
9386d7f5d3SJohn Marino.Fn gai_strerror
9486d7f5d3SJohn Marinofunction
9586d7f5d3SJohn Marinoreturns a pointer to the error message string corresponding to
9686d7f5d3SJohn Marino.Fa ecode .
9786d7f5d3SJohn MarinoIf
9886d7f5d3SJohn Marino.Fa ecode
9986d7f5d3SJohn Marinois out of range, an implementation-specific error message string is returned.
10086d7f5d3SJohn Marino.Sh SEE ALSO
10186d7f5d3SJohn Marino.Xr getaddrinfo 3 ,
10286d7f5d3SJohn Marino.Xr getnameinfo 3
103