lwres_config.docbook revision 83a28ca274521e15086fc39febde507bcc4e145e
194N/A<!--
194N/A - Copyright (C) 2000, 2001, 2004, 2005, 2007, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
194N/A -
194N/A - This Source Code Form is subject to the terms of the Mozilla Public
194N/A - License, v. 2.0. If a copy of the MPL was not distributed with this
194N/A - file, You can obtain one at http://mozilla.org/MPL/2.0/.
194N/A-->
194N/A
194N/A<!-- Converted by db4-upgrade version 1.0 -->
194N/A<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
194N/A <info>
194N/A <date>2007-06-18</date>
194N/A </info>
194N/A <refentryinfo>
194N/A <corpname>ISC</corpname>
194N/A <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
194N/A </refentryinfo>
194N/A
194N/A <refmeta>
194N/A <refentrytitle>lwres_config</refentrytitle>
194N/A <manvolnum>3</manvolnum>
194N/A <refmiscinfo>BIND9</refmiscinfo>
3996N/A </refmeta>
194N/A
194N/A <docinfo>
194N/A <copyright>
194N/A <year>2000</year>
194N/A <year>2001</year>
194N/A <year>2004</year>
618N/A <year>2005</year>
194N/A <year>2007</year>
194N/A <year>2014</year>
844N/A <year>2015</year>
844N/A <year>2016</year>
194N/A <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
194N/A </copyright>
1273N/A </docinfo>
194N/A
3661N/A <refnamediv>
3661N/A <refname>lwres_conf_init</refname>
3996N/A <refname>lwres_conf_clear</refname>
3996N/A <refname>lwres_conf_parse</refname>
3996N/A <refname>lwres_conf_print</refname>
194N/A <refname>lwres_conf_get</refname>
194N/A <refpurpose>lightweight resolver configuration</refpurpose>
194N/A </refnamediv>
194N/A
194N/A <refsynopsisdiv>
206N/A <funcsynopsis>
194N/A<funcsynopsisinfo>#include &lt;lwres/lwres.h&gt;</funcsynopsisinfo>
194N/A<funcprototype>
194N/A <funcdef>
194N/Avoid
194N/A<function>lwres_conf_init</function></funcdef>
194N/A <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
194N/A </funcprototype>
194N/A<funcprototype>
194N/A <funcdef>
194N/Avoid
194N/A<function>lwres_conf_clear</function></funcdef>
194N/A <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
194N/A </funcprototype>
3996N/A<funcprototype>
<funcdef>
lwres_result_t
<function>lwres_conf_parse</function></funcdef>
<paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
<paramdef>const char *<parameter>filename</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
lwres_result_t
<function>lwres_conf_print</function></funcdef>
<paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
<paramdef>FILE *<parameter>fp</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>
lwres_conf_t *
<function>lwres_conf_get</function></funcdef>
<paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsection><info><title>DESCRIPTION</title></info>
<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>
</refsection>
<refsection><info><title>RETURN VALUES</title></info>
<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>
</refsection>
<refsection><info><title>SEE ALSO</title></info>
<para><citerefentry>
<refentrytitle>stdio</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>resolver</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>.
</para>
</refsection>
<refsection><info><title>FILES</title></info>
<para><filename>/etc/resolv.conf</filename>
</para>
</refsection>
</refentry>