lwres_hstrerror.html revision 89da2a56413ba6294315bdde04f7547b9d71b062
<!--
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: lwres_hstrerror.html,v 1.10 2005/04/03 03:31:37 marka Exp $ -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>lwres_hstrerror</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><H1
><A
NAME="AEN1"
></A
>lwres_hstrerror</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN8"
></A
><H2
>Name</H2
>lwres_herror, lwres_hstrerror&nbsp;--&nbsp;lightweight resolver error message generation</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN12"
></A
><H2
>Synopsis</H2
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN13"
></A
><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
><CODE
CLASS="FUNCTION"
>lwres_herror()</CODE
> prints the string
<CODE
CLASS="PARAMETER"
>s</CODE
> 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
><P
><CODE
CLASS="FUNCTION"
>lwres_hstrerror()</CODE
> returns an appropriate string
for the error code gievn by <CODE
CLASS="PARAMETER"
>err</CODE
>. 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
<CODE
CLASS="FUNCTION"
>lwres_hstrerror()</CODE
>
when the value of
<CODE
CLASS="CONSTANT"
>lwres_h_errno</CODE
>
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
>