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