lwres_gai_strerror.html revision 010a51c427bfb6ab658fc0056955a1a5b69810be
127N/A<!--
127N/A - Copyright (C) 2004, 2005, 2007, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
127N/A - Copyright (C) 2000, 2001 Internet Software Consortium.
127N/A -
127N/A - Permission to use, copy, modify, and/or distribute this software for any
127N/A - purpose with or without fee is hereby granted, provided that the above
127N/A - copyright notice and this permission notice appear in all copies.
127N/A -
127N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
127N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
127N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
127N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
127N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
127N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
127N/A - PERFORMANCE OF THIS SOFTWARE.
127N/A-->
127N/A<html>
127N/A<head>
127N/A<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
127N/A<title>lwres_gai_strerror</title>
844N/A<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
127N/A</head>
127N/A<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="lwres_gai_strerror">
127N/A<a name="idp60804432"></a><div class="titlepage"></div>
127N/A
127N/A
618N/A
127N/A
127N/A
844N/A
844N/A
618N/A <div class="refnamediv">
1273N/A<h2>Name</h2>
127N/A<p>
127N/A lwres_gai_strerror
127N/A &#8212; print suitable error string
127N/A </p>
127N/A</div>
127N/A
127N/A <div class="refsynopsisdiv" title="Synopsis">
127N/A<h2>Synopsis</h2>
127N/A <div class="funcsynopsis">
127N/A<pre class="funcsynopsisinfo">#include &lt;lwres/netdb.h&gt;</pre>
127N/A<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr>
127N/A<td><code class="funcdef">
127N/Achar *
650N/A<b class="fsfunc">gai_strerror</b>(</code></td>
127N/A<td>int <var class="pdparam">ecode</var><code>)</code>;</td>
650N/A</tr></table>
127N/A<div class="funcprototype-spacer">�</div>
127N/A</div>
127N/A </div>
373N/A
127N/A <div class="refsection" title="DESCRIPTION">
127N/A<a name="idp60845648"></a><h2>DESCRIPTION</h2>
<p><code class="function">lwres_gai_strerror()</code>
returns an error message corresponding to an error code returned by
<code class="function">getaddrinfo()</code>.
The following error codes and their meaning are defined in
<code class="filename">include/lwres/netdb.h</code>.
</p>
<div class="variablelist"><dl>
<dt><span class="term"><span class="errorcode">EAI_ADDRFAMILY</span></span></dt>
<dd>
<p>
address family for hostname not supported
</p>
</dd>
<dt><span class="term"><span class="errorcode">EAI_AGAIN</span></span></dt>
<dd>
<p>
temporary failure in name resolution
</p>
</dd>
<dt><span class="term"><span class="errorcode">EAI_BADFLAGS</span></span></dt>
<dd>
<p>
invalid value for
<code class="constant">ai_flags</code>
</p>
</dd>
<dt><span class="term"><span class="errorcode">EAI_FAIL</span></span></dt>
<dd>
<p>
non-recoverable failure in name resolution
</p>
</dd>
<dt><span class="term"><span class="errorcode">EAI_FAMILY</span></span></dt>
<dd>
<p><code class="constant">ai_family</code> not supported
</p>
</dd>
<dt><span class="term"><span class="errorcode">EAI_MEMORY</span></span></dt>
<dd>
<p>
memory allocation failure
</p>
</dd>
<dt><span class="term"><span class="errorcode">EAI_NODATA</span></span></dt>
<dd>
<p>
no address associated with hostname
</p>
</dd>
<dt><span class="term"><span class="errorcode">EAI_NONAME</span></span></dt>
<dd>
<p>
hostname or servname not provided, or not known
</p>
</dd>
<dt><span class="term"><span class="errorcode">EAI_SERVICE</span></span></dt>
<dd>
<p>
servname not supported for <code class="constant">ai_socktype</code>
</p>
</dd>
<dt><span class="term"><span class="errorcode">EAI_SOCKTYPE</span></span></dt>
<dd>
<p><code class="constant">ai_socktype</code> not supported
</p>
</dd>
<dt><span class="term"><span class="errorcode">EAI_SYSTEM</span></span></dt>
<dd>
<p>
system error returned in errno
</p>
</dd>
</dl></div>
<p>
The message <span class="errorname">invalid error code</span> is returned if
<em class="parameter"><code>ecode</code></em>
is out of range.
</p>
<p><code class="constant">ai_flags</code>,
<code class="constant">ai_family</code>
and
<code class="constant">ai_socktype</code>
are elements of the
<span class="type">struct addrinfo</span>
used by
<code class="function">lwres_getaddrinfo()</code>.
</p>
</div>
<div class="refsection" title="SEE ALSO">
<a name="idp60879696"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry">
<span class="refentrytitle">strerror</span>(3)
</span>,
<span class="citerefentry">
<span class="refentrytitle">lwres_getaddrinfo</span>(3)
</span>,
<span class="citerefentry">
<span class="refentrytitle">getaddrinfo</span>(3)
</span>,
<span class="citerefentry">
<span class="refentrytitle">RFC2133</span>
</span>.
</p>
</div>
</div></body>
</html>