98N/A - Copyright (C) 2000, 2001, 2004, 2005, 2007, 2014-2016 Internet Systems Consortium, Inc. ("ISC") 98N/A - This Source Code Form is subject to the terms of the Mozilla Public 98N/A - License, v. 2.0. If a copy of the MPL was not distributed with this 98N/A<
meta http-
equiv="Content-Type" content="text/html; charset=ISO-8859-1">
98N/A<
title>lwres_hstrerror</
title>
98N/A<
meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
98N/A<
body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><
div class="refentry">
98N/A<
a name="id-1"></
a><
div class="titlepage"></
div>
98N/A <
div class="refnamediv">
98N/A — lightweight resolver error message generation
98N/A <
div class="refsynopsisdiv">
98N/A <
div class="funcsynopsis">
98N/A<
table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><
tr>
98N/A<
td><
code class="funcdef">
156N/A<
b class="fsfunc">lwres_herror</
b>(</
code></
td>
156N/A<
td>const char *<
var class="pdparam">s</
var><
code>)</
code>;</
td>
156N/A<
div class="funcprototype-spacer">�</
div>
98N/A<
table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><
tr>
98N/A<
td><
code class="funcdef">
98N/A<
b class="fsfunc">lwres_hstrerror</
b>(</
code></
td>
98N/A<
td>int <
var class="pdparam">err</
var><
code>)</
code>;</
td>
98N/A<
div class="funcprototype-spacer">�</
div>
98N/A <
div class="refsection">
98N/A<
a name="id-1.7"></
a><
h2>DESCRIPTION</
h2>
98N/A <
p><
code class="function">lwres_herror()</
code>
191N/A prints the string <
em class="parameter"><
code>s</
code></
em> on
145N/A <
span class="type">stderr</
span> followed by the string generated by
194N/A <
code class="function">lwres_hstrerror()</
code> for the error code stored
194N/A in the global variable <
code class="constant">lwres_h_errno</
code>.
98N/A <
p><
code class="function">lwres_hstrerror()</
code>
98N/A returns an appropriate string for the error code gievn by
98N/A <
em class="parameter"><
code>err</
code></
em>. The values of the error codes and
98N/A messages are as follows:
98N/A<
div class="variablelist"><
dl class="variablelist">
98N/A<
dt><
span class="term"><
span class="errorcode">NETDB_SUCCESS</
span></
span></
dt>
98N/A <
p><
span class="errorname">Resolver Error 0 (no error)</
span>
98N/A<
dt><
span class="term"><
span class="errorcode">HOST_NOT_FOUND</
span></
span></
dt>
98N/A <
p><
span class="errorname">Unknown host</
span>
98N/A<
dt><
span class="term"><
span class="errorcode">TRY_AGAIN</
span></
span></
dt>
98N/A <
p><
span class="errorname">Host name lookup failure</
span>
98N/A<
dt><
span class="term"><
span class="errorcode">NO_RECOVERY</
span></
span></
dt>
98N/A <
p><
span class="errorname">Unknown server error</
span>
98N/A<
dt><
span class="term"><
span class="errorcode">NO_DATA</
span></
span></
dt>
140N/A <
p><
span class="errorname">No address associated with name</
span>
98N/A <
div class="refsection">
98N/A<
a name="id-1.8"></
a><
h2>RETURN VALUES</
h2>
98N/A The string <
span class="errorname">Unknown resolver error</
span> is returned by
98N/A <
code class="function">lwres_hstrerror()</
code>
98N/A <
code class="constant">lwres_h_errno</
code>
98N/A is not a valid error code.
98N/A <
div class="refsection">
98N/A<
a name="id-1.9"></
a><
h2>SEE ALSO</
h2>
98N/A <
p><
span class="citerefentry">
98N/A <
span class="refentrytitle">herror</
span>(3)
98N/A <
span class="citerefentry">
98N/A <
span class="refentrytitle">lwres_hstrerror</
span>(3)