summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/gai_strerror.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net/gai_strerror.3')
-rw-r--r--src/lib/libc/net/gai_strerror.3118
1 files changed, 0 insertions, 118 deletions
diff --git a/src/lib/libc/net/gai_strerror.3 b/src/lib/libc/net/gai_strerror.3
deleted file mode 100644
index 75eb1517f4..0000000000
--- a/src/lib/libc/net/gai_strerror.3
+++ /dev/null
@@ -1,118 +0,0 @@
1.\" $OpenBSD: gai_strerror.3,v 1.1 2004/12/06 10:46:35 jmc Exp $
2.\"
3.\" Copyright (c) 1983, 1987, 1991, 1993
4.\" The Regents of the University of California. All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors
15.\" may be used to endorse or promote products derived from this software
16.\" without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.Dd December 3, 2004
31.Dt GAI_STRERROR 3
32.Os
33.\"
34.Sh NAME
35.Nm gai_strerror
36.Nd return EAI_xxx error message
37.\"
38.Sh SYNOPSIS
39.Fd #include <sys/types.h>
40.Fd #include <sys/socket.h>
41.Fd #include <netdb.h>
42.Ft "char *"
43.Fn gai_strerror "int ecode"
44.\"
45.Sh DESCRIPTION
46To aid applications in printing error messages based on the
47.Dv EAI_xxx
48codes returned by
49.Xr getaddrinfo 3
50and
51.Xr getnameinfo 3 ,
52.Fn gai_strerror
53is defined.
54The argument is one of the
55.Dv EAI_xxx
56values detailed below
57and the return value points to a string describing the error.
58If the argument is not one of the
59.Dv EAI_xxx
60values,
61the function still returns a pointer to a string whose contents
62indicate an unknown error.
63.Pp
64The error return status from
65.Xr getaddrinfo 3
66and
67.Xr getnameinfo 3
68is zero on success and non-zero on errors.
69Non-zero error codes are defined in
70.Aq Pa netdb.h ,
71and are as follows:
72.Pp
73.Bl -tag -width "EAI_ADDRFAMILYXX" -offset indent -compact
74.It Dv EAI_ADDRFAMILY
75Address family for
76.Fa nodename
77not supported.
78.It Dv EAI_AGAIN
79Temporary failure in name resolution.
80.It Dv EAI_BADFLAGS
81Invalid value for
82.Fa ai_flags .
83.It Dv EAI_BADHINTS
84Invalid value for hints.
85.It Dv EAI_FAIL
86Non-recoverable failure in name resolution.
87.It Dv EAI_FAMILY
88.Fa ai_family
89not supported.
90.It Dv EAI_MEMORY
91Memory allocation failure.
92.It Dv EAI_NODATA
93No address associated with
94.Fa nodename .
95.It Dv EAI_NONAME
96.Fa nodename
97nor
98.Fa servname
99provided, or not known.
100.It Dv EAI_PROTOCOL
101Resolved protocol is unknown.
102.It Dv EAI_SERVICE
103.Fa servname
104not supported for
105.Fa ai_socktype .
106.It Dv EAI_SOCKTYPE
107.Fa ai_socktype
108not supported.
109.It Dv EAI_SYSTEM
110System error returned in
111.Va errno .
112.El
113.\"
114.Sh SEE ALSO
115.Xr getaddrinfo 3 ,
116.Xr getnameinfo 3
117.Sh HISTORY
118The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit.