lwres_config.html revision 83217b5fdc70ea66fedf2ab3e9b9169c2b8a200a
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Copyright (C) 2000, 2001 Internet Software Consortium
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - Permission to use, copy, modify, and distribute this software for any
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - purpose with or without fee is hereby granted, provided that the above
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - copyright notice and this permission notice appear in all copies.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - PERFORMANCE OF THIS SOFTWARE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<!-- $Id: lwres_config.html,v 1.12 2005/05/12 23:54:33 sra Exp $ -->
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<a name="id2456693"></a><div class="titlepage"></div>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p>lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_conf_get — lightweight resolver configuration</p>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<pre class="funcsynopsisinfo">#include <lwres/lwres.h></pre>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<b class="fsfunc">lwres_conf_init</b>(</code></td>
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<b class="fsfunc">lwres_conf_clear</b>(</code></td>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userlwres_result_t
f9ce6280cec79deb16ff6d9807aa493ff23e10d9Tinderbox User<b class="fsfunc">lwres_conf_parse</b>(</code></td>
46472a450e043434d78fa18edc73bca8c47f3981Tinderbox User<var class="pdparam">filename</var><code>)</code>;</td>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntlwres_result_t
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<b class="fsfunc">lwres_conf_print</b>(</code></td>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox Userlwres_conf_t *
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User<b class="fsfunc">lwres_conf_get</b>(</code></td>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User<var class="pdparam">ctx</var><code>)</code>;</td>
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User<p><code class="function">lwres_conf_init()</code>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User creates an empty
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User structure for lightweight resolver context
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User<p><code class="function">lwres_conf_clear()</code>
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User frees up all the internal memory used by
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User structure in resolver context
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User<p><code class="function">lwres_conf_parse()</code>
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User opens the file
6b7cba2b10d6cb5363d94b434b0d22ecfb33a6f3Tinderbox User and parses it to initialise the resolver context
1700442a7751c2bbdafe2d039cebbd8316496957Tinderbox User <em class="parameter"><code>ctx</code></em>'s
576bce9d7331498ca5453f8743f94ed8e2e59d9fTinderbox User<p><code class="function">lwres_conf_print()</code>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User structure for resolver context
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User<a name="id2514197"></a><h2>RETURN VALUES</h2>
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User<p><code class="function">lwres_conf_parse()</code>
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User returns <span class="errorcode">LWRES_R_SUCCESS</span>
1ffe3f29e3cd0d8355500e9fd34de918ad9b4a01Tinderbox User if it successfully read and parsed
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User <em class="parameter"><code>filename</code></em>.
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User It returns <span class="errorcode">LWRES_R_FAILURE</span>
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User if <em class="parameter"><code>filename</code></em>
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User could not be opened or contained incorrect
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User resolver statements.
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User<p><code class="function">lwres_conf_print()</code>
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User returns <span class="errorcode">LWRES_R_SUCCESS</span>
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User unless an error occurred when converting the network addresses to a
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User numeric host address string.
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User If this happens, the function returns
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User <span class="errorcode">LWRES_R_FAILURE</span>.
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User<p><span class="citerefentry"><span class="refentrytitle">stdio</span>(3)</span>,
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User <span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User<p><code class="filename">/etc/resolv.conf</code>