lwres_config.html revision fd2597f75693a2279fdf588bd40dfe2407c42028
794b79e6bbc3f5db1ea6ae154d739b9f1ef1a375Tinderbox User - Copyright (C) 2004, 2005, 2007, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews - Copyright (C) 2000, 2001 Internet Software Consortium.
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater - Permission to use, copy, modify, and/or distribute this software for any
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - purpose with or without fee is hereby granted, provided that the above
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - copyright notice and this permission notice appear in all copies.
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<a name="id-1"></a><div class="titlepage"></div>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<p>lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_conf_get — lightweight resolver configuration</p>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<pre class="funcsynopsisinfo">#include <lwres/lwres.h></pre>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<b class="fsfunc">lwres_conf_init</b>(</code></td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<b class="fsfunc">lwres_conf_clear</b>(</code></td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox Userlwres_result_t
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<b class="fsfunc">lwres_conf_parse</b>(</code></td>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<td>lwres_context_t *<var class="pdparam">ctx</var>, </td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<td>const char *<var class="pdparam">filename</var><code>)</code>;</td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox Userlwres_result_t
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<b class="fsfunc">lwres_conf_print</b>(</code></td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<td>lwres_context_t *<var class="pdparam">ctx</var>, </td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<td>FILE *<var class="pdparam">fp</var><code>)</code>;</td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinlwres_conf_t *
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<b class="fsfunc">lwres_conf_get</b>(</code></td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><code class="function">lwres_conf_init()</code>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User creates an empty
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User structure for lightweight resolver context
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><code class="function">lwres_conf_clear()</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein frees up all the internal memory used by
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein structure in resolver context
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User<p><code class="function">lwres_conf_parse()</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein opens the file
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>filename</code></em>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User and parses it to initialise the resolver context
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User <em class="parameter"><code>ctx</code></em>'s
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><code class="function">lwres_conf_print()</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein structure for resolver context
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<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
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User <em class="parameter"><code>filename</code></em>.
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews It returns <span class="errorcode">LWRES_R_FAILURE</span>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User if <em class="parameter"><code>filename</code></em>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User could not be opened or contained incorrect
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User resolver statements.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><code class="function">lwres_conf_print()</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein returns <span class="errorcode">LWRES_R_SUCCESS</span>
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User unless an error occurred when converting the network addresses to a
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews numeric host address string.
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User If this happens, the function returns
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User <span class="errorcode">LWRES_R_FAILURE</span>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><span class="citerefentry"><span class="refentrytitle">stdio</span>(3)</span>,
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User <span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><code class="filename">/etc/resolv.conf</code>