2 - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000, 2001 Internet Software Consortium.
5 - Permission to use, copy, modify, and distribute this software for any
6 - purpose with or without fee is hereby granted, provided that the above
7 - copyright notice and this permission notice appear in all copies.
9 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 - PERFORMANCE OF THIS SOFTWARE.
17 <!-- $Id: lwres_config.html,v 1.4.2.1.4.11 2006/06/29 13:02:31 marka Exp $ -->
20 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21 <title>lwres_config</title>
22 <meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
24 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
25 <a name="id2482688"></a><div class="titlepage"></div>
26 <div class="refnamediv">
28 <p>lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_conf_get — lightweight resolver configuration</p>
30 <div class="refsynopsisdiv">
32 <div class="funcsynopsis">
33 <pre class="funcsynopsisinfo">#include <lwres/lwres.h></pre>
34 <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
36 <td><code class="funcdef">
38 <b class="fsfunc">lwres_conf_init</b>(</code></td>
50 <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
52 <td><code class="funcdef">
54 <b class="fsfunc">lwres_conf_clear</b>(</code></td>
66 <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
68 <td><code class="funcdef">
70 <b class="fsfunc">lwres_conf_parse</b>(</code></td>
86 <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
88 <td><code class="funcdef">
90 <b class="fsfunc">lwres_conf_print</b>(</code></td>
106 <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
108 <td><code class="funcdef">
110 <b class="fsfunc">lwres_conf_get</b>(</code></td>
124 <div class="refsect1" lang="en">
125 <a name="id2549475"></a><h2>DESCRIPTION</h2>
127 <code class="function">lwres_conf_init()</code>
129 <span class="type">lwres_conf_t</span>
130 structure for lightweight resolver context
131 <em class="parameter"><code>ctx</code></em>.
134 <code class="function">lwres_conf_clear()</code>
135 frees up all the internal memory used by
137 <span class="type">lwres_conf_t</span>
138 structure in resolver context
139 <em class="parameter"><code>ctx</code></em>.
142 <code class="function">lwres_conf_parse()</code>
144 <em class="parameter"><code>filename</code></em>
145 and parses it to initialise the resolver context
146 <em class="parameter"><code>ctx</code></em>'s
147 <span class="type">lwres_conf_t</span>
151 <code class="function">lwres_conf_print()</code>
153 <span class="type">lwres_conf_t</span>
154 structure for resolver context
155 <em class="parameter"><code>ctx</code></em>
157 <span class="type">FILE</span>
158 <em class="parameter"><code>fp</code></em>.
161 <div class="refsect1" lang="en">
162 <a name="id2549546"></a><h2>RETURN VALUES</h2>
164 <code class="function">lwres_conf_parse()</code>
166 <span class="errorcode">LWRES_R_SUCCESS</span>
167 if it successfully read and parsed
168 <em class="parameter"><code>filename</code></em>.
170 <span class="errorcode">LWRES_R_FAILURE</span>
172 <em class="parameter"><code>filename</code></em>
173 could not be opened or contained incorrect
177 <code class="function">lwres_conf_print()</code>
179 <span class="errorcode">LWRES_R_SUCCESS</span>
180 unless an error occurred when converting the network addresses to a
181 numeric host address string.
182 If this happens, the function returns
183 <span class="errorcode">LWRES_R_FAILURE</span>.
186 <div class="refsect1" lang="en">
187 <a name="id2549586"></a><h2>SEE ALSO</h2>
189 <span class="citerefentry"><span class="refentrytitle">stdio</span>(3)</span>,
190 <span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
193 <div class="refsect1" lang="en">
194 <a name="id2549612"></a><h2>FILES</h2>
196 <code class="filename">/etc/resolv.conf</code>