lwres_config.html revision 2eeb74d1cf5355dd98f6d507a10086e16bb08c4b
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj<!--
cc834bbccfad9340ee1ff96ef19770b691ebc5fcrbb - Copyright (C) 2004, 2005, 2007, 2014 Internet Systems Consortium, Inc. ("ISC")
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj - Copyright (C) 2000, 2001 Internet Software Consortium.
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj -
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj - Permission to use, copy, modify, and/or distribute this software for any
09bd86d0db1114ee23eda0a6eb76ca055877a1cftrawick - purpose with or without fee is hereby granted, provided that the above
09bd86d0db1114ee23eda0a6eb76ca055877a1cftrawick - copyright notice and this permission notice appear in all copies.
2deb319e6b3de239f45c16a3e9e836d44f1f7108rbb -
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanoj - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
91a71946d0fb28c0866139edef3dd59f36ba5b9cstoddard - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
91a71946d0fb28c0866139edef3dd59f36ba5b9cstoddard - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
91a71946d0fb28c0866139edef3dd59f36ba5b9cstoddard - PERFORMANCE OF THIS SOFTWARE.
91a71946d0fb28c0866139edef3dd59f36ba5b9cstoddard-->
91a71946d0fb28c0866139edef3dd59f36ba5b9cstoddard<html>
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb<head>
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb<title>lwres_config</title>
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
f6a6245816cd866361da8c576b1f47c7a54b6610fanf</head>
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="lwres_config">
369edcdd0a9c5516c61e736ec2a6fc8fb0d92fe2manoj<a name="idp60783312"></a><div class="titlepage"></div>
369edcdd0a9c5516c61e736ec2a6fc8fb0d92fe2manoj
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj
85cbdc16ac57fa68ce1358a308269abcd417f4d9stoddard
85cbdc16ac57fa68ce1358a308269abcd417f4d9stoddard
85cbdc16ac57fa68ce1358a308269abcd417f4d9stoddard
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard <div class="refnamediv">
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard<h2>Name</h2>
10b386767f6c87b45937244371cb751f0b454d16wrowe<p>
10b386767f6c87b45937244371cb751f0b454d16wrowe lwres_conf_init,
75960f20f88dad6bc67892c711c429946063d133stoddard lwres_conf_clear,
75960f20f88dad6bc67892c711c429946063d133stoddard lwres_conf_parse,
75960f20f88dad6bc67892c711c429946063d133stoddard lwres_conf_print,
75960f20f88dad6bc67892c711c429946063d133stoddard lwres_conf_get
75960f20f88dad6bc67892c711c429946063d133stoddard &#8212; lightweight resolver configuration
75960f20f88dad6bc67892c711c429946063d133stoddard </p>
75960f20f88dad6bc67892c711c429946063d133stoddard</div>
10b386767f6c87b45937244371cb751f0b454d16wrowe
10b386767f6c87b45937244371cb751f0b454d16wrowe <div class="refsynopsisdiv" title="Synopsis">
10b386767f6c87b45937244371cb751f0b454d16wrowe<h2>Synopsis</h2>
10b386767f6c87b45937244371cb751f0b454d16wrowe <div class="funcsynopsis">
10b386767f6c87b45937244371cb751f0b454d16wrowe<pre class="funcsynopsisinfo">#include &lt;lwres/lwres.h&gt;</pre>
10b386767f6c87b45937244371cb751f0b454d16wrowe<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr>
10b386767f6c87b45937244371cb751f0b454d16wrowe<td><code class="funcdef">
10b386767f6c87b45937244371cb751f0b454d16wrowevoid
10b386767f6c87b45937244371cb751f0b454d16wrowe<b class="fsfunc">lwres_conf_init</b>(</code></td>
10b386767f6c87b45937244371cb751f0b454d16wrowe<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
10b386767f6c87b45937244371cb751f0b454d16wrowe</tr></table>
a9e07e4f90adcc7bc768db3055431c3dcd560cd1manoj<div class="funcprototype-spacer">�</div>
f6a6245816cd866361da8c576b1f47c7a54b6610fanf<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr>
f6a6245816cd866361da8c576b1f47c7a54b6610fanf<td><code class="funcdef">
97b758d0b174d7b7c5a1de1a583f5840ec3fc910trawickvoid
db3ccce11afac4fc1d4f51a65424412f7480c46cgstein<b class="fsfunc">lwres_conf_clear</b>(</code></td>
641cb23141f2238ed09e3b9fa79189225f8a2bcbrbb<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
641cb23141f2238ed09e3b9fa79189225f8a2bcbrbb</tr></table>
641cb23141f2238ed09e3b9fa79189225f8a2bcbrbb<div class="funcprototype-spacer">�</div>
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table">
8bed76428f56e5c643174a2d6807c3f18016af5cbjh<tr>
8bed76428f56e5c643174a2d6807c3f18016af5cbjh<td><code class="funcdef">
8bed76428f56e5c643174a2d6807c3f18016af5cbjhlwres_result_t
8bed76428f56e5c643174a2d6807c3f18016af5cbjh<b class="fsfunc">lwres_conf_parse</b>(</code></td>
8bed76428f56e5c643174a2d6807c3f18016af5cbjh<td>lwres_context_t *<var class="pdparam">ctx</var>, </td>
cfc020d6d6fc9b31d8945915e65a8787a796eb73stoddard</tr>
cfc020d6d6fc9b31d8945915e65a8787a796eb73stoddard<tr>
cfc020d6d6fc9b31d8945915e65a8787a796eb73stoddard<td>�</td>
f824925ac58ff729289c017235eeb3bdd21ec3a2stoddard<td>const char *<var class="pdparam">filename</var><code>)</code>;</td>
f824925ac58ff729289c017235eeb3bdd21ec3a2stoddard</tr>
f824925ac58ff729289c017235eeb3bdd21ec3a2stoddard</table>
f824925ac58ff729289c017235eeb3bdd21ec3a2stoddard<div class="funcprototype-spacer">�</div>
2aae6faee508221efbeaba5547ca79b7a20ef047stoddard<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table">
2aae6faee508221efbeaba5547ca79b7a20ef047stoddard<tr>
10b386767f6c87b45937244371cb751f0b454d16wrowe<td><code class="funcdef">
10b386767f6c87b45937244371cb751f0b454d16wrowelwres_result_t
10b386767f6c87b45937244371cb751f0b454d16wrowe<b class="fsfunc">lwres_conf_print</b>(</code></td>
10b386767f6c87b45937244371cb751f0b454d16wrowe<td>lwres_context_t *<var class="pdparam">ctx</var>, </td>
10b386767f6c87b45937244371cb751f0b454d16wrowe</tr>
10b386767f6c87b45937244371cb751f0b454d16wrowe<tr>
10b386767f6c87b45937244371cb751f0b454d16wrowe<td>�</td>
10b386767f6c87b45937244371cb751f0b454d16wrowe<td>FILE *<var class="pdparam">fp</var><code>)</code>;</td>
75960f20f88dad6bc67892c711c429946063d133stoddard</tr>
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddard</table>
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddard<div class="funcprototype-spacer">�</div>
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddard<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr>
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddard<td><code class="funcdef">
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddardlwres_conf_t *
56ca30c968906053ae61acb218420667bb58d996rbb<b class="fsfunc">lwres_conf_get</b>(</code></td>
56ca30c968906053ae61acb218420667bb58d996rbb<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
56ca30c968906053ae61acb218420667bb58d996rbb</tr></table>
56ca30c968906053ae61acb218420667bb58d996rbb<div class="funcprototype-spacer">�</div>
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanoj</div>
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanoj </div>
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanoj
56ca30c968906053ae61acb218420667bb58d996rbb <div class="refsection" title="DESCRIPTION">
0bff2f28ef945280c17099c142126178a78e1e54manoj<a name="idp60858448"></a><h2>DESCRIPTION</h2>
0bff2f28ef945280c17099c142126178a78e1e54manoj
0bff2f28ef945280c17099c142126178a78e1e54manoj
1e585ba09ea32272e63c4c39c35491e975d21d98stoddard <p><code class="function">lwres_conf_init()</code>
1e585ba09ea32272e63c4c39c35491e975d21d98stoddard creates an empty
1e585ba09ea32272e63c4c39c35491e975d21d98stoddard <span class="type">lwres_conf_t</span>
1e585ba09ea32272e63c4c39c35491e975d21d98stoddard structure for lightweight resolver context
1e585ba09ea32272e63c4c39c35491e975d21d98stoddard <em class="parameter"><code>ctx</code></em>.
1e585ba09ea32272e63c4c39c35491e975d21d98stoddard </p>
1e585ba09ea32272e63c4c39c35491e975d21d98stoddard
9c09943bad734ebd5c7cc10bd6d63b75c4c6e056stoddard <p><code class="function">lwres_conf_clear()</code>
9c09943bad734ebd5c7cc10bd6d63b75c4c6e056stoddard frees up all the internal memory used by
9c09943bad734ebd5c7cc10bd6d63b75c4c6e056stoddard that
0bff2f28ef945280c17099c142126178a78e1e54manoj <span class="type">lwres_conf_t</span>
0bff2f28ef945280c17099c142126178a78e1e54manoj structure in resolver context
0bff2f28ef945280c17099c142126178a78e1e54manoj <em class="parameter"><code>ctx</code></em>.
9c09943bad734ebd5c7cc10bd6d63b75c4c6e056stoddard </p>
75960f20f88dad6bc67892c711c429946063d133stoddard
1e585ba09ea32272e63c4c39c35491e975d21d98stoddard <p><code class="function">lwres_conf_parse()</code>
f03d292915be9977eaf74e9be7b0404aec226f84manoj opens the file
aa1faea36e4ae357bc603a2337b6adc54f5daec1manoj <em class="parameter"><code>filename</code></em>
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb and parses it to initialise the resolver context
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj <em class="parameter"><code>ctx</code></em>'s
302dc1f7b3feee23a91ad8f3cf3cb2edd95a557bmanoj <span class="type">lwres_conf_t</span>
302dc1f7b3feee23a91ad8f3cf3cb2edd95a557bmanoj structure.
302dc1f7b3feee23a91ad8f3cf3cb2edd95a557bmanoj </p>
302dc1f7b3feee23a91ad8f3cf3cb2edd95a557bmanoj
ff849e4163ed879288f0df15f78b6c9d278ec804fanf <p><code class="function">lwres_conf_print()</code>
ff849e4163ed879288f0df15f78b6c9d278ec804fanf prints the
9805ac88e1befa6dea11d8513023f150d8f8e807fanf <span class="type">lwres_conf_t</span>
9805ac88e1befa6dea11d8513023f150d8f8e807fanf structure for resolver context
9805ac88e1befa6dea11d8513023f150d8f8e807fanf <em class="parameter"><code>ctx</code></em>
9805ac88e1befa6dea11d8513023f150d8f8e807fanf to the
df4a7c143b27b489dd2d865bb3f6668c8420b3a9fanf <span class="type">FILE</span>
c03566fa0156d3a1500a42e4fe539e3e0fc8a11dgstein <em class="parameter"><code>fp</code></em>.
c03566fa0156d3a1500a42e4fe539e3e0fc8a11dgstein </p>
c03566fa0156d3a1500a42e4fe539e3e0fc8a11dgstein </div>
c03566fa0156d3a1500a42e4fe539e3e0fc8a11dgstein <div class="refsection" title="RETURN VALUES">
c03566fa0156d3a1500a42e4fe539e3e0fc8a11dgstein<a name="idp60870480"></a><h2>RETURN VALUES</h2>
c03566fa0156d3a1500a42e4fe539e3e0fc8a11dgstein
c03566fa0156d3a1500a42e4fe539e3e0fc8a11dgstein
db3ccce11afac4fc1d4f51a65424412f7480c46cgstein
1e088f9182ba67f39713fcb850e11934be5f6d17gstein <p><code class="function">lwres_conf_parse()</code>
db3ccce11afac4fc1d4f51a65424412f7480c46cgstein returns <span class="errorcode">LWRES_R_SUCCESS</span>
db3ccce11afac4fc1d4f51a65424412f7480c46cgstein if it successfully read and parsed
93c5cba06b623ebe8e4372e886eece12d9a80c3egstein <em class="parameter"><code>filename</code></em>.
93c5cba06b623ebe8e4372e886eece12d9a80c3egstein It returns <span class="errorcode">LWRES_R_FAILURE</span>
93c5cba06b623ebe8e4372e886eece12d9a80c3egstein if <em class="parameter"><code>filename</code></em>
93c5cba06b623ebe8e4372e886eece12d9a80c3egstein could not be opened or contained incorrect
93c5cba06b623ebe8e4372e886eece12d9a80c3egstein resolver statements.
93c5cba06b623ebe8e4372e886eece12d9a80c3egstein </p>
6fa71a1bd8c61518b05f5798a7a1594c270e78afrbb
93c5cba06b623ebe8e4372e886eece12d9a80c3egstein <p><code class="function">lwres_conf_print()</code>
be386cf0beed1c3331e47f0736d92b9744a21f3agstein returns <span class="errorcode">LWRES_R_SUCCESS</span>
be386cf0beed1c3331e47f0736d92b9744a21f3agstein unless an error occurred when converting the network addresses to a
be386cf0beed1c3331e47f0736d92b9744a21f3agstein numeric host address string.
14cccaddba3a9263cf0d0ddc311e18f3e3dc9b0fgstein If this happens, the function returns
14cccaddba3a9263cf0d0ddc311e18f3e3dc9b0fgstein <span class="errorcode">LWRES_R_FAILURE</span>.
14cccaddba3a9263cf0d0ddc311e18f3e3dc9b0fgstein </p>
14cccaddba3a9263cf0d0ddc311e18f3e3dc9b0fgstein </div>
14cccaddba3a9263cf0d0ddc311e18f3e3dc9b0fgstein <div class="refsection" title="SEE ALSO">
14cccaddba3a9263cf0d0ddc311e18f3e3dc9b0fgstein<a name="idp60875088"></a><h2>SEE ALSO</h2>
eb3def494ba5580320dfe1dd47b4d8b05519cb74gstein
eb3def494ba5580320dfe1dd47b4d8b05519cb74gstein <p><span class="citerefentry">
eb3def494ba5580320dfe1dd47b4d8b05519cb74gstein <span class="refentrytitle">stdio</span>(3)
eb3def494ba5580320dfe1dd47b4d8b05519cb74gstein </span>,
eb3def494ba5580320dfe1dd47b4d8b05519cb74gstein <span class="citerefentry">
1e088f9182ba67f39713fcb850e11934be5f6d17gstein <span class="refentrytitle">resolver</span>(5)
1e088f9182ba67f39713fcb850e11934be5f6d17gstein </span>.
35d13495678fd9f0b29d9b9b6f87a49fb13b8d8agstein </p>
35d13495678fd9f0b29d9b9b6f87a49fb13b8d8agstein </div>
35d13495678fd9f0b29d9b9b6f87a49fb13b8d8agstein <div class="refsection" title="FILES">
35d13495678fd9f0b29d9b9b6f87a49fb13b8d8agstein<a name="idp60878544"></a><h2>FILES</h2>
cc834bbccfad9340ee1ff96ef19770b691ebc5fcrbb
cc834bbccfad9340ee1ff96ef19770b691ebc5fcrbb <p><code class="filename">/etc/resolv.conf</code>
cc834bbccfad9340ee1ff96ef19770b691ebc5fcrbb </p>
cc834bbccfad9340ee1ff96ef19770b691ebc5fcrbb </div>
35d13495678fd9f0b29d9b9b6f87a49fb13b8d8agstein</div></body>
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj</html>
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj