1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
3 - Copyright (C) 2001 Internet Software Consortium.
5 - Permission to use, copy, modify, and distribute this software for any
6 - purpose with or without fee is hereby granted, provided that the above
7 - copyright notice and this permission notice appear in all copies.
9 - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
10 - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
11 - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
12 - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
13 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
14 - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
15 - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
16 - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 <!-- $Id: lwres_gai_strerror.docbook,v 1.1 2004/03/15 20:35:25 as Exp $ -->
25 <date>Jun 30, 2000</date>
28 <refentrytitle>lwres_gai_strerror</refentrytitle>
29 <manvolnum>3</manvolnum>
30 <refmiscinfo>BIND9</refmiscinfo>
33 <refname>gai_strerror</refname>
34 <refpurpose>print suitable error string</refpurpose>
38 <funcsynopsisinfo>#include <lwres/netdb.h></funcsynopsisinfo>
42 <function>gai_strerror</function></funcdef>
43 <paramdef>int ecode</paramdef>
49 <title>DESCRIPTION</title>
51 <function>lwres_gai_strerror()</function>
52 returns an error message corresponding to an error code returned by
53 <function>getaddrinfo()</function>.
54 The following error codes and their meaning are defined in
55 <filename>include/lwres/netdb.h</filename>.
57 <varlistentry><term><errorcode>EAI_ADDRFAMILY</errorcode></term>
60 address family for hostname not supported
62 </listitem></varlistentry>
63 <varlistentry><term><errorcode>EAI_AGAIN</errorcode></term>
66 temporary failure in name resolution
68 </listitem></varlistentry>
69 <varlistentry><term><errorcode>EAI_BADFLAGS</errorcode></term>
73 <constant>ai_flags</constant>
75 </listitem></varlistentry>
76 <varlistentry><term><errorcode>EAI_FAIL</errorcode></term>
79 non-recoverable failure in name resolution
81 </listitem></varlistentry>
82 <varlistentry><term><errorcode>EAI_FAMILY</errorcode></term>
85 <constant>ai_family</constant> not supported
87 </listitem></varlistentry>
88 <varlistentry><term><errorcode>EAI_MEMORY</errorcode></term>
91 memory allocation failure
93 </listitem></varlistentry>
94 <varlistentry><term><errorcode>EAI_NODATA</errorcode></term>
97 no address associated with hostname
99 </listitem></varlistentry>
100 <varlistentry><term><errorcode>EAI_NONAME</errorcode></term>
103 hostname or servname not provided, or not known
105 </listitem></varlistentry>
106 <varlistentry><term><errorcode>EAI_SERVICE</errorcode></term>
109 servname not supported for <constant>ai_socktype</constant>
111 </listitem></varlistentry>
112 <varlistentry><term><errorcode>EAI_SOCKTYPE</errorcode></term>
115 <constant>ai_socktype</constant> not supported
117 </listitem></varlistentry>
118 <varlistentry><term><errorcode>EAI_SYSTEM</errorcode></term>
121 system error returned in errno
123 </listitem></varlistentry>
125 The message <errorname>invalid error code</errorname> is returned if
126 <parameter>ecode</parameter>
130 <constant>ai_flags</constant>,
131 <constant>ai_family</constant>
133 <constant>ai_socktype</constant>
135 <type>struct addrinfo</type>
137 <function>lwres_getaddrinfo()</function>.
142 <title>SEE ALSO</title>
145 <refentrytitle>strerror</refentrytitle><manvolnum>3</manvolnum>
149 <refentrytitle>lwres_getaddrinfo</refentrytitle><manvolnum>3</manvolnum>
153 <refentrytitle>getaddrinfo</refentrytitle><manvolnum>3</manvolnum>
157 <refentrytitle>RFC2133</refentrytitle>