summaryrefslogtreecommitdiffstats
path: root/lib/lwres/man/lwres_config.html
blob: de8f1a6de3125e08481e9fd76aa926eb32da443f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
 - Copyright (C) 2000, 2001, 2004, 2005, 2007, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
 - 
 - This Source Code Form is subject to the terms of the Mozilla Public
 - License, v. 2.0. If a copy of the MPL was not distributed with this
 - file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>lwres_config</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
<a name="id-1"></a><div class="titlepage"></div>
  
  

  

  

  <div class="refnamediv">
<h2>Name</h2>
<p>
    lwres_conf_init, 
    lwres_conf_clear, 
    lwres_conf_parse, 
    lwres_conf_print, 
    lwres_conf_get
     &#8212; lightweight resolver configuration
  </p>
</div>

  <div class="refsynopsisdiv">
<h2>Synopsis</h2>
    <div class="funcsynopsis">
<pre class="funcsynopsisinfo">#include &lt;lwres/lwres.h&gt;</pre>
<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
<td><code class="funcdef">
void
<b class="fsfunc">lwres_conf_init</b>(</code></td>
<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
</tr></table>
<div class="funcprototype-spacer"></div>
<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
<td><code class="funcdef">
void
<b class="fsfunc">lwres_conf_clear</b>(</code></td>
<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
</tr></table>
<div class="funcprototype-spacer"></div>
<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
<tr>
<td><code class="funcdef">
lwres_result_t
<b class="fsfunc">lwres_conf_parse</b>(</code></td>
<td>lwres_context_t *<var class="pdparam">ctx</var>, </td>
</tr>
<tr>
<td></td>
<td>const char *<var class="pdparam">filename</var><code>)</code>;</td>
</tr>
</table>
<div class="funcprototype-spacer"></div>
<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
<tr>
<td><code class="funcdef">
lwres_result_t
<b class="fsfunc">lwres_conf_print</b>(</code></td>
<td>lwres_context_t *<var class="pdparam">ctx</var>, </td>
</tr>
<tr>
<td></td>
<td>FILE *<var class="pdparam">fp</var><code>)</code>;</td>
</tr>
</table>
<div class="funcprototype-spacer"></div>
<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
<td><code class="funcdef">
lwres_conf_t *
<b class="fsfunc">lwres_conf_get</b>(</code></td>
<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
</tr></table>
<div class="funcprototype-spacer"></div>
</div>
  </div>

  <div class="refsection">
<a name="id-1.7"></a><h2>DESCRIPTION</h2>


    <p><code class="function">lwres_conf_init()</code>
      creates an empty
      <span class="type">lwres_conf_t</span>
      structure for lightweight resolver context
      <em class="parameter"><code>ctx</code></em>.
    </p>

    <p><code class="function">lwres_conf_clear()</code>
      frees up all the internal memory used by
      that
      <span class="type">lwres_conf_t</span>
      structure in resolver context
      <em class="parameter"><code>ctx</code></em>.
    </p>

    <p><code class="function">lwres_conf_parse()</code>
      opens the file
      <em class="parameter"><code>filename</code></em>
      and parses it to initialise the resolver context
      <em class="parameter"><code>ctx</code></em>'s
      <span class="type">lwres_conf_t</span>
      structure.
    </p>

    <p><code class="function">lwres_conf_print()</code>
      prints the
      <span class="type">lwres_conf_t</span>
      structure for resolver context
      <em class="parameter"><code>ctx</code></em>
      to the
      <span class="type">FILE</span>
      <em class="parameter"><code>fp</code></em>.
    </p>
  </div>
  <div class="refsection">
<a name="id-1.8"></a><h2>RETURN VALUES</h2>



    <p><code class="function">lwres_conf_parse()</code>
      returns <span class="errorcode">LWRES_R_SUCCESS</span>
      if it successfully read and parsed
      <em class="parameter"><code>filename</code></em>.
      It returns <span class="errorcode">LWRES_R_FAILURE</span>
      if <em class="parameter"><code>filename</code></em>
      could not be opened or contained incorrect
      resolver statements.
    </p>

    <p><code class="function">lwres_conf_print()</code>
      returns <span class="errorcode">LWRES_R_SUCCESS</span>
      unless an error occurred when converting the network addresses to a
      numeric host address string.
      If this happens, the function returns
      <span class="errorcode">LWRES_R_FAILURE</span>.
    </p>
  </div>
  <div class="refsection">
<a name="id-1.9"></a><h2>SEE ALSO</h2>

    <p><span class="citerefentry">
        <span class="refentrytitle">stdio</span>(3)
      </span>,
      <span class="citerefentry">
        <span class="refentrytitle">resolver</span>(5)
      </span>.
    </p>
  </div>
  <div class="refsection">
<a name="id-1.10"></a><h2>FILES</h2>

    <p><code class="filename">/etc/resolv.conf</code>
    </p>
  </div>
</div></body>
</html>