2 - Copyright (C) 2004, 2005, 2007, 2014 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.
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">
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_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 <table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0" style=
"padding-bottom: 1em"><tr>
35 <td><code class=
"funcdef">
37 <b class=
"fsfunc">lwres_herror
</b>(
</code></td>
38 <td>const char *
</td>
40 <var class=
"pdparam">s
</var><code>)
</code>;
</td>
42 <table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0"><tr>
43 <td><code class=
"funcdef">
45 <b class=
"fsfunc">lwres_hstrerror
</b>(
</code></td>
48 <var class=
"pdparam">err
</var><code>)
</code>;
</td>
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>.
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:
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>
70 <dt><span class=
"term"><span class=
"errorcode">HOST_NOT_FOUND
</span></span></dt>
71 <dd><p><span class=
"errorname">Unknown host
</span>
73 <dt><span class=
"term"><span class=
"errorcode">TRY_AGAIN
</span></span></dt>
74 <dd><p><span class=
"errorname">Host name lookup failure
</span>
76 <dt><span class=
"term"><span class=
"errorcode">NO_RECOVERY
</span></span></dt>
77 <dd><p><span class=
"errorname">Unknown server error
</span>
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>
86 <div class=
"refsect1" lang=
"en">
87 <a name=
"id2543507"></a><h2>RETURN VALUES
</h2>
89 The string
<span class=
"errorname">Unknown resolver error
</span> is returned by
90 <code class=
"function">lwres_hstrerror()
</code>
92 <code class=
"constant">lwres_h_errno
</code>
93 is not a valid error code.
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>,
100 <span class=
"citerefentry"><span class=
"refentrytitle">lwres_hstrerror
</span>(
3)
</span>.