Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 550bbe86d83a7870fdddc73c68e5d2b2 > files > 192

libunbound-devel-1.3.4-1mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>unbound: services/localzone.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_d1ccb6fd7b4f0b6c4993c4e5b9d49242.html">services</a>
  </div>
</div>
<div class="contents">
<h1>localzone.h File Reference</h1>This file contains functions to enable local zone authority service.  
<a href="#_details">More...</a>
<p>
<code>#include &quot;<a class="el" href="rbtree_8h.html">util/rbtree.h</a>&quot;</code><br>
<code>#include &quot;util/locks.h&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlocal__zones.html">local_zones</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Authoritative local zones storage, shared.  <a href="structlocal__zones.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlocal__zone.html">local_zone</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Local zone.  <a href="structlocal__zone.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlocal__data.html">local_data</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Local data.  <a href="structlocal__data.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlocal__rrset.html">local_rrset</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A local data RRset.  <a href="structlocal__rrset.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2d">localzone_type</a> { <br>
&nbsp;&nbsp;<a class="el" href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2d624fb0cbd976d78346bc99ad19cf5a73">local_zone_deny</a> =  0, 
<a class="el" href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2de4597698201a854d1f1c85b546031625">local_zone_refuse</a>, 
<a class="el" href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2da94e9367ddbd058f1bfeb6b129e89c14">local_zone_static</a>, 
<a class="el" href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2d40481cbc345afbcf06719fd6bf53cded">local_zone_transparent</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2d0126c25a830869e033e62bcf37261ebc">local_zone_redirect</a>, 
<a class="el" href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2d600008ba0d2231ab7f858b576721e739">local_zone_nodefault</a>
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Local zone type This type determines processing for queries that did not match local-data directly.  <a href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2d">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structlocal__zones.html">local_zones</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#be0079ce5f5767b445e249cba189dbb4">local_zones_create</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create local zones storage.  <a href="#be0079ce5f5767b445e249cba189dbb4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#df073878a30aeab95cc1e542d170c631">local_zones_delete</a> (struct <a class="el" href="structlocal__zones.html">local_zones</a> *zones)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete local zones storage.  <a href="#df073878a30aeab95cc1e542d170c631"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#c526fc30822ac19bfe2cd5f966406efb">local_zones_apply_cfg</a> (struct <a class="el" href="structlocal__zones.html">local_zones</a> *zones, struct <a class="el" href="structconfig__file.html">config_file</a> *cfg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Apply config settings; setup the local authoritative data.  <a href="#c526fc30822ac19bfe2cd5f966406efb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#78c04d021dcfb32c69a5c243b160e8d8">local_zone_cmp</a> (const void *z1, const void *z2)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare two <a class="el" href="structlocal__zone.html" title="Local zone.">local_zone</a> entries in rbtree.  <a href="#78c04d021dcfb32c69a5c243b160e8d8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#e0f2c2a5dd3782244b032e6fff6bebc7">local_data_cmp</a> (const void *d1, const void *d2)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare two <a class="el" href="structlocal__data.html" title="Local data.">local_data</a> entries in rbtree.  <a href="#e0f2c2a5dd3782244b032e6fff6bebc7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#5b7730ed6458175db41eb5aae8d5a651">local_zone_delete</a> (struct <a class="el" href="structlocal__zone.html">local_zone</a> *z)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete one zone.  <a href="#5b7730ed6458175db41eb5aae8d5a651"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structlocal__zone.html">local_zone</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#3295c2691a9164be24763c5497e90c3c">local_zones_lookup</a> (struct <a class="el" href="structlocal__zones.html">local_zones</a> *zones, uint8_t *name, size_t len, int labs, uint16_t dclass)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Lookup zone that contains the given name, class.  <a href="#3295c2691a9164be24763c5497e90c3c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#d5ced71f49ee204aab226adb04febf61">local_zones_print</a> (struct <a class="el" href="structlocal__zones.html">local_zones</a> *zones)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Debug helper.  <a href="#d5ced71f49ee204aab226adb04febf61"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#36a07e930476dd763ebc45465db05db5">local_zones_answer</a> (struct <a class="el" href="structlocal__zones.html">local_zones</a> *zones, struct <a class="el" href="structquery__info.html">query_info</a> *qinfo, struct <a class="el" href="structedns__data.html">edns_data</a> *edns, ldns_buffer *buf, struct <a class="el" href="structregional.html">regional</a> *temp)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Answer authoritatively for local zones.  <a href="#36a07e930476dd763ebc45465db05db5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#7535f7094a8182d5d93fa9537343db4b">local_zone_str2type</a> (const char *str, enum <a class="el" href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2d">localzone_type</a> *t)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse the string into localzone type.  <a href="#7535f7094a8182d5d93fa9537343db4b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structlocal__zone.html">local_zone</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#39d3a3f67eff004b5d0161bc856a0f14">local_zones_find</a> (struct <a class="el" href="structlocal__zones.html">local_zones</a> *zones, uint8_t *name, size_t len, int labs, uint16_t dclass)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find zone that with exactly given name, class.  <a href="#39d3a3f67eff004b5d0161bc856a0f14"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structlocal__zone.html">local_zone</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#6796f4a9e36f41333c008c881d02bd75">local_zones_add_zone</a> (struct <a class="el" href="structlocal__zones.html">local_zones</a> *zones, uint8_t *name, size_t len, int labs, uint16_t dclass, enum <a class="el" href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2d">localzone_type</a> tp)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a new zone.  <a href="#6796f4a9e36f41333c008c881d02bd75"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#6cd901ec04861c6c5699e4ffe5d6e0e9">local_zones_del_zone</a> (struct <a class="el" href="structlocal__zones.html">local_zones</a> *zones, struct <a class="el" href="structlocal__zone.html">local_zone</a> *zone)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete a zone.  <a href="#6cd901ec04861c6c5699e4ffe5d6e0e9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#2f222b2744f769d34725d8e2cd50c101">local_zones_add_RR</a> (struct <a class="el" href="structlocal__zones.html">local_zones</a> *zones, const char *rr, ldns_buffer *buf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add RR data into the localzone data.  <a href="#2f222b2744f769d34725d8e2cd50c101"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#864ca1da34f4a68e4d74e9ce8fecf3e4">local_zones_del_data</a> (struct <a class="el" href="structlocal__zones.html">local_zones</a> *zones, uint8_t *name, size_t len, int labs, uint16_t dclass)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove data from domain name in the tree.  <a href="#864ca1da34f4a68e4d74e9ce8fecf3e4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="localzone_8h.html#144df1bdefcb26cc781b6f916b3ab1f8">parse_dname</a> (const char *str, uint8_t **res, size_t *len, int *labs)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Form wireformat from text format domain name.  <a href="#144df1bdefcb26cc781b6f916b3ab1f8"></a><br></td></tr>
</table>
<hr><h2>Detailed Description</h2>
This file contains functions to enable local zone authority service. 
<p>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="d4936d63a4fd091d968d5331e1592e2d"></a><!-- doxytag: member="localzone.h::localzone_type" ref="d4936d63a4fd091d968d5331e1592e2d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2d">localzone_type</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Local zone type This type determines processing for queries that did not match local-data directly. 
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="d4936d63a4fd091d968d5331e1592e2d624fb0cbd976d78346bc99ad19cf5a73"></a><!-- doxytag: member="local_zone_deny" ref="d4936d63a4fd091d968d5331e1592e2d624fb0cbd976d78346bc99ad19cf5a73" args="" -->local_zone_deny</em>&nbsp;</td><td>
drop query </td></tr>
<tr><td valign="top"><em><a class="anchor" name="d4936d63a4fd091d968d5331e1592e2de4597698201a854d1f1c85b546031625"></a><!-- doxytag: member="local_zone_refuse" ref="d4936d63a4fd091d968d5331e1592e2de4597698201a854d1f1c85b546031625" args="" -->local_zone_refuse</em>&nbsp;</td><td>
answer with error </td></tr>
<tr><td valign="top"><em><a class="anchor" name="d4936d63a4fd091d968d5331e1592e2da94e9367ddbd058f1bfeb6b129e89c14"></a><!-- doxytag: member="local_zone_static" ref="d4936d63a4fd091d968d5331e1592e2da94e9367ddbd058f1bfeb6b129e89c14" args="" -->local_zone_static</em>&nbsp;</td><td>
answer nxdomain or nodata </td></tr>
<tr><td valign="top"><em><a class="anchor" name="d4936d63a4fd091d968d5331e1592e2d40481cbc345afbcf06719fd6bf53cded"></a><!-- doxytag: member="local_zone_transparent" ref="d4936d63a4fd091d968d5331e1592e2d40481cbc345afbcf06719fd6bf53cded" args="" -->local_zone_transparent</em>&nbsp;</td><td>
resolve normally </td></tr>
<tr><td valign="top"><em><a class="anchor" name="d4936d63a4fd091d968d5331e1592e2d0126c25a830869e033e62bcf37261ebc"></a><!-- doxytag: member="local_zone_redirect" ref="d4936d63a4fd091d968d5331e1592e2d0126c25a830869e033e62bcf37261ebc" args="" -->local_zone_redirect</em>&nbsp;</td><td>
answer with data at zone apex </td></tr>
<tr><td valign="top"><em><a class="anchor" name="d4936d63a4fd091d968d5331e1592e2d600008ba0d2231ab7f858b576721e739"></a><!-- doxytag: member="local_zone_nodefault" ref="d4936d63a4fd091d968d5331e1592e2d600008ba0d2231ab7f858b576721e739" args="" -->local_zone_nodefault</em>&nbsp;</td><td>
remove default AS112 blocking contents for zone nodefault is used in config not during service. 
<p>
</td></tr>
</table>
</dl>

</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="be0079ce5f5767b445e249cba189dbb4"></a><!-- doxytag: member="localzone.h::local_zones_create" ref="be0079ce5f5767b445e249cba189dbb4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structlocal__zones.html">local_zones</a>* local_zones_create           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create local zones storage. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>new struct or NULL on error. </dd></dl>

<p>References <a class="el" href="localzone_8c_source.html#l00097">local_zone_cmp()</a>, <a class="el" href="localzone_8h_source.html#l00078">local_zones::lock</a>, <a class="el" href="rbtree_8c_source.html#l00094">rbtree_init()</a>, and <a class="el" href="localzone_8h_source.html#l00080">local_zones::ztree</a>.</p>

<p>Referenced by <a class="el" href="context_8c_source.html#l00054">context_finalize()</a>, <a class="el" href="daemon_8c_source.html#l00397">daemon_fork()</a>, and <a class="el" href="unbound-checkconf_8c_source.html#l00233">localzonechecks()</a>.</p>

</div>
</div><p>
<a class="anchor" name="df073878a30aeab95cc1e542d170c631"></a><!-- doxytag: member="localzone.h::local_zones_delete" ref="df073878a30aeab95cc1e542d170c631" args="(struct local_zones *zones)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void local_zones_delete           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structlocal__zones.html">local_zones</a> *&nbsp;</td>
          <td class="paramname"> <em>zones</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete local zones storage. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>zones,:</em>&nbsp;</td><td>to delete. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="localzone_8h_source.html#l00078">local_zones::lock</a>, <a class="el" href="localzone_8c_source.html#l00068">lzdel()</a>, <a class="el" href="rbtree_8c_source.html#l00617">traverse_postorder()</a>, and <a class="el" href="localzone_8h_source.html#l00080">local_zones::ztree</a>.</p>

<p>Referenced by <a class="el" href="daemon_8c_source.html#l00448">daemon_cleanup()</a>, <a class="el" href="unbound-checkconf_8c_source.html#l00233">localzonechecks()</a>, and <a class="el" href="libunbound_8c_source.html#l00153">ub_ctx_delete()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c526fc30822ac19bfe2cd5f966406efb"></a><!-- doxytag: member="localzone.h::local_zones_apply_cfg" ref="c526fc30822ac19bfe2cd5f966406efb" args="(struct local_zones *zones, struct config_file *cfg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int local_zones_apply_cfg           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structlocal__zones.html">local_zones</a> *&nbsp;</td>
          <td class="paramname"> <em>zones</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structconfig__file.html">config_file</a> *&nbsp;</td>
          <td class="paramname"> <em>cfg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Apply config settings; setup the local authoritative data. 
<p>
Takes care of locking. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>zones,:</em>&nbsp;</td><td>is set up. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cfg,:</em>&nbsp;</td><td>config data. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>false on error. </dd></dl>

<p>References <a class="el" href="log_8c_source.html#l00267">fatal_exit()</a>, <a class="el" href="localzone_8c_source.html#l00706">init_parents()</a>, <a class="el" href="localzone_8c_source.html#l00822">lz_enter_data()</a>, <a class="el" href="localzone_8c_source.html#l00608">lz_enter_defaults()</a>, <a class="el" href="localzone_8c_source.html#l00526">lz_enter_zones()</a>, <a class="el" href="localzone_8c_source.html#l00835">lz_freeup_cfg()</a>, and <a class="el" href="localzone_8c_source.html#l00740">lz_setup_implicit()</a>.</p>

<p>Referenced by <a class="el" href="context_8c_source.html#l00054">context_finalize()</a>, <a class="el" href="daemon_8c_source.html#l00397">daemon_fork()</a>, and <a class="el" href="unbound-checkconf_8c_source.html#l00233">localzonechecks()</a>.</p>

</div>
</div><p>
<a class="anchor" name="78c04d021dcfb32c69a5c243b160e8d8"></a><!-- doxytag: member="localzone.h::local_zone_cmp" ref="78c04d021dcfb32c69a5c243b160e8d8" args="(const void *z1, const void *z2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int local_zone_cmp           </td>
          <td>(</td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>z1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>z2</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Compare two <a class="el" href="structlocal__zone.html" title="Local zone.">local_zone</a> entries in rbtree. 
<p>
Sort hierarchical but not canonical <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>z1,:</em>&nbsp;</td><td>zone 1 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>z2,:</em>&nbsp;</td><td>zone 2 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: -1, 0, +1 comparison value. </dd></dl>

<p>References <a class="el" href="localzone_8h_source.html#l00100">local_zone::dclass</a>, <a class="el" href="dname_8c_source.html#l00424">dname_lab_cmp()</a>, <a class="el" href="localzone_8h_source.html#l00093">local_zone::name</a>, and <a class="el" href="localzone_8h_source.html#l00097">local_zone::namelabs</a>.</p>

<p>Referenced by <a class="el" href="fptr__wlist_8c_source.html#l00164">fptr_whitelist_rbtree_cmp()</a>, and <a class="el" href="localzone_8c_source.html#l00053">local_zones_create()</a>.</p>

</div>
</div><p>
<a class="anchor" name="e0f2c2a5dd3782244b032e6fff6bebc7"></a><!-- doxytag: member="localzone.h::local_data_cmp" ref="e0f2c2a5dd3782244b032e6fff6bebc7" args="(const void *d1, const void *d2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int local_data_cmp           </td>
          <td>(</td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>d1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>d2</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Compare two <a class="el" href="structlocal__data.html" title="Local data.">local_data</a> entries in rbtree. 
<p>
Sort canonical. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>d1,:</em>&nbsp;</td><td>data 1 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>d2,:</em>&nbsp;</td><td>data 2 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: -1, 0, +1 comparison value. </dd></dl>

<p>References <a class="el" href="dname_8c_source.html#l00689">dname_canon_lab_cmp()</a>, <a class="el" href="localzone_8h_source.html#l00128">local_data::name</a>, and <a class="el" href="localzone_8h_source.html#l00132">local_data::namelabs</a>.</p>

<p>Referenced by <a class="el" href="fptr__wlist_8c_source.html#l00164">fptr_whitelist_rbtree_cmp()</a>, and <a class="el" href="localzone_8c_source.html#l00147">local_zone_create()</a>.</p>

</div>
</div><p>
<a class="anchor" name="5b7730ed6458175db41eb5aae8d5a651"></a><!-- doxytag: member="localzone.h::local_zone_delete" ref="5b7730ed6458175db41eb5aae8d5a651" args="(struct local_zone *z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void local_zone_delete           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structlocal__zone.html">local_zone</a> *&nbsp;</td>
          <td class="paramname"> <em>z</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete one zone. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>z,:</em>&nbsp;</td><td>to delete. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="localzone_8h_source.html#l00106">local_zone::lock</a>, <a class="el" href="localzone_8h_source.html#l00093">local_zone::name</a>, <a class="el" href="localzone_8h_source.html#l00113">local_zone::region</a>, and <a class="el" href="regional_8c_source.html#l00108">regional_destroy()</a>.</p>

<p>Referenced by <a class="el" href="localzone_8c_source.html#l01186">local_zones_add_zone()</a>, <a class="el" href="localzone_8c_source.html#l01214">local_zones_del_zone()</a>, <a class="el" href="localzone_8c_source.html#l00174">lz_enter_zone_dname()</a>, and <a class="el" href="localzone_8c_source.html#l00068">lzdel()</a>.</p>

</div>
</div><p>
<a class="anchor" name="3295c2691a9164be24763c5497e90c3c"></a><!-- doxytag: member="localzone.h::local_zones_lookup" ref="3295c2691a9164be24763c5497e90c3c" args="(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structlocal__zone.html">local_zone</a>* local_zones_lookup           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structlocal__zones.html">local_zones</a> *&nbsp;</td>
          <td class="paramname"> <em>zones</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>labs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&nbsp;</td>
          <td class="paramname"> <em>dclass</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Lookup zone that contains the given name, class. 
<p>
User must lock the tree or result zone. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>zones,:</em>&nbsp;</td><td>the zones tree </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name,:</em>&nbsp;</td><td>dname to lookup </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len,:</em>&nbsp;</td><td>length of name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>labs,:</em>&nbsp;</td><td>labelcount of name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dclass,:</em>&nbsp;</td><td>class to lookup. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>closest <a class="el" href="structlocal__zone.html" title="Local zone.">local_zone</a> or NULL if no covering zone is found. </dd></dl>

<p>References <a class="el" href="localzone_8h_source.html#l00100">local_zone::dclass</a>, <a class="el" href="dname_8c_source.html#l00424">dname_lab_cmp()</a>, <a class="el" href="rbtree_8h_source.html#l00063">rbnode_t::key</a>, <a class="el" href="localzone_8h_source.html#l00093">local_zone::name</a>, <a class="el" href="localzone_8h_source.html#l00097">local_zone::namelabs</a>, <a class="el" href="localzone_8h_source.html#l00095">local_zone::namelen</a>, <a class="el" href="localzone_8h_source.html#l00088">local_zone::node</a>, <a class="el" href="localzone_8h_source.html#l00090">local_zone::parent</a>, <a class="el" href="rbtree_8c_source.html#l00507">rbtree_find_less_equal()</a>, and <a class="el" href="localzone_8h_source.html#l00080">local_zones::ztree</a>.</p>

<p>Referenced by <a class="el" href="localzone_8c_source.html#l01229">local_zones_add_RR()</a>, <a class="el" href="localzone_8c_source.html#l01115">local_zones_answer()</a>, <a class="el" href="localzone_8c_source.html#l01294">local_zones_del_data()</a>, <a class="el" href="localzone_8c_source.html#l00497">lz_enter_rr_str()</a>, and <a class="el" href="localzone_8c_source.html#l00740">lz_setup_implicit()</a>.</p>

</div>
</div><p>
<a class="anchor" name="d5ced71f49ee204aab226adb04febf61"></a><!-- doxytag: member="localzone.h::local_zones_print" ref="d5ced71f49ee204aab226adb04febf61" args="(struct local_zones *zones)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void local_zones_print           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structlocal__zones.html">local_zones</a> *&nbsp;</td>
          <td class="paramname"> <em>zones</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Debug helper. 
<p>
Print all zones Takes care of locking. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>zones,:</em>&nbsp;</td><td>the zones tree </td></tr>
  </table>
</dl>

<p>References <a class="el" href="rbtree_8h_source.html#l00081">rbtree_t::count</a>, <a class="el" href="localzone_8h_source.html#l00100">local_zone::dclass</a>, <a class="el" href="localzone_8h_source.html#l00059">local_zone_deny</a>, <a class="el" href="localzone_8c_source.html#l00929">local_zone_out()</a>, <a class="el" href="localzone_8h_source.html#l00067">local_zone_redirect</a>, <a class="el" href="localzone_8h_source.html#l00061">local_zone_refuse</a>, <a class="el" href="localzone_8h_source.html#l00063">local_zone_static</a>, <a class="el" href="localzone_8h_source.html#l00065">local_zone_transparent</a>, <a class="el" href="localzone_8h_source.html#l00106">local_zone::lock</a>, <a class="el" href="localzone_8h_source.html#l00078">local_zones::lock</a>, <a class="el" href="log_8c_source.html#l00228">log_info()</a>, <a class="el" href="net__help_8c_source.html#l00265">log_nametypeclass()</a>, <a class="el" href="localzone_8h_source.html#l00093">local_zone::name</a>, <a class="el" href="rbtree_8h_source.html#l00173">RBTREE_FOR</a>, <a class="el" href="localzone_8h_source.html#l00109">local_zone::type</a>, and <a class="el" href="localzone_8h_source.html#l00080">local_zones::ztree</a>.</p>

<p>Referenced by <a class="el" href="libunbound_8c_source.html#l00923">ub_ctx_print_local_zones()</a>.</p>

</div>
</div><p>
<a class="anchor" name="36a07e930476dd763ebc45465db05db5"></a><!-- doxytag: member="localzone.h::local_zones_answer" ref="36a07e930476dd763ebc45465db05db5" args="(struct local_zones *zones, struct query_info *qinfo, struct edns_data *edns, ldns_buffer *buf, struct regional *temp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int local_zones_answer           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structlocal__zones.html">local_zones</a> *&nbsp;</td>
          <td class="paramname"> <em>zones</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structquery__info.html">query_info</a> *&nbsp;</td>
          <td class="paramname"> <em>qinfo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structedns__data.html">edns_data</a> *&nbsp;</td>
          <td class="paramname"> <em>edns</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ldns_buffer *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structregional.html">regional</a> *&nbsp;</td>
          <td class="paramname"> <em>temp</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Answer authoritatively for local zones. 
<p>
Takes care of locking. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>zones,:</em>&nbsp;</td><td>the stored zones (shared, read only). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>qinfo,:</em>&nbsp;</td><td>query info (parsed). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>edns,:</em>&nbsp;</td><td>edns info (parsed). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf,:</em>&nbsp;</td><td>buffer with query ID and flags, also for reply. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>temp,:</em>&nbsp;</td><td>temporary storage region. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if answer is in buffer. false if query is not answered by authority data. If the reply should be dropped altogether, the return value is true, but the buffer is cleared (empty). </dd></dl>

<p>References <a class="el" href="dname_8c_source.html#l00369">dname_count_labels()</a>, <a class="el" href="localzone_8c_source.html#l01016">local_data_answer()</a>, <a class="el" href="localzone_8c_source.html#l00881">local_zones_lookup()</a>, <a class="el" href="localzone_8h_source.html#l00106">local_zone::lock</a>, <a class="el" href="localzone_8h_source.html#l00078">local_zones::lock</a>, <a class="el" href="localzone_8c_source.html#l01063">lz_zone_answer()</a>, <a class="el" href="msgreply_8h_source.html#l00070">query_info::qclass</a>, <a class="el" href="msgreply_8h_source.html#l00064">query_info::qname</a>, and <a class="el" href="msgreply_8h_source.html#l00066">query_info::qname_len</a>.</p>

<p>Referenced by <a class="el" href="libworker_8c_source.html#l00604">handle_newq()</a>, <a class="el" href="libworker_8c_source.html#l00497">libworker_fg()</a>, and <a class="el" href="worker_8c_source.html#l00681">worker_handle_request()</a>.</p>

</div>
</div><p>
<a class="anchor" name="7535f7094a8182d5d93fa9537343db4b"></a><!-- doxytag: member="localzone.h::local_zone_str2type" ref="7535f7094a8182d5d93fa9537343db4b" args="(const char *str, enum localzone_type *t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int local_zone_str2type           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum <a class="el" href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2d">localzone_type</a> *&nbsp;</td>
          <td class="paramname"> <em>t</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Parse the string into localzone type. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>str,:</em>&nbsp;</td><td>string to parse </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>t,:</em>&nbsp;</td><td>local zone type returned here. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on parse error. </dd></dl>

<p>References <a class="el" href="localzone_8h_source.html#l00059">local_zone_deny</a>, <a class="el" href="localzone_8h_source.html#l00067">local_zone_redirect</a>, <a class="el" href="localzone_8h_source.html#l00061">local_zone_refuse</a>, <a class="el" href="localzone_8h_source.html#l00063">local_zone_static</a>, and <a class="el" href="localzone_8h_source.html#l00065">local_zone_transparent</a>.</p>

<p>Referenced by <a class="el" href="remote_8c_source.html#l00946">do_zone_add()</a>, <a class="el" href="localzone_8c_source.html#l00199">lz_enter_zone()</a>, and <a class="el" href="libunbound_8c_source.html#l00934">ub_ctx_zone_add()</a>.</p>

</div>
</div><p>
<a class="anchor" name="39d3a3f67eff004b5d0161bc856a0f14"></a><!-- doxytag: member="localzone.h::local_zones_find" ref="39d3a3f67eff004b5d0161bc856a0f14" args="(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structlocal__zone.html">local_zone</a>* local_zones_find           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structlocal__zones.html">local_zones</a> *&nbsp;</td>
          <td class="paramname"> <em>zones</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>labs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&nbsp;</td>
          <td class="paramname"> <em>dclass</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Find zone that with exactly given name, class. 
<p>
User must lock the tree or result zone. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>zones,:</em>&nbsp;</td><td>the zones tree </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name,:</em>&nbsp;</td><td>dname to lookup </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len,:</em>&nbsp;</td><td>length of name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>labs,:</em>&nbsp;</td><td>labelcount of name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dclass,:</em>&nbsp;</td><td>class to lookup. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the exact <a class="el" href="structlocal__zone.html" title="Local zone.">local_zone</a> or NULL. </dd></dl>

<p>References <a class="el" href="localzone_8h_source.html#l00100">local_zone::dclass</a>, <a class="el" href="rbtree_8h_source.html#l00063">rbnode_t::key</a>, <a class="el" href="localzone_8h_source.html#l00093">local_zone::name</a>, <a class="el" href="localzone_8h_source.html#l00097">local_zone::namelabs</a>, <a class="el" href="localzone_8h_source.html#l00095">local_zone::namelen</a>, <a class="el" href="localzone_8h_source.html#l00088">local_zone::node</a>, <a class="el" href="rbtree_8c_source.html#l00280">rbtree_search()</a>, and <a class="el" href="localzone_8h_source.html#l00080">local_zones::ztree</a>.</p>

<p>Referenced by <a class="el" href="remote_8c_source.html#l00946">do_zone_add()</a>, <a class="el" href="remote_8c_source.html#l00987">do_zone_remove()</a>, <a class="el" href="localzone_8c_source.html#l01186">local_zones_add_zone()</a>, <a class="el" href="libunbound_8c_source.html#l00934">ub_ctx_zone_add()</a>, and <a class="el" href="libunbound_8c_source.html#l00974">ub_ctx_zone_remove()</a>.</p>

</div>
</div><p>
<a class="anchor" name="6796f4a9e36f41333c008c881d02bd75"></a><!-- doxytag: member="localzone.h::local_zones_add_zone" ref="6796f4a9e36f41333c008c881d02bd75" args="(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass, enum localzone_type tp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structlocal__zone.html">local_zone</a>* local_zones_add_zone           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structlocal__zones.html">local_zones</a> *&nbsp;</td>
          <td class="paramname"> <em>zones</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>labs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&nbsp;</td>
          <td class="paramname"> <em>dclass</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum <a class="el" href="localzone_8h.html#d4936d63a4fd091d968d5331e1592e2d">localzone_type</a>&nbsp;</td>
          <td class="paramname"> <em>tp</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a new zone. 
<p>
Caller must hold the zones lock. Adjusts the other zones as well (parent pointers) after insertion. The zone must NOT exist (returns NULL and logs error). <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>zones,:</em>&nbsp;</td><td>the zones tree </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name,:</em>&nbsp;</td><td>dname to add </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len,:</em>&nbsp;</td><td>length of name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>labs,:</em>&nbsp;</td><td>labelcount of name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dclass,:</em>&nbsp;</td><td>class to add. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>tp,:</em>&nbsp;</td><td>type. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="structlocal__zone.html" title="Local zone.">local_zone</a> or NULL on error, caller must printout memory error. </dd></dl>

<p>References <a class="el" href="localzone_8c_source.html#l00147">local_zone_create()</a>, <a class="el" href="localzone_8c_source.html#l00086">local_zone_delete()</a>, <a class="el" href="localzone_8c_source.html#l00914">local_zones_find()</a>, <a class="el" href="localzone_8h_source.html#l00106">local_zone::lock</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="localzone_8h_source.html#l00088">local_zone::node</a>, <a class="el" href="localzone_8h_source.html#l00090">local_zone::parent</a>, <a class="el" href="rbtree_8c_source.html#l00227">rbtree_insert()</a>, <a class="el" href="localzone_8c_source.html#l01162">set_kiddo_parents()</a>, and <a class="el" href="localzone_8h_source.html#l00080">local_zones::ztree</a>.</p>

<p>Referenced by <a class="el" href="remote_8c_source.html#l00946">do_zone_add()</a>, <a class="el" href="localzone_8c_source.html#l01229">local_zones_add_RR()</a>, and <a class="el" href="libunbound_8c_source.html#l00934">ub_ctx_zone_add()</a>.</p>

</div>
</div><p>
<a class="anchor" name="6cd901ec04861c6c5699e4ffe5d6e0e9"></a><!-- doxytag: member="localzone.h::local_zones_del_zone" ref="6cd901ec04861c6c5699e4ffe5d6e0e9" args="(struct local_zones *zones, struct local_zone *zone)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void local_zones_del_zone           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structlocal__zones.html">local_zones</a> *&nbsp;</td>
          <td class="paramname"> <em>zones</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structlocal__zone.html">local_zone</a> *&nbsp;</td>
          <td class="paramname"> <em>zone</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete a zone. 
<p>
Caller must hold the zones lock. Adjusts the other zones as well (parent pointers) after insertion. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>zones,:</em>&nbsp;</td><td>the zones tree </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zone,:</em>&nbsp;</td><td>the zone to delete from tree. Also deletes zone from memory. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="localzone_8c_source.html#l00086">local_zone_delete()</a>, <a class="el" href="localzone_8h_source.html#l00106">local_zone::lock</a>, <a class="el" href="localzone_8h_source.html#l00090">local_zone::parent</a>, <a class="el" href="rbtree_8c_source.html#l00326">rbtree_delete()</a>, <a class="el" href="localzone_8c_source.html#l01162">set_kiddo_parents()</a>, and <a class="el" href="localzone_8h_source.html#l00080">local_zones::ztree</a>.</p>

<p>Referenced by <a class="el" href="remote_8c_source.html#l00987">do_zone_remove()</a>, and <a class="el" href="libunbound_8c_source.html#l00974">ub_ctx_zone_remove()</a>.</p>

</div>
</div><p>
<a class="anchor" name="2f222b2744f769d34725d8e2cd50c101"></a><!-- doxytag: member="localzone.h::local_zones_add_RR" ref="2f222b2744f769d34725d8e2cd50c101" args="(struct local_zones *zones, const char *rr, ldns_buffer *buf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int local_zones_add_RR           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structlocal__zones.html">local_zones</a> *&nbsp;</td>
          <td class="paramname"> <em>zones</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>rr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ldns_buffer *&nbsp;</td>
          <td class="paramname"> <em>buf</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add RR data into the localzone data. 
<p>
Looks up the zone, if no covering zone, a transparent zone with the name of the RR is created. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>zones,:</em>&nbsp;</td><td>the zones tree. Not locked by caller. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>rr,:</em>&nbsp;</td><td>string with on RR. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf,:</em>&nbsp;</td><td>buffer for scratch. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>false on failure. </dd></dl>

<p>References <a class="el" href="dname_8c_source.html#l00384">dname_count_size_labels()</a>, <a class="el" href="localzone_8c_source.html#l00264">get_rr_nameclass()</a>, <a class="el" href="localzone_8h_source.html#l00065">local_zone_transparent</a>, <a class="el" href="localzone_8c_source.html#l01186">local_zones_add_zone()</a>, <a class="el" href="localzone_8c_source.html#l00881">local_zones_lookup()</a>, <a class="el" href="localzone_8h_source.html#l00106">local_zone::lock</a>, <a class="el" href="localzone_8h_source.html#l00078">local_zones::lock</a>, and <a class="el" href="localzone_8c_source.html#l00441">lz_enter_rr_into_zone()</a>.</p>

<p>Referenced by <a class="el" href="remote_8c_source.html#l01008">do_data_add()</a>, and <a class="el" href="libunbound_8c_source.html#l01000">ub_ctx_data_add()</a>.</p>

</div>
</div><p>
<a class="anchor" name="864ca1da34f4a68e4d74e9ce8fecf3e4"></a><!-- doxytag: member="localzone.h::local_zones_del_data" ref="864ca1da34f4a68e4d74e9ce8fecf3e4" args="(struct local_zones *zones, uint8_t *name, size_t len, int labs, uint16_t dclass)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void local_zones_del_data           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structlocal__zones.html">local_zones</a> *&nbsp;</td>
          <td class="paramname"> <em>zones</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>labs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&nbsp;</td>
          <td class="paramname"> <em>dclass</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove data from domain name in the tree. 
<p>
All types are removed. No effect if zone or name does not exist. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>zones,:</em>&nbsp;</td><td>zones tree. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name,:</em>&nbsp;</td><td>dname to remove </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len,:</em>&nbsp;</td><td>length of name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>labs,:</em>&nbsp;</td><td>labelcount of name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dclass,:</em>&nbsp;</td><td>class to remove. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="localzone_8c_source.html#l01277">del_empty_term()</a>, <a class="el" href="localzone_8c_source.html#l00881">local_zones_lookup()</a>, <a class="el" href="localzone_8h_source.html#l00106">local_zone::lock</a>, <a class="el" href="localzone_8h_source.html#l00078">local_zones::lock</a>, <a class="el" href="localzone_8c_source.html#l00393">lz_find_node()</a>, <a class="el" href="localzone_8h_source.html#l00093">local_zone::name</a>, <a class="el" href="localzone_8h_source.html#l00128">local_data::name</a>, <a class="el" href="dname_8c_source.html#l00096">query_dname_compare()</a>, <a class="el" href="localzone_8h_source.html#l00135">local_data::rrsets</a>, and <a class="el" href="localzone_8h_source.html#l00118">local_zone::soa</a>.</p>

<p>Referenced by <a class="el" href="remote_8c_source.html#l01020">do_data_remove()</a>, and <a class="el" href="libunbound_8c_source.html#l01018">ub_ctx_data_remove()</a>.</p>

</div>
</div><p>
<a class="anchor" name="144df1bdefcb26cc781b6f916b3ab1f8"></a><!-- doxytag: member="localzone.h::parse_dname" ref="144df1bdefcb26cc781b6f916b3ab1f8" args="(const char *str, uint8_t **res, size_t *len, int *labs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int parse_dname           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t **&nbsp;</td>
          <td class="paramname"> <em>res</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>labs</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Form wireformat from text format domain name. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>str,:</em>&nbsp;</td><td>the domain name in text "www.example.com" </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>res,:</em>&nbsp;</td><td>resulting wireformat is stored here with malloc. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len,:</em>&nbsp;</td><td>length of resulting wireformat. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>labs,:</em>&nbsp;</td><td>number of labels in resulting wireformat. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>false on error, syntax or memory. Also logged. </dd></dl>

<p>References <a class="el" href="dname_8c_source.html#l00384">dname_count_size_labels()</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, and <a class="el" href="net__help_8c_source.html#l00138">memdup()</a>.</p>

<p>Referenced by <a class="el" href="localzone_8c_source.html#l00199">lz_enter_zone()</a>, <a class="el" href="localzone_8c_source.html#l00541">lz_exists()</a>, <a class="el" href="libunbound_8c_source.html#l01018">ub_ctx_data_remove()</a>, <a class="el" href="libunbound_8c_source.html#l00934">ub_ctx_zone_add()</a>, and <a class="el" href="libunbound_8c_source.html#l00974">ub_ctx_zone_remove()</a>.</p>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Oct 13 06:46:31 2009 for unbound by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>