lwres_gai_strerror.docbook revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
<!--
- Copyright (C) 2000, 2001, 2004, 2005, 2007, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<!-- Converted by db4-upgrade version 1.0 -->
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0">
<info>
<date>2007-06-18</date>
</info>
<refentryinfo>
<corpname>ISC</corpname>
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
</refentryinfo>
<refmeta>
<refentrytitle>lwres_gai_strerror</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2004</year>
<year>2005</year>
<year>2007</year>
<year>2014</year>
<year>2015</year>
<year>2016</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
<year>2000</year>
<year>2001</year>
<holder>Internet Software Consortium.</holder>
</copyright>
</docinfo>
<refnamediv>
<refname>lwres_gai_strerror</refname>
<refpurpose>print suitable error string</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>#include &lt;lwres/netdb.h&gt;</funcsynopsisinfo>
<funcprototype>
<funcdef>
char *
<function>gai_strerror</function></funcdef>
<paramdef>int <parameter>ecode</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsection><info><title>DESCRIPTION</title></info>
<para><function>lwres_gai_strerror()</function>
returns an error message corresponding to an error code returned by
<function>getaddrinfo()</function>.
The following error codes and their meaning are defined in
<filename>include/lwres/netdb.h</filename>.
<variablelist>
<varlistentry>
<term><errorcode>EAI_ADDRFAMILY</errorcode></term>
<listitem>
<para>
address family for hostname not supported
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_AGAIN</errorcode></term>
<listitem>
<para>
temporary failure in name resolution
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_BADFLAGS</errorcode></term>
<listitem>
<para>
invalid value for
<constant>ai_flags</constant>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_FAIL</errorcode></term>
<listitem>
<para>
non-recoverable failure in name resolution
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_FAMILY</errorcode></term>
<listitem>
<para><constant>ai_family</constant> not supported
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_MEMORY</errorcode></term>
<listitem>
<para>
memory allocation failure
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_NODATA</errorcode></term>
<listitem>
<para>
no address associated with hostname
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_NONAME</errorcode></term>
<listitem>
<para>
hostname or servname not provided, or not known
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_SERVICE</errorcode></term>
<listitem>
<para>
servname not supported for <constant>ai_socktype</constant>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_SOCKTYPE</errorcode></term>
<listitem>
<para><constant>ai_socktype</constant> not supported
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>EAI_SYSTEM</errorcode></term>
<listitem>
<para>
system error returned in errno
</para>
</listitem>
</varlistentry>
</variablelist>
The message <errorname>invalid error code</errorname> is returned if
<parameter>ecode</parameter>
is out of range.
</para>
<para><constant>ai_flags</constant>,
<constant>ai_family</constant>
and
<constant>ai_socktype</constant>
are elements of the
<type>struct addrinfo</type>
used by
<function>lwres_getaddrinfo()</function>.
</para>
</refsection>
<refsection><info><title>SEE ALSO</title></info>
<para><citerefentry>
<refentrytitle>strerror</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>lwres_getaddrinfo</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>getaddrinfo</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>RFC2133</refentrytitle>
</citerefentry>.
</para>
</refsection>
</refentry>