lwres_config.html revision e21a2904f02a03fa06b6db04d348f65fe9c67b2b
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews - Copyright (C) 2000, 2001 Internet Software Consortium.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - Permission to use, copy, modify, and 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.
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews<!-- $Id: lwres_config.html,v 1.20 2006/12/12 01:45:21 marka Exp $ -->
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews<a name="id2476419"></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>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<pre class="funcsynopsisinfo">#include <lwres/lwres.h></pre>
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<b class="fsfunc">lwres_conf_init</b>(</code></td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<var class="pdparam">ctx</var><code>)</code>;</td>
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<b class="fsfunc">lwres_conf_clear</b>(</code></td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<var class="pdparam">ctx</var><code>)</code>;</td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinlwres_result_t
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<b class="fsfunc">lwres_conf_parse</b>(</code></td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<var class="pdparam">filename</var><code>)</code>;</td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinlwres_result_t
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<b class="fsfunc">lwres_conf_print</b>(</code></td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<var class="pdparam">fp</var><code>)</code>;</td>
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinlwres_conf_t *
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<b class="fsfunc">lwres_conf_get</b>(</code></td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<var class="pdparam">ctx</var><code>)</code>;</td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><code class="function">lwres_conf_init()</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein creates an empty
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 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
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<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
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
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.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<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
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><span class="citerefentry"><span class="refentrytitle">stdio</span>(3)</span>,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><code class="filename">/etc/resolv.conf</code>