d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - Copyright (C) 2000, 2001, 2004, 2005, 2007, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - This Source Code Form is subject to the terms of the Mozilla Public
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - License, v. 2.0. If a copy of the MPL was not distributed with this
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - file, You can obtain one at http://mozilla.org/MPL/2.0/.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<a name="id-1"></a><div class="titlepage"></div>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User lwres_conf_init,
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User lwres_conf_clear,
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User lwres_conf_parse,
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User lwres_conf_print,
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User lwres_conf_get
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User — lightweight resolver configuration
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<pre class="funcsynopsisinfo">#include <lwres/lwres.h></pre>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<b class="fsfunc">lwres_conf_init</b>(</code></td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<b class="fsfunc">lwres_conf_clear</b>(</code></td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinlwres_result_t
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<b class="fsfunc">lwres_conf_parse</b>(</code></td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>lwres_context_t *<var class="pdparam">ctx</var>, </td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>const char *<var class="pdparam">filename</var><code>)</code>;</td>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinlwres_result_t
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<b class="fsfunc">lwres_conf_print</b>(</code></td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>lwres_context_t *<var class="pdparam">ctx</var>, </td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>FILE *<var class="pdparam">fp</var><code>)</code>;</td>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinlwres_conf_t *
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<b class="fsfunc">lwres_conf_get</b>(</code></td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><code class="function">lwres_conf_init()</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein creates an empty
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein structure for lightweight resolver context
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><code class="function">lwres_conf_clear()</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein frees up all the internal memory used by
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein structure in resolver context
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><code class="function">lwres_conf_parse()</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein opens the file
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>filename</code></em>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein and parses it to initialise the resolver context
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><code class="function">lwres_conf_print()</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein structure for resolver context
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><code class="function">lwres_conf_parse()</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein returns <span class="errorcode">LWRES_R_SUCCESS</span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein if it successfully read and parsed
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>filename</code></em>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein It returns <span class="errorcode">LWRES_R_FAILURE</span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein if <em class="parameter"><code>filename</code></em>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein could not be opened or contained incorrect
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein resolver statements.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><code class="function">lwres_conf_print()</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein returns <span class="errorcode">LWRES_R_SUCCESS</span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein unless an error occurred when converting the network addresses to a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein numeric host address string.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein If this happens, the function returns
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <span class="refentrytitle">resolver</span>(5)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <p><code class="filename">/etc/resolv.conf</code>