1<!--
2 - Copyright (C) 2004, 2005, 2007, 2014 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000, 2001 Internet Software Consortium.
4 -
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.
8 -
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.
16-->
17<!-- Id -->
18<html>
19<head>
20<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21<title>lwres_hstrerror</title>
22<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
23</head>
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">
27<h2>Name</h2>
28<p>lwres_herror, lwres_hstrerror &#8212; lightweight resolver error message generation</p>
29</div>
30<div class="refsynopsisdiv">
31<h2>Synopsis</h2>
32<div class="funcsynopsis">
33<pre class="funcsynopsisinfo">#include &lt;lwres/netdb.h&gt;</pre>
34<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
35<td><code class="funcdef">
36void
37<b class="fsfunc">lwres_herror</b>(</code></td>
38<td>const char *�</td>
39<td>
40<var class="pdparam">s</var><code>)</code>;</td>
41</tr></table>
42<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr>
43<td><code class="funcdef">
44const char *
45<b class="fsfunc">lwres_hstrerror</b>(</code></td>
46<td>int �</td>
47<td>
48<var class="pdparam">err</var><code>)</code>;</td>
49</tr></table>
50</div>
51</div>
52<div class="refsect1" lang="en">
53<a name="id2543388"></a><h2>DESCRIPTION</h2>
54<p><code class="function">lwres_herror()</code>
55      prints the string <em class="parameter"><code>s</code></em> on
56      <span class="type">stderr</span> followed by the string generated by
57      <code class="function">lwres_hstrerror()</code> for the error code stored
58      in the global variable <code class="constant">lwres_h_errno</code>.
59    </p>
60<p><code class="function">lwres_hstrerror()</code>
61      returns an appropriate string for the error code gievn by
62      <em class="parameter"><code>err</code></em>.  The values of the error codes and
63      messages are as follows:
64
65      </p>
66<div class="variablelist"><dl>
67<dt><span class="term"><span class="errorcode">NETDB_SUCCESS</span></span></dt>
68<dd><p><span class="errorname">Resolver Error 0 (no error)</span>
69            </p></dd>
70<dt><span class="term"><span class="errorcode">HOST_NOT_FOUND</span></span></dt>
71<dd><p><span class="errorname">Unknown host</span>
72            </p></dd>
73<dt><span class="term"><span class="errorcode">TRY_AGAIN</span></span></dt>
74<dd><p><span class="errorname">Host name lookup failure</span>
75            </p></dd>
76<dt><span class="term"><span class="errorcode">NO_RECOVERY</span></span></dt>
77<dd><p><span class="errorname">Unknown server error</span>
78            </p></dd>
79<dt><span class="term"><span class="errorcode">NO_DATA</span></span></dt>
80<dd><p><span class="errorname">No address associated with name</span>
81            </p></dd>
82</dl></div>
83<p>
84    </p>
85</div>
86<div class="refsect1" lang="en">
87<a name="id2543507"></a><h2>RETURN VALUES</h2>
88<p>
89      The string <span class="errorname">Unknown resolver error</span> is returned by
90      <code class="function">lwres_hstrerror()</code>
91      when the value of
92      <code class="constant">lwres_h_errno</code>
93      is not a valid error code.
94    </p>
95</div>
96<div class="refsect1" lang="en">
97<a name="id2543527"></a><h2>SEE ALSO</h2>
98<p><span class="citerefentry"><span class="refentrytitle">herror</span>(3)</span>,
99
100      <span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3)</span>.
101    </p>
102</div>
103</div></body>
104</html>
105