lwres_config.html revision d6fa26d0adaec6c910115be34fe7a5a5f402c14f
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt - Copyright (C) 2000, 2001, 2004, 2005, 2007, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt - This Source Code Form is subject to the terms of the Mozilla Public
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt - License, v. 2.0. If a copy of the MPL was not distributed with this
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt - file, You can obtain one at http://mozilla.org/MPL/2.0/.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<p>lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_conf_get — lightweight resolver configuration</p>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<pre class="funcsynopsisinfo">#include <lwres/lwres.h></pre>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<b class="fsfunc">lwres_conf_clear</b>(</code></td>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntlwres_result_t
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<b class="fsfunc">lwres_conf_parse</b>(</code></td>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<td>lwres_context_t *<var class="pdparam">ctx</var>, </td>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<td>const char *<var class="pdparam">filename</var><code>)</code>;</td>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;">
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntlwres_result_t
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<b class="fsfunc">lwres_conf_print</b>(</code></td>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<td>lwres_context_t *<var class="pdparam">ctx</var>, </td>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<td>FILE *<var class="pdparam">fp</var><code>)</code>;</td>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntlwres_conf_t *
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<td>lwres_context_t *<var class="pdparam">ctx</var><code>)</code>;</td>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt creates an empty
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt structure for lightweight resolver context
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<p><code class="function">lwres_conf_clear()</code>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt frees up all the internal memory used by
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt structure in resolver context
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<p><code class="function">lwres_conf_parse()</code>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt opens the file
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt and parses it to initialise the resolver context
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<p><code class="function">lwres_conf_print()</code>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt structure for resolver context
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<p><code class="function">lwres_conf_parse()</code>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt returns <span class="errorcode">LWRES_R_SUCCESS</span>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt if it successfully read and parsed
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt It returns <span class="errorcode">LWRES_R_FAILURE</span>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt if <em class="parameter"><code>filename</code></em>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt could not be opened or contained incorrect
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt resolver statements.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt<p><code class="function">lwres_conf_print()</code>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt returns <span class="errorcode">LWRES_R_SUCCESS</span>
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt unless an error occurred when converting the network addresses to a
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt numeric host address string.