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_hstrerror.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_hstrerror</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>lwres_herror, lwres_hstrerror — lightweight resolver error message generation</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">lwres_herror</b>(</code>const char *s<code>)</code>;</p>
37 <p><code class="funcdef">
39 <b class="fsfunc">lwres_hstrerror</b>(</code>int err<code>)</code>;</p>
42 <div class="refsect1" lang="en">
43 <a name="id2549424"></a><h2>DESCRIPTION</h2>
45 <code class="function">lwres_herror()</code> prints the string
46 <em class="parameter"><code>s</code></em> on <span class="type">stderr</span> followed by the string
47 generated by <code class="function">lwres_hstrerror()</code> for the error code
48 stored in the global variable <code class="constant">lwres_h_errno</code>.
51 <code class="function">lwres_hstrerror()</code> returns an appropriate string
52 for the error code gievn by <em class="parameter"><code>err</code></em>. The values of
53 the error codes and messages are as follows:
56 <div class="variablelist"><dl>
57 <dt><span class="term"><span class="errorcode">NETDB_SUCCESS</span></span></dt>
59 <span class="errorname">Resolver Error 0 (no error)</span>
61 <dt><span class="term"><span class="errorcode">HOST_NOT_FOUND</span></span></dt>
63 <span class="errorname">Unknown host</span>
65 <dt><span class="term"><span class="errorcode">TRY_AGAIN</span></span></dt>
67 <span class="errorname">Host name lookup failure</span>
69 <dt><span class="term"><span class="errorcode">NO_RECOVERY</span></span></dt>
71 <span class="errorname">Unknown server error</span>
73 <dt><span class="term"><span class="errorcode">NO_DATA</span></span></dt>
75 <span class="errorname">No address associated with name</span>
81 <div class="refsect1" lang="en">
82 <a name="id2549536"></a><h2>RETURN VALUES</h2>
84 The string <span class="errorname">Unknown resolver error</span> is returned by
85 <code class="function">lwres_hstrerror()</code>
87 <code class="constant">lwres_h_errno</code>
88 is not a valid error code.
91 <div class="refsect1" lang="en">
92 <a name="id2549555"></a><h2>SEE ALSO</h2>
94 <span class="citerefentry"><span class="refentrytitle">herror</span>(3)</span>,
96 <span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3)</span>.