2 - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000, 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 ISC DISCLAIMS ALL WARRANTIES WITH
10 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 - PERFORMANCE OF THIS SOFTWARE.
17 <!-- $Id: lwres_gai_strerror.html,v 1.5.2.1.4.12 2006/06/29 13:02:31 marka Exp $ -->
20 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21 <title>lwres_gai_strerror</title>
22 <meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
24 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
25 <a name="id2482688"></a><div class="titlepage"></div>
26 <div class="refnamediv">
28 <p>gai_strerror — print suitable error string</p>
30 <div class="refsynopsisdiv">
32 <div class="funcsynopsis">
33 <pre class="funcsynopsisinfo">#include <lwres/netdb.h></pre>
34 <p><code class="funcdef">
36 <b class="fsfunc">gai_strerror</b>(</code>int ecode<code>)</code>;</p>
39 <div class="refsect1" lang="en">
40 <a name="id2549408"></a><h2>DESCRIPTION</h2>
42 <code class="function">lwres_gai_strerror()</code>
43 returns an error message corresponding to an error code returned by
44 <code class="function">getaddrinfo()</code>.
45 The following error codes and their meaning are defined in
46 <code class="filename">include/lwres/netdb.h</code>.
48 <div class="variablelist"><dl>
49 <dt><span class="term"><span class="errorcode">EAI_ADDRFAMILY</span></span></dt>
51 address family for hostname not supported
53 <dt><span class="term"><span class="errorcode">EAI_AGAIN</span></span></dt>
55 temporary failure in name resolution
57 <dt><span class="term"><span class="errorcode">EAI_BADFLAGS</span></span></dt>
60 <code class="constant">ai_flags</code>
62 <dt><span class="term"><span class="errorcode">EAI_FAIL</span></span></dt>
64 non-recoverable failure in name resolution
66 <dt><span class="term"><span class="errorcode">EAI_FAMILY</span></span></dt>
68 <code class="constant">ai_family</code> not supported
70 <dt><span class="term"><span class="errorcode">EAI_MEMORY</span></span></dt>
72 memory allocation failure
74 <dt><span class="term"><span class="errorcode">EAI_NODATA</span></span></dt>
76 no address associated with hostname
78 <dt><span class="term"><span class="errorcode">EAI_NONAME</span></span></dt>
80 hostname or servname not provided, or not known
82 <dt><span class="term"><span class="errorcode">EAI_SERVICE</span></span></dt>
84 servname not supported for <code class="constant">ai_socktype</code>
86 <dt><span class="term"><span class="errorcode">EAI_SOCKTYPE</span></span></dt>
88 <code class="constant">ai_socktype</code> not supported
90 <dt><span class="term"><span class="errorcode">EAI_SYSTEM</span></span></dt>
92 system error returned in errno
96 The message <span class="errorname">invalid error code</span> is returned if
97 <em class="parameter"><code>ecode</code></em>
101 <code class="constant">ai_flags</code>,
102 <code class="constant">ai_family</code>
104 <code class="constant">ai_socktype</code>
106 <span class="type">struct addrinfo</span>
108 <code class="function">lwres_getaddrinfo()</code>.
111 <div class="refsect1" lang="en">
112 <a name="id2549605"></a><h2>SEE ALSO</h2>
114 <span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span>,
116 <span class="citerefentry"><span class="refentrytitle">lwres_getaddrinfo</span>(3)</span>,
118 <span class="citerefentry"><span class="refentrytitle">getaddrinfo</span>(3)</span>,
120 <span class="citerefentry"><span class="refentrytitle">RFC2133</span></span>.