lwres_config.docbook revision 19c7b1a0293498a3e36692c59646ed6e15ffc8d0
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<!--
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews - Copyright (C) 2004, 2005, 2007, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews - Copyright (C) 2000, 2001 Internet Software Consortium.
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews -
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews - Permission to use, copy, modify, and/or distribute this software for any
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews - purpose with or without fee is hereby granted, provided that the above
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews - copyright notice and this permission notice appear in all copies.
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews -
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews-->
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<!-- Converted by db4-upgrade version 1.0 -->
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<refentry xmlns="http://docbook.org/ns/docbook" version="5.0">
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <info>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <date>2007-06-18</date>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </info>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refentryinfo>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <corpname>ISC</corpname>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </refentryinfo>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refmeta>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refentrytitle>lwres_config</refentrytitle>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <manvolnum>3</manvolnum>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refmiscinfo>BIND9</refmiscinfo>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </refmeta>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <docinfo>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <copyright>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <year>2004</year>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <year>2005</year>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <year>2007</year>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <year>2014</year>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <year>2015</year>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </copyright>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <copyright>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <year>2000</year>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <year>2001</year>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <holder>Internet Software Consortium.</holder>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </copyright>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </docinfo>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refnamediv>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refname>lwres_conf_init</refname>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refname>lwres_conf_clear</refname>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refname>lwres_conf_parse</refname>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refname>lwres_conf_print</refname>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refname>lwres_conf_get</refname>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refpurpose>lightweight resolver configuration</refpurpose>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </refnamediv>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refsynopsisdiv>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <funcsynopsis>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<funcsynopsisinfo>#include &lt;lwres/lwres.h&gt;</funcsynopsisinfo>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<funcprototype>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <funcdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrewsvoid
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<function>lwres_conf_init</function></funcdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </funcprototype>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<funcprototype>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <funcdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrewsvoid
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<function>lwres_conf_clear</function></funcdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </funcprototype>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<funcprototype>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <funcdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrewslwres_result_t
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<function>lwres_conf_parse</function></funcdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <paramdef>const char *<parameter>filename</parameter></paramdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </funcprototype>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<funcprototype>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <funcdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrewslwres_result_t
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<function>lwres_conf_print</function></funcdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <paramdef>FILE *<parameter>fp</parameter></paramdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </funcprototype>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<funcprototype>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <funcdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrewslwres_conf_t *
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews<function>lwres_conf_get</function></funcdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </funcprototype>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews</funcsynopsis>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </refsynopsisdiv>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refsection><info><title>DESCRIPTION</title></info>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <para><function>lwres_conf_init()</function>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews creates an empty
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <type>lwres_conf_t</type>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews structure for lightweight resolver context
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <parameter>ctx</parameter>.
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </para>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <para><function>lwres_conf_clear()</function>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews frees up all the internal memory used by
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews that
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <type>lwres_conf_t</type>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews structure in resolver context
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <parameter>ctx</parameter>.
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </para>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <para><function>lwres_conf_parse()</function>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews opens the file
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <parameter>filename</parameter>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews and parses it to initialise the resolver context
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <parameter>ctx</parameter>'s
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <type>lwres_conf_t</type>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews structure.
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </para>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <para><function>lwres_conf_print()</function>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews prints the
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <type>lwres_conf_t</type>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews structure for resolver context
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <parameter>ctx</parameter>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews to the
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <type>FILE</type>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <parameter>fp</parameter>.
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </para>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </refsection>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refsection><info><title>RETURN VALUES</title></info>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <para><function>lwres_conf_parse()</function>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews returns <errorcode>LWRES_R_SUCCESS</errorcode>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews if it successfully read and parsed
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <parameter>filename</parameter>.
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews It returns <errorcode>LWRES_R_FAILURE</errorcode>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews if <parameter>filename</parameter>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews could not be opened or contained incorrect
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews resolver statements.
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </para>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <para><function>lwres_conf_print()</function>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews returns <errorcode>LWRES_R_SUCCESS</errorcode>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews unless an error occurred when converting the network addresses to a
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews numeric host address string.
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews If this happens, the function returns
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <errorcode>LWRES_R_FAILURE</errorcode>.
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </para>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </refsection>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refsection><info><title>SEE ALSO</title></info>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <para><citerefentry>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refentrytitle>stdio</refentrytitle><manvolnum>3</manvolnum>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </citerefentry>,
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <citerefentry>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refentrytitle>resolver</refentrytitle><manvolnum>5</manvolnum>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </citerefentry>.
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </para>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </refsection>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <refsection><info><title>FILES</title></info>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews <para><filename>/etc/resolv.conf</filename>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </para>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews </refsection>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews</refentry>
ef67e6d8fa86d98a2c0defc43b624434324d9ce7Mark Andrews