20886N/A - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") 20886N/A - Copyright (C) 2000, 2001 Internet Software Consortium. 20886N/A - Permission to use, copy, modify, and/or distribute this software for any 20886N/A - purpose with or without fee is hereby granted, provided that the above 20886N/A - copyright notice and this permission notice appear in all copies. 20886N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 20886N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 20886N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 20886N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 20886N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 20886N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20886N/A - PERFORMANCE OF THIS SOFTWARE. <
meta http-
equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<
title>lwres_hstrerror</
title>
<
meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
<
body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><
div class="refentry" lang="en">
<
a name="id2476275"></
a><
div class="titlepage"></
div>
<
p>lwres_herror, lwres_hstrerror — lightweight resolver error message generation</
p>
<
div class="refsynopsisdiv">
<
div class="funcsynopsis">
<
pre class="funcsynopsisinfo">#include <
lwres/
netdb.h></
pre>
<
table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><
tr>
<
td><
code class="funcdef">
<
b class="fsfunc">lwres_herror</
b>(</
code></
td>
<
var class="pdparam">s</
var><
code>)</
code>;</
td>
<
table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><
tr>
<
td><
code class="funcdef">
<
b class="fsfunc">lwres_hstrerror</
b>(</
code></
td>
<
var class="pdparam">err</
var><
code>)</
code>;</
td>
<
div class="refsect1" lang="en">
<
a name="id2543379"></
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><
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
<
div class="variablelist"><
dl>
<
dt><
span class="term"><
span class="errorcode">NETDB_SUCCESS</
span></
span></
dt>
<
dd><
p><
span class="errorname">Resolver Error 0 (no error)</
span>
<
dt><
span class="term"><
span class="errorcode">HOST_NOT_FOUND</
span></
span></
dt>
<
dd><
p><
span class="errorname">Unknown host</
span>
<
dt><
span class="term"><
span class="errorcode">TRY_AGAIN</
span></
span></
dt>
<
dd><
p><
span class="errorname">Host name lookup failure</
span>
<
dt><
span class="term"><
span class="errorcode">NO_RECOVERY</
span></
span></
dt>
<
dd><
p><
span class="errorname">Unknown server error</
span>
<
dt><
span class="term"><
span class="errorcode">NO_DATA</
span></
span></
dt>
<
dd><
p><
span class="errorname">No address associated with name</
span>
<
div class="refsect1" lang="en">
<
a name="id2543497"></
a><
h2>RETURN VALUES</
h2>
The string <
span class="errorname">Unknown resolver error</
span> is returned by
<
code class="function">lwres_hstrerror()</
code>
<
code class="constant">lwres_h_errno</
code>
is not a valid error code.
<
div class="refsect1" lang="en">
<
a name="id2543517"></
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>.