ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<!--
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - Copyright (C) 2000, 2001, 2004, 2005, 2007, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson -
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - file, You can obtain one at http://mozilla.org/MPL/2.0/.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson-->
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<!-- Converted by db4-upgrade version 1.0 -->
83a28ca274521e15086fc39febde507bcc4e145eMark Andrews<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <info>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <date>2007-06-18</date>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt </info>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refentryinfo>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <corpname>ISC</corpname>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </refentryinfo>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refmeta>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refentrytitle>lwres_config</refentrytitle>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <manvolnum>3</manvolnum>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refmiscinfo>BIND9</refmiscinfo>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </refmeta>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <docinfo>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <copyright>
194e2dfffa6a167b8eef0ad11864026b423a1c30Mark Andrews <year>2000</year>
194e2dfffa6a167b8eef0ad11864026b423a1c30Mark Andrews <year>2001</year>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <year>2004</year>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <year>2005</year>
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark Andrews <year>2007</year>
938440694b33cd752e9e4b71a526368b4811c177Tinderbox User <year>2014</year>
19c7b1a0293498a3e36692c59646ed6e15ffc8d0Tinderbox User <year>2015</year>
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews <year>2016</year>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </copyright>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </docinfo>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refnamediv>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refname>lwres_conf_init</refname>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refname>lwres_conf_clear</refname>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refname>lwres_conf_parse</refname>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refname>lwres_conf_print</refname>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refname>lwres_conf_get</refname>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refpurpose>lightweight resolver configuration</refpurpose>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </refnamediv>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refsynopsisdiv>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <funcsynopsis>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<funcsynopsisinfo>#include &lt;lwres/lwres.h&gt;</funcsynopsisinfo>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<funcprototype>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <funcdef>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonvoid
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<function>lwres_conf_init</function></funcdef>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </funcprototype>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<funcprototype>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <funcdef>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonvoid
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<function>lwres_conf_clear</function></funcdef>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </funcprototype>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<funcprototype>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <funcdef>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonlwres_result_t
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<function>lwres_conf_parse</function></funcdef>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <paramdef>const char *<parameter>filename</parameter></paramdef>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </funcprototype>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<funcprototype>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <funcdef>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonlwres_result_t
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<function>lwres_conf_print</function></funcdef>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <paramdef>FILE *<parameter>fp</parameter></paramdef>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </funcprototype>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<funcprototype>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <funcdef>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonlwres_conf_t *
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<function>lwres_conf_get</function></funcdef>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <paramdef>lwres_context_t *<parameter>ctx</parameter></paramdef>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </funcprototype>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson</funcsynopsis>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </refsynopsisdiv>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <refsection><info><title>DESCRIPTION</title></info>
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <para><function>lwres_conf_init()</function>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein creates an empty
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <type>lwres_conf_t</type>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein structure for lightweight resolver context
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <parameter>ctx</parameter>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </para>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <para><function>lwres_conf_clear()</function>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein frees up all the internal memory used by
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein that
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <type>lwres_conf_t</type>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein structure in resolver context
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <parameter>ctx</parameter>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </para>
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <para><function>lwres_conf_parse()</function>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein opens the file
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <parameter>filename</parameter>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein and parses it to initialise the resolver context
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <parameter>ctx</parameter>'s
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <type>lwres_conf_t</type>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein structure.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </para>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <para><function>lwres_conf_print()</function>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein prints the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <type>lwres_conf_t</type>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein structure for resolver context
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <parameter>ctx</parameter>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein to the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <type>FILE</type>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <parameter>fp</parameter>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </para>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt </refsection>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <refsection><info><title>RETURN VALUES</title></info>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <para><function>lwres_conf_parse()</function>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein returns <errorcode>LWRES_R_SUCCESS</errorcode>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if it successfully read and parsed
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <parameter>filename</parameter>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein It returns <errorcode>LWRES_R_FAILURE</errorcode>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if <parameter>filename</parameter>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein could not be opened or contained incorrect
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein resolver statements.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </para>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <para><function>lwres_conf_print()</function>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein returns <errorcode>LWRES_R_SUCCESS</errorcode>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein unless an error occurred when converting the network addresses to a
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein numeric host address string.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein If this happens, the function returns
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <errorcode>LWRES_R_FAILURE</errorcode>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </para>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt </refsection>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <refsection><info><title>SEE ALSO</title></info>
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <para><citerefentry>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refentrytitle>stdio</refentrytitle><manvolnum>3</manvolnum>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </citerefentry>,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <citerefentry>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refentrytitle>resolver</refentrytitle><manvolnum>5</manvolnum>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </citerefentry>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </para>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt </refsection>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <refsection><info><title>FILES</title></info>
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <para><filename>/etc/resolv.conf</filename>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </para>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt </refsection>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt</refentry>