2 - Copyright (C) 2004, 2005, 2007, 2014, 2015 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.
19 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
20 <title>lwres_config</title>
21 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
23 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
24 <a name="id-1"></a><div class="titlepage"></div>
25 <div class="refnamediv">
27 <p>lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_conf_get — lightweight resolver configuration</p>
29 <div class="refsynopsisdiv">
31 <div class="funcsynopsis">
32 <pre class="funcsynopsisinfo">#include <lwres/lwres.h></pre>
33 <table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
34 <td><code class="funcdef">
36 <b class="fsfunc">lwres_conf_init</b>(</code></td>
37 <td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
39 <div class="funcprototype-spacer"> </div>
40 <table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
41 <td><code class="funcdef">
43 <b class="fsfunc">lwres_conf_clear</b>(</code></td>
44 <td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
46 <div class="funcprototype-spacer"> </div>
47 <table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
49 <td><code class="funcdef">
51 <b class="fsfunc">lwres_conf_parse</b>(</code></td>
52 <td>lwres_context_t *<var class="pdparam">ctx</var>, </td>
56 <td>const char *<var class="pdparam">filename</var><code>)</code>;</td>
59 <div class="funcprototype-spacer"> </div>
60 <table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
62 <td><code class="funcdef">
64 <b class="fsfunc">lwres_conf_print</b>(</code></td>
65 <td>lwres_context_t *<var class="pdparam">ctx</var>, </td>
69 <td>FILE *<var class="pdparam">fp</var><code>)</code>;</td>
72 <div class="funcprototype-spacer"> </div>
73 <table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
74 <td><code class="funcdef">
76 <b class="fsfunc">lwres_conf_get</b>(</code></td>
77 <td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
79 <div class="funcprototype-spacer"> </div>
82 <div class="refsection">
83 <a name="id-1.7"></a><h2>DESCRIPTION</h2>
84 <p><code class="function">lwres_conf_init()</code>
86 <span class="type">lwres_conf_t</span>
87 structure for lightweight resolver context
88 <em class="parameter"><code>ctx</code></em>.
90 <p><code class="function">lwres_conf_clear()</code>
91 frees up all the internal memory used by
93 <span class="type">lwres_conf_t</span>
94 structure in resolver context
95 <em class="parameter"><code>ctx</code></em>.
97 <p><code class="function">lwres_conf_parse()</code>
99 <em class="parameter"><code>filename</code></em>
100 and parses it to initialise the resolver context
101 <em class="parameter"><code>ctx</code></em>'s
102 <span class="type">lwres_conf_t</span>
105 <p><code class="function">lwres_conf_print()</code>
107 <span class="type">lwres_conf_t</span>
108 structure for resolver context
109 <em class="parameter"><code>ctx</code></em>
111 <span class="type">FILE</span>
112 <em class="parameter"><code>fp</code></em>.
115 <div class="refsection">
116 <a name="id-1.8"></a><h2>RETURN VALUES</h2>
117 <p><code class="function">lwres_conf_parse()</code>
118 returns <span class="errorcode">LWRES_R_SUCCESS</span>
119 if it successfully read and parsed
120 <em class="parameter"><code>filename</code></em>.
121 It returns <span class="errorcode">LWRES_R_FAILURE</span>
122 if <em class="parameter"><code>filename</code></em>
123 could not be opened or contained incorrect
126 <p><code class="function">lwres_conf_print()</code>
127 returns <span class="errorcode">LWRES_R_SUCCESS</span>
128 unless an error occurred when converting the network addresses to a
129 numeric host address string.
130 If this happens, the function returns
131 <span class="errorcode">LWRES_R_FAILURE</span>.
134 <div class="refsection">
135 <a name="id-1.9"></a><h2>SEE ALSO</h2>
136 <p><span class="citerefentry"><span class="refentrytitle">stdio</span>(3)</span>,
137 <span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
140 <div class="refsection">
141 <a name="id-1.10"></a><h2>FILES</h2>
142 <p><code class="filename">/etc/resolv.conf</code>