2 - Copyright (C) 2004, 2005, 2007 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.6.18.18 2007/01/30 00:23:45 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.71.1">
24 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
25 <a name="id2476275"></a><div class="titlepage"></div>
26 <div class="refnamediv">
28 <p>lwres_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 <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr>
35 <td><code class="funcdef">
37 <b class="fsfunc">gai_strerror</b>(</code></td>
40 <var class="pdparam">ecode</var><code>)</code>;</td>
44 <div class="refsect1" lang="en">
45 <a name="id2543361"></a><h2>DESCRIPTION</h2>
46 <p><code class="function">lwres_gai_strerror()</code>
47 returns an error message corresponding to an error code returned by
48 <code class="function">getaddrinfo()</code>.
49 The following error codes and their meaning are defined in
50 <code class="filename">include/lwres/netdb.h</code>.
52 <div class="variablelist"><dl>
53 <dt><span class="term"><span class="errorcode">EAI_ADDRFAMILY</span></span></dt>
55 address family for hostname not supported
57 <dt><span class="term"><span class="errorcode">EAI_AGAIN</span></span></dt>
59 temporary failure in name resolution
61 <dt><span class="term"><span class="errorcode">EAI_BADFLAGS</span></span></dt>
64 <code class="constant">ai_flags</code>
66 <dt><span class="term"><span class="errorcode">EAI_FAIL</span></span></dt>
68 non-recoverable failure in name resolution
70 <dt><span class="term"><span class="errorcode">EAI_FAMILY</span></span></dt>
71 <dd><p><code class="constant">ai_family</code> not supported
73 <dt><span class="term"><span class="errorcode">EAI_MEMORY</span></span></dt>
75 memory allocation failure
77 <dt><span class="term"><span class="errorcode">EAI_NODATA</span></span></dt>
79 no address associated with hostname
81 <dt><span class="term"><span class="errorcode">EAI_NONAME</span></span></dt>
83 hostname or servname not provided, or not known
85 <dt><span class="term"><span class="errorcode">EAI_SERVICE</span></span></dt>
87 servname not supported for <code class="constant">ai_socktype</code>
89 <dt><span class="term"><span class="errorcode">EAI_SOCKTYPE</span></span></dt>
90 <dd><p><code class="constant">ai_socktype</code> not supported
92 <dt><span class="term"><span class="errorcode">EAI_SYSTEM</span></span></dt>
94 system error returned in errno
98 The message <span class="errorname">invalid error code</span> is returned if
99 <em class="parameter"><code>ecode</code></em>
102 <p><code class="constant">ai_flags</code>,
103 <code class="constant">ai_family</code>
105 <code class="constant">ai_socktype</code>
107 <span class="type">struct addrinfo</span>
109 <code class="function">lwres_getaddrinfo()</code>.
112 <div class="refsect1" lang="en">
113 <a name="id2543576"></a><h2>SEE ALSO</h2>
114 <p><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>.