lwres_config.docbook revision ec5347e2c775f027573ce5648b910361aa926c01
203N/A<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
203N/A "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
203N/A [<!ENTITY mdash "&#8212;">]>
203N/A<!--
203N/A - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
203N/A - Copyright (C) 2000, 2001 Internet Software Consortium.
203N/A -
203N/A - Permission to use, copy, modify, and/or distribute this software for any
203N/A - purpose with or without fee is hereby granted, provided that the above
203N/A - copyright notice and this permission notice appear in all copies.
203N/A -
203N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
203N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
203N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
203N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
203N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
203N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
203N/A - PERFORMANCE OF THIS SOFTWARE.
203N/A-->
203N/A
3996N/A<!-- $Id: lwres_config.docbook,v 1.9 2007/06/18 23:47:51 tbox Exp $ -->
203N/A<refentry>
203N/A <refentryinfo>
203N/A
203N/A <date>Jun 30, 2000</date>
203N/A </refentryinfo>
618N/A
203N/A <refmeta>
203N/A <refentrytitle>lwres_config</refentrytitle>
844N/A <manvolnum>3</manvolnum>
844N/A <refmiscinfo>BIND9</refmiscinfo>
203N/A </refmeta>
1273N/A
203N/A <docinfo>
3661N/A <copyright>
3661N/A <year>2004</year>
278N/A <year>2005</year>
278N/A <year>2007</year>
3996N/A <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
3996N/A </copyright>
3996N/A <copyright>
203N/A <year>2000</year>
203N/A <year>2001</year>
203N/A <holder>Internet Software Consortium.</holder>
206N/A </copyright>
203N/A </docinfo>
203N/A
203N/A <refnamediv>
203N/A <refname>lwres_conf_init</refname>
203N/A <refname>lwres_conf_clear</refname>
203N/A <refname>lwres_conf_parse</refname>
203N/A <refname>lwres_conf_print</refname>
203N/A <refname>lwres_conf_get</refname>
203N/A <refpurpose>lightweight resolver configuration</refpurpose>
206N/A </refnamediv>
206N/A
203N/A <refsynopsisdiv>
203N/A <funcsynopsis>
203N/A<funcsynopsisinfo>#include &lt;lwres/lwres.h&gt;</funcsynopsisinfo>
203N/A<funcprototype>
203N/A <funcdef>
203N/Avoid
203N/A<function>lwres_conf_init</function></funcdef>
203N/A <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
203N/A </funcprototype>
203N/A<funcprototype>
203N/A <funcdef>
203N/Avoid
203N/A<function>lwres_conf_clear</function></funcdef>
267N/A <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
203N/A </funcprototype>
203N/A<funcprototype>
203N/A <funcdef>
203N/Alwres_result_t
813N/A<function>lwres_conf_parse</function></funcdef>
206N/A <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
203N/A <paramdef>const char *<parameter>filename</parameter></paramdef>
203N/A </funcprototype>
203N/A<funcprototype>
203N/A <funcdef>
203N/Alwres_result_t
203N/A<function>lwres_conf_print</function></funcdef>
203N/A <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
203N/A <paramdef>FILE *<parameter>fp</parameter></paramdef>
203N/A </funcprototype>
203N/A<funcprototype>
4234N/A <funcdef>
3996N/Alwres_conf_t *
3996N/A<function>lwres_conf_get</function></funcdef>
3996N/A <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para><function>lwres_conf_init()</function>
creates an empty
<type>lwres_conf_t</type>
structure for lightweight resolver context
<parameter>ctx</parameter>.
</para>
<para><function>lwres_conf_clear()</function>
frees up all the internal memory used by
that
<type>lwres_conf_t</type>
structure in resolver context
<parameter>ctx</parameter>.
</para>
<para><function>lwres_conf_parse()</function>
opens the file
<parameter>filename</parameter>
and parses it to initialise the resolver context
<parameter>ctx</parameter>'s
<type>lwres_conf_t</type>
structure.
</para>
<para><function>lwres_conf_print()</function>
prints the
<type>lwres_conf_t</type>
structure for resolver context
<parameter>ctx</parameter>
to the
<type>FILE</type>
<parameter>fp</parameter>.
</para>
</refsect1>
<refsect1>
<title>RETURN VALUES</title>
<para><function>lwres_conf_parse()</function>
returns <errorcode>LWRES_R_SUCCESS</errorcode>
if it successfully read and parsed
<parameter>filename</parameter>.
It returns <errorcode>LWRES_R_FAILURE</errorcode>
if <parameter>filename</parameter>
could not be opened or contained incorrect
resolver statements.
</para>
<para><function>lwres_conf_print()</function>
returns <errorcode>LWRES_R_SUCCESS</errorcode>
unless an error occurred when converting the network addresses to a
numeric host address string.
If this happens, the function returns
<errorcode>LWRES_R_FAILURE</errorcode>.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para><citerefentry>
<refentrytitle>stdio</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>resolver</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>.
</para>
</refsect1>
<refsect1>
<title>FILES</title>
<para><filename>/etc/resolv.conf</filename>
</para>
</refsect1>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->