2907N/A - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") 2907N/A - Copyright (C) 2000, 2001 Internet Software Consortium. 2907N/A - Permission to use, copy, modify, and distribute this software for any 2907N/A - purpose with or without fee is hereby granted, provided that the above 2907N/A - copyright notice and this permission notice appear in all copies. 2907N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 2907N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 2907N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 2907N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 2907N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 2907N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 2907N/A - PERFORMANCE OF THIS SOFTWARE. 2907N/A<
meta http-
equiv="Content-Type" content="text/html; charset=ISO-8859-1">
2907N/A<
meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
2907N/A<
body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><
div class="refentry" lang="en">
5061N/A<
a name="id2456836"></
a><
div class="titlepage"></
div>
2907N/A<
p>lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_conf_get — lightweight resolver configuration</
p>
2907N/A<
div class="refsynopsisdiv">
2907N/A<
table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><
tr>
2907N/A<
b class="fsfunc">lwres_conf_init</
b>(</
code></
td>
2907N/A<
var class="pdparam">ctx</
var><
code>)</
code>;</
td>
2907N/A<
table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><
tr>
2907N/A<
b class="fsfunc">lwres_conf_clear</
b>(</
code></
td>
2907N/A<
var class="pdparam">ctx</
var><
code>)</
code>;</
td>
2907N/A<
table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
2907N/A<
b class="fsfunc">lwres_conf_parse</
b>(</
code></
td>
2907N/A<
var class="pdparam">ctx</
var>, </
td>
2907N/A<
var class="pdparam">filename</
var><
code>)</
code>;</
td>
2907N/A<
table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
2907N/A<
b class="fsfunc">lwres_conf_print</
b>(</
code></
td>
2907N/A<
var class="pdparam">ctx</
var>, </
td>
2907N/A<
var class="pdparam">fp</
var><
code>)</
code>;</
td>
2907N/A<
table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><
tr>
2907N/A<
b class="fsfunc">lwres_conf_get</
b>(</
code></
td>
2907N/A<
var class="pdparam">ctx</
var><
code>)</
code>;</
td>
2907N/A<
div class="refsect1" lang="en">
2907N/A<
a name="id2514266"></
a><
h2>DESCRIPTION</
h2>
2907N/A<
p><
code class="function">lwres_conf_init()</
code>
2907N/A <
span class="type">lwres_conf_t</
span>
2907N/A structure for lightweight resolver context
2907N/A <
em class="parameter"><
code>ctx</
code></
em>.
<
p><
code class="function">lwres_conf_clear()</
code>
frees up all the internal memory used by
<
span class="type">lwres_conf_t</
span>
structure in resolver context
<
em class="parameter"><
code>ctx</
code></
em>.
<
p><
code class="function">lwres_conf_parse()</
code>
<
em class="parameter"><
code>filename</
code></
em>
and parses it to initialise the resolver context
<
em class="parameter"><
code>ctx</
code></
em>'s
<
span class="type">lwres_conf_t</
span>
<
p><
code class="function">lwres_conf_print()</
code>
<
span class="type">lwres_conf_t</
span>
structure for resolver context
<
em class="parameter"><
code>ctx</
code></
em>
<
span class="type">FILE</
span>
<
em class="parameter"><
code>fp</
code></
em>.
<
div class="refsect1" lang="en">
<
a name="id2514333"></
a><
h2>RETURN VALUES</
h2>
<
p><
code class="function">lwres_conf_parse()</
code>
returns <
span class="errorcode">LWRES_R_SUCCESS</
span>
if it successfully read and parsed
<
em class="parameter"><
code>filename</
code></
em>.
It returns <
span class="errorcode">LWRES_R_FAILURE</
span>
if <
em class="parameter"><
code>filename</
code></
em>
could not be opened or contained incorrect
<
p><
code class="function">lwres_conf_print()</
code>
returns <
span class="errorcode">LWRES_R_SUCCESS</
span>
unless an error occurred when converting the network addresses to a
numeric host address string.
If this happens, the function returns
<
span class="errorcode">LWRES_R_FAILURE</
span>.
<
div class="refsect1" lang="en">
<
a name="id2514371"></
a><
h2>SEE ALSO</
h2>
<
p><
span class="citerefentry"><
span class="refentrytitle">stdio</
span>(3)</
span>,
<
span class="citerefentry"><
span class="refentrytitle">resolver</
span>(5)</
span>.
<
div class="refsect1" lang="en">
<
a name="id2514396"></
a><
h2>FILES</
h2>