perform assertion checks. Such statements are inappropriate as they document the implementation rather than the public interface. The functions are not required to perform assertion checks, but the caller is required to pass arguments that conform to the API requirements.
242 lines
3.5 KiB
HTML
242 lines
3.5 KiB
HTML
<!--
|
|
- Copyright (C) 2000, 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 INTERNET SOFTWARE CONSORTIUM
|
|
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
|
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
|
- INTERNET SOFTWARE CONSORTIUM 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.
|
|
-->
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>lwres_hstrerror</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
|
|
"></HEAD
|
|
><BODY
|
|
CLASS="REFENTRY"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><H1
|
|
><A
|
|
NAME="AEN1"
|
|
>lwres_hstrerror</A
|
|
></H1
|
|
><DIV
|
|
CLASS="REFNAMEDIV"
|
|
><A
|
|
NAME="AEN8"
|
|
></A
|
|
><H2
|
|
>Name</H2
|
|
>lwres_herror, lwres_hstrerror -- lightweight resolver error message generation</DIV
|
|
><DIV
|
|
CLASS="REFSYNOPSISDIV"
|
|
><A
|
|
NAME="AEN12"
|
|
></A
|
|
><H2
|
|
>Synopsis</H2
|
|
><DIV
|
|
CLASS="FUNCSYNOPSIS"
|
|
><A
|
|
NAME="AEN13"
|
|
></A
|
|
><P
|
|
></P
|
|
><PRE
|
|
CLASS="FUNCSYNOPSISINFO"
|
|
>#include <lwres/netdb.h></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
|
|
>.</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
|
|
> |