2 - Copyright (C) 2004, 2005, 2007, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000, 2001 Internet Software Consortium.
5 - Permission to use, copy, modify, and/or 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.
19 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
20 <title>lwres_gai_strerror</title>
21 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
23 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
24 <a name="id-1"></a><div class="titlepage"></div>
25 <div class="refnamediv">
27 <p>lwres_gai_strerror — print suitable error string</p>
29 <div class="refsynopsisdiv">
31 <div class="funcsynopsis">
32 <pre class="funcsynopsisinfo">#include <lwres/netdb.h></pre>
33 <table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
34 <td><code class="funcdef">
36 <b class="fsfunc">gai_strerror</b>(</code></td>
37 <td>int <var class="pdparam">ecode</var><code>)</code>;</td>
39 <div class="funcprototype-spacer"> </div>
42 <div class="refsection">
43 <a name="id-1.7"></a><h2>DESCRIPTION</h2>
44 <p><code class="function">lwres_gai_strerror()</code>
45 returns an error message corresponding to an error code returned by
46 <code class="function">getaddrinfo()</code>.
47 The following error codes and their meaning are defined in
48 <code class="filename">include/lwres/netdb.h</code>.
50 <div class="variablelist"><dl class="variablelist">
51 <dt><span class="term"><span class="errorcode">EAI_ADDRFAMILY</span></span></dt>
53 address family for hostname not supported
55 <dt><span class="term"><span class="errorcode">EAI_AGAIN</span></span></dt>
57 temporary failure in name resolution
59 <dt><span class="term"><span class="errorcode">EAI_BADFLAGS</span></span></dt>
62 <code class="constant">ai_flags</code>
64 <dt><span class="term"><span class="errorcode">EAI_FAIL</span></span></dt>
66 non-recoverable failure in name resolution
68 <dt><span class="term"><span class="errorcode">EAI_FAMILY</span></span></dt>
69 <dd><p><code class="constant">ai_family</code> not supported
71 <dt><span class="term"><span class="errorcode">EAI_MEMORY</span></span></dt>
73 memory allocation failure
75 <dt><span class="term"><span class="errorcode">EAI_NODATA</span></span></dt>
77 no address associated with hostname
79 <dt><span class="term"><span class="errorcode">EAI_NONAME</span></span></dt>
81 hostname or servname not provided, or not known
83 <dt><span class="term"><span class="errorcode">EAI_SERVICE</span></span></dt>
85 servname not supported for <code class="constant">ai_socktype</code>
87 <dt><span class="term"><span class="errorcode">EAI_SOCKTYPE</span></span></dt>
88 <dd><p><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>
100 <p><code class="constant">ai_flags</code>,
101 <code class="constant">ai_family</code>
103 <code class="constant">ai_socktype</code>
105 <span class="type">struct addrinfo</span>
107 <code class="function">lwres_getaddrinfo()</code>.
110 <div class="refsection">
111 <a name="id-1.8"></a><h2>SEE ALSO</h2>
112 <p><span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span>,
114 <span class="citerefentry"><span class="refentrytitle">lwres_getaddrinfo</span>(3)</span>,
116 <span class="citerefentry"><span class="refentrytitle">getaddrinfo</span>(3)</span>,
118 <span class="citerefentry"><span class="refentrytitle">RFC2133</span></span>.