1135446Strhodes<!--
2254897Serwin - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
3153816Sdougb - Copyright (C) 2000, 2001 Internet Software Consortium.
4153816Sdougb - 
5204619Sdougb - Permission to use, copy, modify, and/or distribute this software for any
6135446Strhodes - purpose with or without fee is hereby granted, provided that the above
7135446Strhodes - copyright notice and this permission notice appear in all copies.
8153816Sdougb - 
9135446Strhodes - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10135446Strhodes - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11153816Sdougb - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12135446Strhodes - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13135446Strhodes - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14135446Strhodes - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15135446Strhodes - PERFORMANCE OF THIS SOFTWARE.
16135446Strhodes-->
17234010Sdougb<!-- $Id$ -->
18153816Sdougb<html>
19153816Sdougb<head>
20153816Sdougb<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21153816Sdougb<title>lwres_config</title>
22170222Sdougb<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
23153816Sdougb</head>
24153816Sdougb<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
25225361Sdougb<a name="id2476275"></a><div class="titlepage"></div>
26153816Sdougb<div class="refnamediv">
27153816Sdougb<h2>Name</h2>
28153816Sdougb<p>lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_conf_get &#8212; lightweight resolver configuration</p>
29153816Sdougb</div>
30153816Sdougb<div class="refsynopsisdiv">
31153816Sdougb<h2>Synopsis</h2>
32153816Sdougb<div class="funcsynopsis">
33153816Sdougb<pre class="funcsynopsisinfo">#include &lt;lwres/lwres.h&gt;</pre>
34170222Sdougb<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
35153816Sdougb<td><code class="funcdef">
36153816Sdougbvoid
37153816Sdougb<b class="fsfunc">lwres_conf_init</b>(</code></td>
38170222Sdougb<td>lwres_context_t *�</td>
39153816Sdougb<td>
40170222Sdougb<var class="pdparam">ctx</var><code>)</code>;</td>
41170222Sdougb</tr></table>
42170222Sdougb<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em"><tr>
43153816Sdougb<td><code class="funcdef">
44153816Sdougbvoid
45153816Sdougb<b class="fsfunc">lwres_conf_clear</b>(</code></td>
46170222Sdougb<td>lwres_context_t *�</td>
47153816Sdougb<td>
48170222Sdougb<var class="pdparam">ctx</var><code>)</code>;</td>
49170222Sdougb</tr></table>
50153816Sdougb<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
51153816Sdougb<tr>
52153816Sdougb<td><code class="funcdef">
53153816Sdougblwres_result_t
54153816Sdougb<b class="fsfunc">lwres_conf_parse</b>(</code></td>
55170222Sdougb<td>lwres_context_t *�</td>
56170222Sdougb<td>
57170222Sdougb<var class="pdparam">ctx</var>, </td>
58153816Sdougb</tr>
59153816Sdougb<tr>
60153816Sdougb<td>�</td>
61170222Sdougb<td>const char *�</td>
62153816Sdougb<td>
63170222Sdougb<var class="pdparam">filename</var><code>)</code>;</td>
64153816Sdougb</tr>
65153816Sdougb</table>
66153816Sdougb<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
67153816Sdougb<tr>
68153816Sdougb<td><code class="funcdef">
69153816Sdougblwres_result_t
70153816Sdougb<b class="fsfunc">lwres_conf_print</b>(</code></td>
71170222Sdougb<td>lwres_context_t *�</td>
72170222Sdougb<td>
73170222Sdougb<var class="pdparam">ctx</var>, </td>
74153816Sdougb</tr>
75153816Sdougb<tr>
76153816Sdougb<td>�</td>
77170222Sdougb<td>FILE *�</td>
78153816Sdougb<td>
79170222Sdougb<var class="pdparam">fp</var><code>)</code>;</td>
80153816Sdougb</tr>
81153816Sdougb</table>
82170222Sdougb<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr>
83153816Sdougb<td><code class="funcdef">
84153816Sdougblwres_conf_t *
85153816Sdougb<b class="fsfunc">lwres_conf_get</b>(</code></td>
86170222Sdougb<td>lwres_context_t *�</td>
87153816Sdougb<td>
88170222Sdougb<var class="pdparam">ctx</var><code>)</code>;</td>
89170222Sdougb</tr></table>
90153816Sdougb</div>
91153816Sdougb</div>
92153816Sdougb<div class="refsect1" lang="en">
93254897Serwin<a name="id2543442"></a><h2>DESCRIPTION</h2>
94170222Sdougb<p><code class="function">lwres_conf_init()</code>
95170222Sdougb      creates an empty
96170222Sdougb      <span class="type">lwres_conf_t</span>
97170222Sdougb      structure for lightweight resolver context
98170222Sdougb      <em class="parameter"><code>ctx</code></em>.
99170222Sdougb    </p>
100170222Sdougb<p><code class="function">lwres_conf_clear()</code>
101170222Sdougb      frees up all the internal memory used by
102170222Sdougb      that
103170222Sdougb      <span class="type">lwres_conf_t</span>
104170222Sdougb      structure in resolver context
105170222Sdougb      <em class="parameter"><code>ctx</code></em>.
106170222Sdougb    </p>
107170222Sdougb<p><code class="function">lwres_conf_parse()</code>
108170222Sdougb      opens the file
109170222Sdougb      <em class="parameter"><code>filename</code></em>
110170222Sdougb      and parses it to initialise the resolver context
111170222Sdougb      <em class="parameter"><code>ctx</code></em>'s
112170222Sdougb      <span class="type">lwres_conf_t</span>
113170222Sdougb      structure.
114170222Sdougb    </p>
115170222Sdougb<p><code class="function">lwres_conf_print()</code>
116170222Sdougb      prints the
117170222Sdougb      <span class="type">lwres_conf_t</span>
118170222Sdougb      structure for resolver context
119170222Sdougb      <em class="parameter"><code>ctx</code></em>
120170222Sdougb      to the
121170222Sdougb      <span class="type">FILE</span>
122170222Sdougb      <em class="parameter"><code>fp</code></em>.
123170222Sdougb    </p>
124153816Sdougb</div>
125153816Sdougb<div class="refsect1" lang="en">
126254897Serwin<a name="id2543509"></a><h2>RETURN VALUES</h2>
127170222Sdougb<p><code class="function">lwres_conf_parse()</code>
128170222Sdougb      returns <span class="errorcode">LWRES_R_SUCCESS</span>
129170222Sdougb      if it successfully read and parsed
130170222Sdougb      <em class="parameter"><code>filename</code></em>.
131170222Sdougb      It returns <span class="errorcode">LWRES_R_FAILURE</span>
132170222Sdougb      if <em class="parameter"><code>filename</code></em>
133170222Sdougb      could not be opened or contained incorrect
134170222Sdougb      resolver statements.
135170222Sdougb    </p>
136170222Sdougb<p><code class="function">lwres_conf_print()</code>
137170222Sdougb      returns <span class="errorcode">LWRES_R_SUCCESS</span>
138170222Sdougb      unless an error occurred when converting the network addresses to a
139170222Sdougb      numeric host address string.
140170222Sdougb      If this happens, the function returns
141170222Sdougb      <span class="errorcode">LWRES_R_FAILURE</span>.
142170222Sdougb    </p>
143153816Sdougb</div>
144153816Sdougb<div class="refsect1" lang="en">
145254897Serwin<a name="id2543546"></a><h2>SEE ALSO</h2>
146170222Sdougb<p><span class="citerefentry"><span class="refentrytitle">stdio</span>(3)</span>,
147170222Sdougb      <span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
148170222Sdougb    </p>
149153816Sdougb</div>
150153816Sdougb<div class="refsect1" lang="en">
151254897Serwin<a name="id2543572"></a><h2>FILES</h2>
152170222Sdougb<p><code class="filename">/etc/resolv.conf</code>
153170222Sdougb    </p>
154153816Sdougb</div>
155153816Sdougb</div></body>
156153816Sdougb</html>
157