summaryrefslogtreecommitdiffstats
path: root/lib/lwres/man/lwres_hstrerror.html
blob: f20c392bfa2b1d2dd1169db3217fbc2209d89473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
 - Copyright (C) 2000, 2001, 2004, 2005, 2007, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
 - 
 - This Source Code Form is subject to the terms of the Mozilla Public
 - License, v. 2.0. If a copy of the MPL was not distributed with this
 - file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>lwres_hstrerror</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
<a name="id-1"></a><div class="titlepage"></div>
  
  

  

  

  <div class="refnamediv">
<h2>Name</h2>
<p>
    lwres_herror, 
    lwres_hstrerror
     &#8212; lightweight resolver error message generation
  </p>
</div>
  <div class="refsynopsisdiv">
<h2>Synopsis</h2>
    <div class="funcsynopsis">
<pre class="funcsynopsisinfo">#include &lt;lwres/netdb.h&gt;</pre>
<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
<td><code class="funcdef">
void
<b class="fsfunc">lwres_herror</b>(</code></td>
<td>const char *<var class="pdparam">s</var><code>)</code>;</td>
</tr></table>
<div class="funcprototype-spacer"></div>
<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
<td><code class="funcdef">
const char *
<b class="fsfunc">lwres_hstrerror</b>(</code></td>
<td>int <var class="pdparam">err</var><code>)</code>;</td>
</tr></table>
<div class="funcprototype-spacer"></div>
</div>
  </div>

  <div class="refsection">
<a name="id-1.7"></a><h2>DESCRIPTION</h2>


    <p><code class="function">lwres_herror()</code>
      prints the string <em class="parameter"><code>s</code></em> on
      <span class="type">stderr</span> followed by the string generated by
      <code class="function">lwres_hstrerror()</code> for the error code stored
      in the global variable <code class="constant">lwres_h_errno</code>.
    </p>

    <p><code class="function">lwres_hstrerror()</code>
      returns an appropriate string for the error code gievn by
      <em class="parameter"><code>err</code></em>.  The values of the error codes and
      messages are as follows:

      </p>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><span class="errorcode">NETDB_SUCCESS</span></span></dt>
<dd>
            <p><span class="errorname">Resolver Error 0 (no error)</span>
            </p>
          </dd>
<dt><span class="term"><span class="errorcode">HOST_NOT_FOUND</span></span></dt>
<dd>
            <p><span class="errorname">Unknown host</span>
            </p>
          </dd>
<dt><span class="term"><span class="errorcode">TRY_AGAIN</span></span></dt>
<dd>
            <p><span class="errorname">Host name lookup failure</span>
            </p>
          </dd>
<dt><span class="term"><span class="errorcode">NO_RECOVERY</span></span></dt>
<dd>
            <p><span class="errorname">Unknown server error</span>
            </p>
          </dd>
<dt><span class="term"><span class="errorcode">NO_DATA</span></span></dt>
<dd>
            <p><span class="errorname">No address associated with name</span>
            </p>
          </dd>
</dl></div>
<p>
    </p>
  </div>

  <div class="refsection">
<a name="id-1.8"></a><h2>RETURN VALUES</h2>

    <p>
      The string <span class="errorname">Unknown resolver error</span> is returned by
      <code class="function">lwres_hstrerror()</code>
      when the value of
      <code class="constant">lwres_h_errno</code>
      is not a valid error code.
    </p>
  </div>
  <div class="refsection">
<a name="id-1.9"></a><h2>SEE ALSO</h2>

    <p><span class="citerefentry">
        <span class="refentrytitle">herror</span>(3)
      </span>,

      <span class="citerefentry">
        <span class="refentrytitle">lwres_hstrerror</span>(3)
      </span>.
    </p>

  </div>
</div></body>
</html>