lwres_hstrerror.html revision 75c0816e8295e180f4bc7f10db3d0d880383bc1c
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce - Copyright (C) 2000, 2001 Internet Software Consortium.
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce - Permission to use, copy, modify, and distribute this software for any
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce - purpose with or without fee is hereby granted, provided that the above
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce - copyright notice and this permission notice appear in all copies.
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce - PERFORMANCE OF THIS SOFTWARE.
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<!-- $Id: lwres_hstrerror.html,v 1.14 2005/05/13 03:14:15 marka Exp $ -->
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<a name="id2456836"></a><div class="titlepage"></div>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<p>lwres_herror, lwres_hstrerror — lightweight resolver error message generation</p>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<pre class="funcsynopsisinfo">#include <lwres/netdb.h></pre>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<b class="fsfunc">lwres_herror</b>(</code>const char *<var class="pdparam">s</var><code>)</code>;</p>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<b class="fsfunc">lwres_hstrerror</b>(</code>int <var class="pdparam">err</var><code>)</code>;</p>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce prints the string <em class="parameter"><code>s</code></em> on
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce <span class="type">stderr</span> followed by the string generated by
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce <code class="function">lwres_hstrerror()</code> for the error code stored
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce in the global variable <code class="constant">lwres_h_errno</code>.
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce returns an appropriate string for the error code gievn by
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce <em class="parameter"><code>err</code></em>. The values of the error codes and
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce messages are as follows:
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<dt><span class="term"><span class="errorcode">NETDB_SUCCESS</span></span></dt>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<dd><p><span class="errorname">Resolver Error 0 (no error)</span>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<dt><span class="term"><span class="errorcode">HOST_NOT_FOUND</span></span></dt>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<dt><span class="term"><span class="errorcode">TRY_AGAIN</span></span></dt>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<dd><p><span class="errorname">Host name lookup failure</span>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<dt><span class="term"><span class="errorcode">NO_RECOVERY</span></span></dt>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<dd><p><span class="errorname">Unknown server error</span>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<dt><span class="term"><span class="errorcode">NO_DATA</span></span></dt>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<dd><p><span class="errorname">No address associated with name</span>
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce The string <span class="errorname">Unknown resolver error</span> is returned by
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce when the value of
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce is not a valid error code.
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce<p><span class="citerefentry"><span class="refentrytitle">herror</span>(3)</span>,
55c73d07349b0be7d800f39fcc30eba6ab760129Eric Luce <span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3)</span>.