lwres_hstrerror.html revision 841179549b6433e782c164a562eb3422f603533d
98N/A<!--
98N/A - Copyright (C) 2000, 2001 Internet Software Consortium.
98N/A -
98N/A - Permission to use, copy, modify, and distribute this software for any
1097N/A - purpose with or without fee is hereby granted, provided that the above
98N/A - copyright notice and this permission notice appear in all copies.
98N/A -
919N/A - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
919N/A - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
919N/A - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
919N/A - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
919N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
919N/A - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
919N/A - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
919N/A - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
919N/A-->
919N/A
919N/A<!-- $Id: lwres_hstrerror.html,v 1.3 2001/06/08 19:32:50 gson Exp $ -->
919N/A
919N/A<HTML
919N/A><HEAD
919N/A><TITLE
919N/A>lwres_hstrerror</TITLE
919N/A><META
98N/ANAME="GENERATOR"
98N/ACONTENT="Modular DocBook HTML Stylesheet Version 1.61
98N/A"></HEAD
98N/A><BODY
493N/ACLASS="REFENTRY"
98N/ABGCOLOR="#FFFFFF"
98N/ATEXT="#000000"
851N/ALINK="#0000FF"
98N/AVLINK="#840084"
911N/AALINK="#0000FF"
911N/A><H1
911N/A><A
911N/ANAME="AEN1"
98N/A>lwres_hstrerror</A
98N/A></H1
98N/A><DIV
98N/ACLASS="REFNAMEDIV"
98N/A><A
493N/ANAME="AEN8"
98N/A></A
98N/A><H2
98N/A>Name</H2
493N/A>lwres_herror, lwres_hstrerror&nbsp;--&nbsp;lightweight resolver error message generation</DIV
1097N/A><DIV
1097N/ACLASS="REFSYNOPSISDIV"
493N/A><A
493N/ANAME="AEN12"
98N/A></A
98N/A><H2
98N/A>Synopsis</H2
191N/A><DIV
CLASS="FUNCSYNOPSIS"
><A
NAME="AEN13"
></A
><P
></P
><PRE
CLASS="FUNCSYNOPSISINFO"
>#include &lt;lwres/netdb.h&gt;</PRE
><P
><CODE
><CODE
CLASS="FUNCDEF"
>void
lwres_herror</CODE
>(const char *s);</CODE
></P
><P
><CODE
><CODE
CLASS="FUNCDEF"
>const char *
lwres_hstrerror</CODE
>(int err);</CODE
></P
><P
></P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN23"
></A
><H2
>DESCRIPTION</H2
><P
><TT
CLASS="FUNCTION"
>lwres_herror()</TT
>
prints the string
<TT
CLASS="PARAMETER"
><I
>s</I
></TT
>
on
<SPAN
CLASS="TYPE"
>stderr</SPAN
>
followed by the string generated by
<TT
CLASS="FUNCTION"
>lwres_hstrerror()</TT
>
for the error code stored in the global variable
<TT
CLASS="CONSTANT"
>lwres_h_errno</TT
>.&#13;</P
><P
><TT
CLASS="FUNCTION"
>lwres_hstrerror()</TT
>
returns an appropriate string for the error code gievn by
<TT
CLASS="PARAMETER"
><I
>err</I
></TT
>.
The values of the error codes and messages are as follows:
<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><SPAN
CLASS="ERRORCODE"
>NETDB_SUCCESS</SPAN
></DT
><DD
><P
><SPAN
CLASS="ERRORNAME"
>Resolver Error 0 (no error)</SPAN
></P
></DD
><DT
><SPAN
CLASS="ERRORCODE"
>HOST_NOT_FOUND</SPAN
></DT
><DD
><P
><SPAN
CLASS="ERRORNAME"
>Unknown host</SPAN
></P
></DD
><DT
><SPAN
CLASS="ERRORCODE"
>TRY_AGAIN</SPAN
></DT
><DD
><P
><SPAN
CLASS="ERRORNAME"
>Host name lookup failure</SPAN
></P
></DD
><DT
><SPAN
CLASS="ERRORCODE"
>NO_RECOVERY</SPAN
></DT
><DD
><P
><SPAN
CLASS="ERRORNAME"
>Unknown server error</SPAN
></P
></DD
><DT
><SPAN
CLASS="ERRORCODE"
>NO_DATA</SPAN
></DT
><DD
><P
><SPAN
CLASS="ERRORNAME"
>No address associated with name</SPAN
></P
></DD
></DL
></DIV
></P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN65"
></A
><H2
>RETURN VALUES</H2
><P
>The string <SPAN
CLASS="ERRORNAME"
>Unknown resolver error</SPAN
> is returned by
<TT
CLASS="FUNCTION"
>lwres_hstrerror()</TT
>
when the value of
<TT
CLASS="CONSTANT"
>lwres_h_errno</TT
>
is not a valid error code.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN71"
></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
></BODY
></HTML
>