2 - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000, 2001 Internet Software Consortium.
5 - Permission to use, copy, modify, and/or 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.22.214.1 2009/07/11 01:43:31 tbox 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.71.1">
24 <body bgcolor=
"white" text=
"black" link=
"#0000FF" vlink=
"#840084" alink=
"#0000FF"><div class=
"refentry" lang=
"en">
25 <a name=
"id2476275"></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"><tr>
35 <td><code class=
"funcdef">
37 <b class=
"fsfunc">lwres_conf_init
</b>(
</code></td>
38 <td>lwres_context_t *
</td>
40 <var class=
"pdparam">ctx
</var><code>)
</code>;
</td>
42 <table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0" style=
"padding-bottom: 1em"><tr>
43 <td><code class=
"funcdef">
45 <b class=
"fsfunc">lwres_conf_clear
</b>(
</code></td>
46 <td>lwres_context_t *
</td>
48 <var class=
"pdparam">ctx
</var><code>)
</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_parse
</b>(
</code></td>
55 <td>lwres_context_t *
</td>
57 <var class=
"pdparam">ctx
</var>,
</td>
61 <td>const char *
</td>
63 <var class=
"pdparam">filename
</var><code>)
</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_print
</b>(
</code></td>
71 <td>lwres_context_t *
</td>
73 <var class=
"pdparam">ctx
</var>,
</td>
79 <var class=
"pdparam">fp
</var><code>)
</code>;
</td>
82 <table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0"><tr>
83 <td><code class=
"funcdef">
85 <b class=
"fsfunc">lwres_conf_get
</b>(
</code></td>
86 <td>lwres_context_t *
</td>
88 <var class=
"pdparam">ctx
</var><code>)
</code>;
</td>
92 <div class=
"refsect1" lang=
"en">
93 <a name=
"id2543441"></a><h2>DESCRIPTION
</h2>
94 <p><code class=
"function">lwres_conf_init()
</code>
96 <span class=
"type">lwres_conf_t
</span>
97 structure for lightweight resolver context
98 <em class=
"parameter"><code>ctx
</code></em>.
100 <p><code class=
"function">lwres_conf_clear()
</code>
101 frees up all the internal memory used by
103 <span class=
"type">lwres_conf_t
</span>
104 structure in resolver context
105 <em class=
"parameter"><code>ctx
</code></em>.
107 <p><code class=
"function">lwres_conf_parse()
</code>
109 <em class=
"parameter"><code>filename
</code></em>
110 and parses it to initialise the resolver context
111 <em class=
"parameter"><code>ctx
</code></em>'s
112 <span class=
"type">lwres_conf_t
</span>
115 <p><code class=
"function">lwres_conf_print()
</code>
117 <span class=
"type">lwres_conf_t
</span>
118 structure for resolver context
119 <em class=
"parameter"><code>ctx
</code></em>
121 <span class=
"type">FILE
</span>
122 <em class=
"parameter"><code>fp
</code></em>.
125 <div class=
"refsect1" lang=
"en">
126 <a name=
"id2543508"></a><h2>RETURN VALUES
</h2>
127 <p><code class=
"function">lwres_conf_parse()
</code>
128 returns
<span class=
"errorcode">LWRES_R_SUCCESS
</span>
129 if it successfully read and parsed
130 <em class=
"parameter"><code>filename
</code></em>.
131 It returns
<span class=
"errorcode">LWRES_R_FAILURE
</span>
132 if
<em class=
"parameter"><code>filename
</code></em>
133 could not be opened or contained incorrect
136 <p><code class=
"function">lwres_conf_print()
</code>
137 returns
<span class=
"errorcode">LWRES_R_SUCCESS
</span>
138 unless an error occurred when converting the network addresses to a
139 numeric host address string.
140 If this happens, the function returns
141 <span class=
"errorcode">LWRES_R_FAILURE
</span>.
144 <div class=
"refsect1" lang=
"en">
145 <a name=
"id2543545"></a><h2>SEE ALSO
</h2>
146 <p><span class=
"citerefentry"><span class=
"refentrytitle">stdio
</span>(
3)
</span>,
147 <span class=
"citerefentry"><span class=
"refentrytitle">resolver
</span>(
5)
</span>.
150 <div class=
"refsect1" lang=
"en">
151 <a name=
"id2543571"></a><h2>FILES
</h2>
152 <p><code class=
"filename">/etc/resolv.conf
</code>