lwres_hstrerror.docbook revision 83a28ca274521e15086fc39febde507bcc4e145e
98N/A<!--
98N/A - Copyright (C) 2000, 2001, 2004, 2005, 2007, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
98N/A -
98N/A - This Source Code Form is subject to the terms of the Mozilla Public
910N/A - License, v. 2.0. If a copy of the MPL was not distributed with this
761N/A - file, You can obtain one at http://mozilla.org/MPL/2.0/.
98N/A-->
98N/A
98N/A<!-- Converted by db4-upgrade version 1.0 -->
98N/A<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
98N/A <info>
98N/A <date>2007-06-18</date>
98N/A </info>
98N/A <refentryinfo>
98N/A <corpname>ISC</corpname>
98N/A <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
98N/A </refentryinfo>
98N/A
98N/A <refmeta>
98N/A <refentrytitle>lwres_hstrerror</refentrytitle>
98N/A <manvolnum>3</manvolnum>
98N/A <refmiscinfo>BIND9</refmiscinfo>
98N/A </refmeta>
98N/A
98N/A <docinfo>
98N/A <copyright>
98N/A <year>2000</year>
98N/A <year>2001</year>
98N/A <year>2004</year>
98N/A <year>2005</year>
98N/A <year>2007</year>
98N/A <year>2014</year>
98N/A <year>2015</year>
98N/A <year>2016</year>
98N/A <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
493N/A </copyright>
98N/A </docinfo>
98N/A
851N/A <refnamediv>
98N/A <refname>lwres_herror</refname>
911N/A <refname>lwres_hstrerror</refname>
911N/A <refpurpose>lightweight resolver error message generation</refpurpose>
911N/A </refnamediv>
911N/A <refsynopsisdiv>
98N/A <funcsynopsis>
371N/A<funcsynopsisinfo>#include &lt;lwres/netdb.h&gt;</funcsynopsisinfo>
98N/A<funcprototype>
98N/A <funcdef>
98N/Avoid
98N/A<function>lwres_herror</function></funcdef>
98N/A <paramdef>const char *<parameter>s</parameter></paramdef>
559N/A </funcprototype>
98N/A<funcprototype>
493N/A <funcdef>
559N/Aconst char *
98N/A<function>lwres_hstrerror</function></funcdef>
98N/A <paramdef>int <parameter>err</parameter></paramdef>
493N/A </funcprototype>
98N/A</funcsynopsis>
98N/A </refsynopsisdiv>
606N/A
98N/A <refsection><info><title>DESCRIPTION</title></info>
98N/A
761N/A
559N/A <para><function>lwres_herror()</function>
559N/A prints the string <parameter>s</parameter> on
761N/A <type>stderr</type> followed by the string generated by
761N/A <function>lwres_hstrerror()</function> for the error code stored
98N/A in the global variable <constant>lwres_h_errno</constant>.
98N/A </para>
810N/A
910N/A <para><function>lwres_hstrerror()</function>
910N/A returns an appropriate string for the error code gievn by
910N/A <parameter>err</parameter>. The values of the error codes and
761N/A messages are as follows:
<variablelist>
<varlistentry>
<term><errorcode>NETDB_SUCCESS</errorcode></term>
<listitem>
<para><errorname>Resolver Error 0 (no error)</errorname>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>HOST_NOT_FOUND</errorcode></term>
<listitem>
<para><errorname>Unknown host</errorname>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>TRY_AGAIN</errorcode></term>
<listitem>
<para><errorname>Host name lookup failure</errorname>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>NO_RECOVERY</errorcode></term>
<listitem>
<para><errorname>Unknown server error</errorname>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>NO_DATA</errorcode></term>
<listitem>
<para><errorname>No address associated with name</errorname>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsection>
<refsection><info><title>RETURN VALUES</title></info>
<para>
The string <errorname>Unknown resolver error</errorname> is returned by
<function>lwres_hstrerror()</function>
when the value of
<constant>lwres_h_errno</constant>
is not a valid error code.
</para>
</refsection>
<refsection><info><title>SEE ALSO</title></info>
<para><citerefentry>
<refentrytitle>herror</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>lwres_hstrerror</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>.
</para>
</refsection>
</refentry>