lwres_config.html revision 71c66a876ecca77923638d3f94cc0783152b2f03
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
24a4fabc0b0508a2d2b4651454dba1dfa93968f2Tinderbox User - Copyright (C) 2000, 2001 Internet Software Consortium.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews - Permission to use, copy, modify, and distribute this software for any
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews - purpose with or without fee is hereby granted, provided that the above
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews - copyright notice and this permission notice appear in all copies.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley<!-- $Id: lwres_config.html,v 1.19 2006/06/29 13:03:32 marka Exp $ -->
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<a name="id2482688"></a><div class="titlepage"></div>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<p>lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_conf_get — lightweight resolver configuration</p>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<pre class="funcsynopsisinfo">#include <lwres/lwres.h></pre>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley<b class="fsfunc">lwres_conf_init</b>(</code></td>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<var class="pdparam">ctx</var><code>)</code>;</td>
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<b class="fsfunc">lwres_conf_clear</b>(</code></td>
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<var class="pdparam">ctx</var><code>)</code>;</td>
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence<var class="pdparam">ctx</var><code>)</code>;</td>
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrewslwres_result_t
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews<b class="fsfunc">lwres_conf_parse</b>(</code></td>
596912ee9ca8eb14d30707ec286ab5d28bd39b3eMark Andrews<var class="pdparam">filename</var><code>)</code>;</td>
aee5e9cbacd8f88325840b8a498876f4319b0890Mark Andrews<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrencelwres_result_t
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence<b class="fsfunc">lwres_conf_print</b>(</code></td>
5e47b4200ed81b8e18e165fe3a626d9992003db4Mark Andrews<var class="pdparam">fp</var><code>)</code>;</td>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
620a452ebe92fff63e85c5930a6e6dc8d9455918Mark Andrewslwres_conf_t *
620a452ebe92fff63e85c5930a6e6dc8d9455918Mark Andrews<b class="fsfunc">lwres_conf_get</b>(</code></td>
43b3337ba58d70ca34f4d91e8c6c5e13a54af690Mark Andrews<var class="pdparam">ctx</var><code>)</code>;</td>
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence<p><code class="function">lwres_conf_init()</code>
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence creates an empty
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence structure for lightweight resolver context
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrews<p><code class="function">lwres_conf_clear()</code>
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrews frees up all the internal memory used by
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews structure in resolver context
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt<p><code class="function">lwres_conf_parse()</code>
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt opens the file
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley and parses it to initialise the resolver context
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<p><code class="function">lwres_conf_print()</code>
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt structure for resolver context
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<p><code class="function">lwres_conf_parse()</code>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley returns <span class="errorcode">LWRES_R_SUCCESS</span>
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt if it successfully read and parsed
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley <em class="parameter"><code>filename</code></em>.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley It returns <span class="errorcode">LWRES_R_FAILURE</span>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley if <em class="parameter"><code>filename</code></em>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley could not be opened or contained incorrect
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley resolver statements.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley<p><code class="function">lwres_conf_print()</code>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley returns <span class="errorcode">LWRES_R_SUCCESS</span>
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley unless an error occurred when converting the network addresses to a
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt numeric host address string.
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt If this happens, the function returns