2
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
3
- Copyright (C) 2001 Internet Software Consortium.
2
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
3
- Copyright (C) 2000, 2001 Internet Software Consortium.
5
5
- Permission to use, copy, modify, and distribute this software for any
6
6
- purpose with or without fee is hereby granted, provided that the above
7
7
- copyright notice and this permission notice appear in all copies.
9
9
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10
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,
11
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12
12
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
13
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14
14
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
15
- PERFORMANCE OF THIS SOFTWARE.
18
<!-- $Id: lwres_hstrerror.html,v 1.5.2.1.4.2 2004/08/22 23:39:04 marka Exp $ -->
20
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
24
>lwres_hstrerror</TITLE
27
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
47
>lwres_herror, lwres_hstrerror -- lightweight resolver error message generation</DIV
49
CLASS="REFSYNOPSISDIV"
63
CLASS="FUNCSYNOPSISINFO"
64
>#include <lwres/netdb.h></PRE
71
>(const char *s);</CODE
103
> followed by the string
106
>lwres_hstrerror()</CODE
108
stored in the global variable <CODE
115
>lwres_hstrerror()</CODE
116
> returns an appropriate string
117
for the error code gievn by <VAR
17
<!-- $Id: lwres_hstrerror.html,v 1.5.2.1.4.9 2005/10/13 02:33:57 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.69.1">
24
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
25
<a name="id2463721"></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="id2525859"></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
121
53
the error codes and messages are as follows:
137
>Resolver Error 0 (no error)</SPAN
143
>HOST_NOT_FOUND</SPAN
161
>Host name lookup failure</SPAN
173
>Unknown server error</SPAN
185
>No address associated with name</SPAN
202
>Unknown resolver error</SPAN
206
>lwres_hstrerror()</CODE
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="id2525971"></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>
213
is not a valid error code.</P
226
CLASS="REFENTRYTITLE"
87
<code class="constant">lwres_h_errno</code>
88
is not a valid error code.
91
<div class="refsect1" lang="en">
92
<a name="id2525990"></a><h2>SEE ALSO</h2>
94
<span class="citerefentry"><span class="refentrytitle">herror</span>(3)</span>,
234
CLASS="REFENTRYTITLE"
235
>lwres_hstrerror</SPAN
96
<span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3)</span>.