Sophie

Sophie

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

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: module_env Struct 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 class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><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="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>module_env Struct Reference</h1><!-- doxytag: class="module_env" -->Module environment.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;module.h&gt;</code>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="25a6d7a81cdc66df2e8e35b7a4dd69ca"></a><!-- doxytag: member="module_env::cfg" ref="25a6d7a81cdc66df2e8e35b7a4dd69ca" args="" -->
struct <a class="el" href="structconfig__file.html">config_file</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#25a6d7a81cdc66df2e8e35b7a4dd69ca">cfg</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">config file with config options <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="59bc703129614f51796d05b40ab6861a"></a><!-- doxytag: member="module_env::msg_cache" ref="59bc703129614f51796d05b40ab6861a" args="" -->
struct <a class="el" href="structslabhash.html">slabhash</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#59bc703129614f51796d05b40ab6861a">msg_cache</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">shared message cache <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9ebc526fd289f7b5e957b8cf6348ed4"></a><!-- doxytag: member="module_env::rrset_cache" ref="a9ebc526fd289f7b5e957b8cf6348ed4" args="" -->
struct <a class="el" href="structrrset__cache.html">rrset_cache</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#a9ebc526fd289f7b5e957b8cf6348ed4">rrset_cache</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">shared rrset cache <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3d7c506ab448fb6cc36b01ac04aa9e06"></a><!-- doxytag: member="module_env::infra_cache" ref="3d7c506ab448fb6cc36b01ac04aa9e06" args="" -->
struct <a class="el" href="structinfra__cache.html">infra_cache</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#3d7c506ab448fb6cc36b01ac04aa9e06">infra_cache</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">shared infrastructure cache (edns, lameness) <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#b4388c4289bb9df8ab5ecf8e4f9480c8">send_packet</a> )(ldns_buffer *pkt, struct sockaddr_storage *addr, socklen_t addrlen, int timeout, struct <a class="el" href="structmodule__qstate.html">module_qstate</a> *q, int use_tcp)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Direct access to the network, this packet gets sent to destination.  <a href="#b4388c4289bb9df8ab5ecf8e4f9480c8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structoutbound__entry.html">outbound_entry</a> *(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#02d9f870e4ff311be7f51180cd71890d">send_query</a> )(uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec, struct sockaddr_storage *addr, socklen_t addrlen, struct <a class="el" href="structmodule__qstate.html">module_qstate</a> *q)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send serviced DNS query to server.  <a href="#02d9f870e4ff311be7f51180cd71890d"></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="structmodule__env.html#aa6a1207abf26c0bc196b2733b5f53d7">detach_subs</a> )(struct <a class="el" href="structmodule__qstate.html">module_qstate</a> *qstate)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Detach-subqueries.  <a href="#aa6a1207abf26c0bc196b2733b5f53d7"></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="structmodule__env.html#40f3519285e6f6a44648463e777f869f">attach_sub</a> )(struct <a class="el" href="structmodule__qstate.html">module_qstate</a> *qstate, struct <a class="el" href="structquery__info.html">query_info</a> *qinfo, uint16_t qflags, int prime, struct <a class="el" href="structmodule__qstate.html">module_qstate</a> **newq)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attach subquery.  <a href="#40f3519285e6f6a44648463e777f869f"></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="structmodule__env.html#61f27ef3c7bf98b6d7e6642719c3b91d">kill_sub</a> )(struct <a class="el" href="structmodule__qstate.html">module_qstate</a> *newq)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Kill newly attached sub.  <a href="#61f27ef3c7bf98b6d7e6642719c3b91d"></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="structmodule__env.html#e51393ea363c9fdd4239e2816f140e21">detect_cycle</a> )(struct <a class="el" href="structmodule__qstate.html">module_qstate</a> *qstate, struct <a class="el" href="structquery__info.html">query_info</a> *qinfo, uint16_t flags, int prime)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Detect if adding a dependency for qstate on name,type,class will create a dependency cycle.  <a href="#e51393ea363c9fdd4239e2816f140e21"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structregional.html">regional</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#3d1840ff1379566500dc43ec37dfefb4">scratch</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">region for temporary usage.  <a href="#3d1840ff1379566500dc43ec37dfefb4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ldns_buffer *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#d5212ebf3c6fcd11ef7d95e55f5d8ab1">scratch_buffer</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">buffer for temporary usage.  <a href="#d5212ebf3c6fcd11ef7d95e55f5d8ab1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structworker.html">worker</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#67a50e52d9abeb9b3fe6a01a0fc2c5b7">worker</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">internal data for <a class="el" href="structdaemon.html" title="Structure holding worker list.">daemon</a> - <a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> thread.  <a href="#67a50e52d9abeb9b3fe6a01a0fc2c5b7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="de3dbe78e2168665fd6a2b8a643c55dd"></a><!-- doxytag: member="module_env::mesh" ref="de3dbe78e2168665fd6a2b8a643c55dd" args="" -->
struct <a class="el" href="structmesh__area.html">mesh_area</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#de3dbe78e2168665fd6a2b8a643c55dd">mesh</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">mesh area with query state dependencies <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="565c0c9ed65a47deeecd8fe1068c33a8"></a><!-- doxytag: member="module_env::alloc" ref="565c0c9ed65a47deeecd8fe1068c33a8" args="" -->
struct <a class="el" href="structalloc__cache.html">alloc_cache</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#565c0c9ed65a47deeecd8fe1068c33a8">alloc</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">allocation service <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9d30a14433dcde133db39aa43732649c"></a><!-- doxytag: member="module_env::rnd" ref="9d30a14433dcde133db39aa43732649c" args="" -->
struct <a class="el" href="structub__randstate.html">ub_randstate</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#9d30a14433dcde133db39aa43732649c">rnd</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">random table to generate random numbers <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6be93be7de01d222c9d8424b5acd6888"></a><!-- doxytag: member="module_env::now" ref="6be93be7de01d222c9d8424b5acd6888" args="" -->
uint32_t *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#6be93be7de01d222c9d8424b5acd6888">now</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">time in seconds, converted to integer <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct timeval *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#93e59a77aed8b9156d7df28c14146830">now_tv</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">time in microseconds.  <a href="#93e59a77aed8b9156d7df28c14146830"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="945a9d30025e41a5285591fb72eca78f"></a><!-- doxytag: member="module_env::need_to_validate" ref="945a9d30025e41a5285591fb72eca78f" args="" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#945a9d30025e41a5285591fb72eca78f">need_to_validate</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">is validation required for messages, controls client-facing validation status (AD bits) and servfails <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structval__anchors.html">val_anchors</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#4024c545c92a7e67119b1ecf0155b908">anchors</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">trusted key storage; these are the configured keys, if not NULL, otherwise configured by validator.  <a href="#4024c545c92a7e67119b1ecf0155b908"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structval__neg__cache.html">val_neg_cache</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#04a93fadd7d7618d46843c0166c1929f">neg_cache</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">negative cache, configured by the validator.  <a href="#04a93fadd7d7618d46843c0166c1929f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structiter__forwards.html">iter_forwards</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmodule__env.html#87fc14c9780c93f19d05c9f866dd0f60">fwds</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Mapping of forwarding zones to targets.  <a href="#87fc14c9780c93f19d05c9f866dd0f60"></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="structmodule__env.html#f944e98da4d5a8db0e8467f9ef4ff411">modinfo</a> [MAX_MODULE]</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">module specific data.  <a href="#f944e98da4d5a8db0e8467f9ef4ff411"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Module environment. 
<p>
Services and data provided to the module. <hr><h2>Field Documentation</h2>
<a class="anchor" name="b4388c4289bb9df8ab5ecf8e4f9480c8"></a><!-- doxytag: member="module_env::send_packet" ref="b4388c4289bb9df8ab5ecf8e4f9480c8" args=")(ldns_buffer *pkt, struct sockaddr_storage *addr, socklen_t addrlen, int timeout, struct module_qstate *q, int use_tcp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="structmodule__env.html#b4388c4289bb9df8ab5ecf8e4f9480c8">module_env::send_packet</a>)(ldns_buffer *pkt, struct sockaddr_storage *addr, socklen_t addrlen, int timeout, struct <a class="el" href="structmodule__qstate.html">module_qstate</a> *q, int use_tcp)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Direct access to the network, this packet gets sent to destination. 
<p>
Send DNS query to server. operate() should return with wait_reply. Later on a callback will cause operate() to be called with event timeout or reply. Replied packet is then in the query buffer. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pkt,:</em>&nbsp;</td><td>packet to send. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>addr,:</em>&nbsp;</td><td>where to. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>addrlen,:</em>&nbsp;</td><td>length of addr. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout,:</em>&nbsp;</td><td>seconds to wait until timeout. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>q,:</em>&nbsp;</td><td>wich query state to reactivate upon return. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>use_tcp,:</em>&nbsp;</td><td>set to true to send over TCP. 0 for UDP. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: false on failure (memory or socket related). no query was sent. </dd></dl>

<p>Referenced by <a class="el" href="libworker_8c_source.html#l00092">libworker_setup()</a>, and <a class="el" href="worker_8c_source.html#l00967">worker_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="02d9f870e4ff311be7f51180cd71890d"></a><!-- doxytag: member="module_env::send_query" ref="02d9f870e4ff311be7f51180cd71890d" args=")(uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec, struct sockaddr_storage *addr, socklen_t addrlen, struct module_qstate *q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structoutbound__entry.html">outbound_entry</a>*(* <a class="el" href="structmodule__env.html#02d9f870e4ff311be7f51180cd71890d">module_env::send_query</a>)(uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec, struct sockaddr_storage *addr, socklen_t addrlen, struct <a class="el" href="structmodule__qstate.html">module_qstate</a> *q)<code> [read]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Send serviced DNS query to server. 
<p>
UDP/TCP and EDNS is handled. operate() should return with wait_reply. Later on a callback will cause operate() to be called with event timeout or reply. The time until a timeout is calculated from roundtrip timing, several UDP retries are attempted. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>qname,:</em>&nbsp;</td><td>query name. (host order) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>qnamelen,:</em>&nbsp;</td><td>length in bytes of qname, including trailing 0. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>qtype,:</em>&nbsp;</td><td>query type. (host order) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>qclass,:</em>&nbsp;</td><td>query class. (host order) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags,:</em>&nbsp;</td><td>host order flags word, with opcode and CD bit. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dnssec,:</em>&nbsp;</td><td>if set, EDNS record will have bits set. If EDNS_DO bit is set, DO bit is set in EDNS records. If BIT_CD is set, CD bit is set in queries with EDNS records. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>addr,:</em>&nbsp;</td><td>where to. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>addrlen,:</em>&nbsp;</td><td>length of addr. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>q,:</em>&nbsp;</td><td>wich query state to reactivate upon return. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: false on failure (memory or socket related). no query was sent. Or returns an outbound <a class="el" href="structentry.html" title="data structure to keep the canned queries in.">entry</a> with qsent and qstate set. This <a class="el" href="structoutbound__entry.html" title="Outbound list entry.">outbound_entry</a> will be used on later module invocations that involve this query (timeout, error or reply). </dd></dl>

<p>Referenced by <a class="el" href="libworker_8c_source.html#l00092">libworker_setup()</a>, <a class="el" href="iterator_8c_source.html#l01249">processQueryTargets()</a>, and <a class="el" href="worker_8c_source.html#l00967">worker_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="aa6a1207abf26c0bc196b2733b5f53d7"></a><!-- doxytag: member="module_env::detach_subs" ref="aa6a1207abf26c0bc196b2733b5f53d7" args=")(struct module_qstate *qstate)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="structmodule__env.html#aa6a1207abf26c0bc196b2733b5f53d7">module_env::detach_subs</a>)(struct <a class="el" href="structmodule__qstate.html">module_qstate</a> *qstate)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Detach-subqueries. 
<p>
Remove all sub-query references from this query state. Keeps super-references of those sub-queries correct. Updates stat items in <a class="el" href="structmesh__area.html" title="Mesh of query states.">mesh_area</a> structure. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>qstate,:</em>&nbsp;</td><td>used to find mesh state. </td></tr>
  </table>
</dl>

<p>Referenced by <a class="el" href="libworker_8c_source.html#l00092">libworker_setup()</a>, <a class="el" href="iterator_8c_source.html#l01454">processQueryResponse()</a>, and <a class="el" href="worker_8c_source.html#l00967">worker_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="40f3519285e6f6a44648463e777f869f"></a><!-- doxytag: member="module_env::attach_sub" ref="40f3519285e6f6a44648463e777f869f" args=")(struct module_qstate *qstate, struct query_info *qinfo, uint16_t qflags, int prime, struct module_qstate **newq)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="structmodule__env.html#40f3519285e6f6a44648463e777f869f">module_env::attach_sub</a>)(struct <a class="el" href="structmodule__qstate.html">module_qstate</a> *qstate, struct <a class="el" href="structquery__info.html">query_info</a> *qinfo, uint16_t qflags, int prime, struct <a class="el" href="structmodule__qstate.html">module_qstate</a> **newq)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Attach subquery. 
<p>
Creates it if it does not exist already. Keeps sub and super references correct. Updates stat items in <a class="el" href="structmesh__area.html" title="Mesh of query states.">mesh_area</a> structure. Pass if it is priming query or not. return: o if error (malloc) happened. o need to initialise the new state (module init; it is a new state). so that the next run of the query with this module is successful. o no init needed, attachment successful.<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>qstate,:</em>&nbsp;</td><td>the state to find mesh state, and that wants to receive the results from the new subquery. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>qinfo,:</em>&nbsp;</td><td>what to query for (copied). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>qflags,:</em>&nbsp;</td><td>what flags to use (RD, CD flag or not). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>prime,:</em>&nbsp;</td><td>if it is a (stub) priming query. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>newq,:</em>&nbsp;</td><td>If the new subquery needs initialisation, it is returned, otherwise NULL is returned. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: false on error, true if success (and init may be needed). </dd></dl>

<p>Referenced by <a class="el" href="validator_8c_source.html#l00328">generate_request()</a>, <a class="el" href="iterator_8c_source.html#l00465">generate_sub_request()</a>, <a class="el" href="libworker_8c_source.html#l00092">libworker_setup()</a>, and <a class="el" href="worker_8c_source.html#l00967">worker_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="61f27ef3c7bf98b6d7e6642719c3b91d"></a><!-- doxytag: member="module_env::kill_sub" ref="61f27ef3c7bf98b6d7e6642719c3b91d" args=")(struct module_qstate *newq)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="structmodule__env.html#61f27ef3c7bf98b6d7e6642719c3b91d">module_env::kill_sub</a>)(struct <a class="el" href="structmodule__qstate.html">module_qstate</a> *newq)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Kill newly attached sub. 
<p>
If attach_sub returns newq for initialisation, but that fails, then this routine will cleanup and delete the fresly created sub. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>newq,:</em>&nbsp;</td><td>the new subquery that is no longer needed. It is removed. </td></tr>
  </table>
</dl>

<p>Referenced by <a class="el" href="iterator_8c_source.html#l00739">generate_ns_check()</a>, <a class="el" href="iterator_8c_source.html#l00465">generate_sub_request()</a>, <a class="el" href="libworker_8c_source.html#l00092">libworker_setup()</a>, <a class="el" href="iterator_8c_source.html#l00541">prime_root()</a>, <a class="el" href="iterator_8c_source.html#l00600">prime_stub()</a>, and <a class="el" href="worker_8c_source.html#l00967">worker_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="e51393ea363c9fdd4239e2816f140e21"></a><!-- doxytag: member="module_env::detect_cycle" ref="e51393ea363c9fdd4239e2816f140e21" args=")(struct module_qstate *qstate, struct query_info *qinfo, uint16_t flags, int prime)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="structmodule__env.html#e51393ea363c9fdd4239e2816f140e21">module_env::detect_cycle</a>)(struct <a class="el" href="structmodule__qstate.html">module_qstate</a> *qstate, struct <a class="el" href="structquery__info.html">query_info</a> *qinfo, uint16_t flags, int prime)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Detect if adding a dependency for qstate on name,type,class will create a dependency cycle. 
<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>qstate,:</em>&nbsp;</td><td>given mesh querystate. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>qinfo,:</em>&nbsp;</td><td>query info for dependency. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags,:</em>&nbsp;</td><td>query flags of dependency, RD/CD flags. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>prime,:</em>&nbsp;</td><td>if dependency is a priming query or not. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if the name,type,class exists and the given qstate mesh exists as a dependency of that name. Thus if qstate becomes dependent on name,type,class then a cycle is created. </dd></dl>

<p>Referenced by <a class="el" href="iter__utils_8c_source.html#l00402">causes_cycle()</a>, <a class="el" href="iterator_8c_source.html#l00465">generate_sub_request()</a>, <a class="el" href="libworker_8c_source.html#l00092">libworker_setup()</a>, and <a class="el" href="worker_8c_source.html#l00967">worker_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="3d1840ff1379566500dc43ec37dfefb4"></a><!-- doxytag: member="module_env::scratch" ref="3d1840ff1379566500dc43ec37dfefb4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structregional.html">regional</a>* <a class="el" href="structmodule__env.html#3d1840ff1379566500dc43ec37dfefb4">module_env::scratch</a><code> [read]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
region for temporary usage. 
<p>
May be cleared after operate() call. 
<p>Referenced by <a class="el" href="unbound-checkconf_8c_source.html#l00214">check_mod()</a>, <a class="el" href="pythonmod__utils_8c_source.html#l00107">createResponse()</a>, <a class="el" href="val__sigcrypt_8c_source.html#l00471">dnskey_verify_rrset()</a>, <a class="el" href="val__sigcrypt_8c_source.html#l00505">dnskeyset_verify_rrset_sig()</a>, <a class="el" href="val__sigcrypt_8c_source.html#l00317">ds_digest_match_dnskey()</a>, <a class="el" href="unitverify_8c_source.html#l00302">dstest_file()</a>, <a class="el" href="val__nsec3_8c_source.html#l00826">find_covering_nsec3()</a>, <a class="el" href="val__nsec3_8c_source.html#l00733">find_matching_nsec3()</a>, <a class="el" href="libworker_8c_source.html#l00604">handle_newq()</a>, <a class="el" href="libworker_8c_source.html#l00071">libworker_delete()</a>, <a class="el" href="libworker_8c_source.html#l00497">libworker_fg()</a>, <a class="el" href="libworker_8c_source.html#l00439">libworker_fillup_fg()</a>, <a class="el" href="libworker_8c_source.html#l00092">libworker_setup()</a>, <a class="el" href="mesh_8c_source.html#l00614">mesh_do_callback()</a>, <a class="el" href="mesh_8c_source.html#l00886">mesh_run()</a>, <a class="el" href="mesh_8c_source.html#l00662">mesh_send_reply()</a>, <a class="el" href="val__nsec3_8c_source.html#l01012">nsec3_do_prove_nameerror()</a>, <a class="el" href="val__nsec3_8c_source.html#l01072">nsec3_do_prove_nodata()</a>, <a class="el" href="iterator_8c_source.html#l02011">process_response()</a>, <a class="el" href="iterator_8c_source.html#l00827">processInitRequest()</a>, <a class="el" href="val__utils_8c_source.html#l00305">val_verify_rrset()</a>, <a class="el" href="unitverify_8c_source.html#l00257">verifytest_file()</a>, and <a class="el" href="worker_8c_source.html#l00967">worker_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="d5212ebf3c6fcd11ef7d95e55f5d8ab1"></a><!-- doxytag: member="module_env::scratch_buffer" ref="d5212ebf3c6fcd11ef7d95e55f5d8ab1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ldns_buffer* <a class="el" href="structmodule__env.html#d5212ebf3c6fcd11ef7d95e55f5d8ab1">module_env::scratch_buffer</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
buffer for temporary usage. 
<p>
May be cleared after operate() call. 
<p>Referenced by <a class="el" href="unbound-checkconf_8c_source.html#l00214">check_mod()</a>, <a class="el" href="val__sigcrypt_8c_source.html#l00471">dnskey_verify_rrset()</a>, <a class="el" href="val__sigcrypt_8c_source.html#l00505">dnskeyset_verify_rrset_sig()</a>, <a class="el" href="remote_8c_source.html#l01008">do_data_add()</a>, <a class="el" href="val__sigcrypt_8c_source.html#l00276">ds_create_dnskey_digest()</a>, <a class="el" href="unitverify_8c_source.html#l00302">dstest_file()</a>, <a class="el" href="val__nsec3_8c_source.html#l00826">find_covering_nsec3()</a>, <a class="el" href="val__nsec3_8c_source.html#l00733">find_matching_nsec3()</a>, <a class="el" href="libworker_8c_source.html#l00071">libworker_delete()</a>, <a class="el" href="libworker_8c_source.html#l00092">libworker_setup()</a>, <a class="el" href="cachedump_8c_source.html#l00773">load_cache()</a>, <a class="el" href="cachedump_8c_source.html#l00760">load_msg_cache()</a>, <a class="el" href="cachedump_8c_source.html#l00592">load_rrset_cache()</a>, <a class="el" href="iterator_8c_source.html#l00827">processInitRequest()</a>, <a class="el" href="unitverify_8c_source.html#l00257">verifytest_file()</a>, <a class="el" href="worker_8c_source.html#l01115">worker_delete()</a>, and <a class="el" href="worker_8c_source.html#l00967">worker_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="67a50e52d9abeb9b3fe6a01a0fc2c5b7"></a><!-- doxytag: member="module_env::worker" ref="67a50e52d9abeb9b3fe6a01a0fc2c5b7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structworker.html">worker</a>* <a class="el" href="structmodule__env.html#67a50e52d9abeb9b3fe6a01a0fc2c5b7">module_env::worker</a><code> [read]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
internal data for <a class="el" href="structdaemon.html" title="Structure holding worker list.">daemon</a> - <a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> thread. 
<p>

<p>Referenced by <a class="el" href="daemon_8c_source.html#l00225">daemon_setup_modules()</a>, <a class="el" href="libworker_8c_source.html#l00699">libworker_handle_reply()</a>, <a class="el" href="libworker_8c_source.html#l00728">libworker_handle_service_reply()</a>, <a class="el" href="libworker_8c_source.html#l00654">libworker_send_packet()</a>, <a class="el" href="libworker_8c_source.html#l00677">libworker_send_query()</a>, <a class="el" href="libworker_8c_source.html#l00092">libworker_setup()</a>, <a class="el" href="libunbound_8c_source.html#l00064">ub_ctx_create()</a>, <a class="el" href="worker_8c_source.html#l00209">worker_handle_reply()</a>, <a class="el" href="worker_8c_source.html#l00241">worker_handle_service_reply()</a>, <a class="el" href="worker_8c_source.html#l00967">worker_init()</a>, <a class="el" href="worker_8c_source.html#l01148">worker_send_packet()</a>, and <a class="el" href="worker_8c_source.html#l01172">worker_send_query()</a>.</p>

</div>
</div><p>
<a class="anchor" name="93e59a77aed8b9156d7df28c14146830"></a><!-- doxytag: member="module_env::now_tv" ref="93e59a77aed8b9156d7df28c14146830" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct timeval* <a class="el" href="structmodule__env.html#93e59a77aed8b9156d7df28c14146830">module_env::now_tv</a><code> [read]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
time in microseconds. 
<p>
Relatively recent. 
<p>Referenced by <a class="el" href="remote_8c_source.html#l01358">get_mesh_age()</a>, <a class="el" href="libworker_8c_source.html#l00092">libworker_setup()</a>, <a class="el" href="mesh_8c_source.html#l00234">mesh_make_new_space()</a>, <a class="el" href="mesh_8c_source.html#l00662">mesh_send_reply()</a>, <a class="el" href="mesh_8c_source.html#l00805">mesh_state_add_reply()</a>, <a class="el" href="remote_8c_source.html#l00695">print_uptime()</a>, and <a class="el" href="worker_8c_source.html#l00967">worker_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="4024c545c92a7e67119b1ecf0155b908"></a><!-- doxytag: member="module_env::anchors" ref="4024c545c92a7e67119b1ecf0155b908" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structval__anchors.html">val_anchors</a>* <a class="el" href="structmodule__env.html#4024c545c92a7e67119b1ecf0155b908">module_env::anchors</a><code> [read]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
trusted key storage; these are the configured keys, if not NULL, otherwise configured by validator. 
<p>
These are the trust anchors, and are not primed and ready for validation, but on the bright side, they are read only memory, thus no locks and fast. 
<p>Referenced by <a class="el" href="iter__utils_8c_source.html#l00476">iter_indicates_dnssec()</a>, <a class="el" href="validator_8c_source.html#l02453">process_dlv_response()</a>, <a class="el" href="validator_8c_source.html#l01837">processDLVLookup()</a>, <a class="el" href="validator_8c_source.html#l01720">processFinished()</a>, <a class="el" href="validator_8c_source.html#l01158">processInit()</a>, <a class="el" href="validator_8c_source.html#l00101">val_apply_cfg()</a>, <a class="el" href="validator_8c_source.html#l00172">val_deinit()</a>, <a class="el" href="validator_8c_source.html#l01605">val_dlv_init()</a>, and <a class="el" href="validator_8c_source.html#l02582">val_get_mem()</a>.</p>

</div>
</div><p>
<a class="anchor" name="04a93fadd7d7618d46843c0166c1929f"></a><!-- doxytag: member="module_env::neg_cache" ref="04a93fadd7d7618d46843c0166c1929f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structval__neg__cache.html">val_neg_cache</a>* <a class="el" href="structmodule__env.html#04a93fadd7d7618d46843c0166c1929f">module_env::neg_cache</a><code> [read]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
negative cache, configured by the validator. 
<p>
if not NULL, contains NSEC record lookup trees. 
<p>Referenced by <a class="el" href="iterator_8c_source.html#l00827">processInitRequest()</a>, <a class="el" href="iterator_8c_source.html#l01454">processQueryResponse()</a>, and <a class="el" href="validator_8c_source.html#l00101">val_apply_cfg()</a>.</p>

</div>
</div><p>
<a class="anchor" name="87fc14c9780c93f19d05c9f866dd0f60"></a><!-- doxytag: member="module_env::fwds" ref="87fc14c9780c93f19d05c9f866dd0f60" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structiter__forwards.html">iter_forwards</a>* <a class="el" href="structmodule__env.html#87fc14c9780c93f19d05c9f866dd0f60">module_env::fwds</a><code> [read]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Mapping of forwarding zones to targets. 
<p>
iterator forwarder information. per-thread, created by <a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> 
<p>Referenced by <a class="el" href="remote_8c_source.html#l01295">do_forward()</a>, <a class="el" href="iterator_8c_source.html#l00788">forward_request()</a>, <a class="el" href="libworker_8c_source.html#l00071">libworker_delete()</a>, <a class="el" href="libworker_8c_source.html#l00092">libworker_setup()</a>, <a class="el" href="iterator_8c_source.html#l00827">processInitRequest()</a>, <a class="el" href="worker_8c_source.html#l01115">worker_delete()</a>, and <a class="el" href="worker_8c_source.html#l00967">worker_init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="f944e98da4d5a8db0e8467f9ef4ff411"></a><!-- doxytag: member="module_env::modinfo" ref="f944e98da4d5a8db0e8467f9ef4ff411" args="[MAX_MODULE]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* <a class="el" href="structmodule__env.html#f944e98da4d5a8db0e8467f9ef4ff411">module_env::modinfo</a>[MAX_MODULE]          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
module specific data. 
<p>
indexed by module id. 
<p>Referenced by <a class="el" href="remote_8c_source.html#l01165">do_flush_zone()</a>, <a class="el" href="validator_8c_source.html#l02151">ds_response_to_ke()</a>, <a class="el" href="stats_8c_source.html#l00101">get_rrset_bogus()</a>, <a class="el" href="iterator_8c_source.html#l00083">iter_deinit()</a>, <a class="el" href="iterator_8c_source.html#l02165">iter_get_mem()</a>, <a class="el" href="iterator_8c_source.html#l00066">iter_init()</a>, <a class="el" href="iterator_8c_source.html#l02108">iter_operate()</a>, <a class="el" href="validator_8c_source.html#l02045">primeResponseToKE()</a>, <a class="el" href="validator_8c_source.html#l02453">process_dlv_response()</a>, <a class="el" href="validator_8c_source.html#l02358">process_dnskey_response()</a>, <a class="el" href="pythonmod_8c_source.html#l00223">pythonmod_deinit()</a>, <a class="el" href="pythonmod_8c_source.html#l00349">pythonmod_get_mem()</a>, <a class="el" href="pythonmod_8c_source.html#l00253">pythonmod_inform_super()</a>, <a class="el" href="pythonmod_8c_source.html#l00105">pythonmod_init()</a>, <a class="el" href="pythonmod_8c_source.html#l00288">pythonmod_operate()</a>, <a class="el" href="validator_8c_source.html#l00172">val_deinit()</a>, <a class="el" href="validator_8c_source.html#l02582">val_get_mem()</a>, <a class="el" href="validator_8c_source.html#l00150">val_init()</a>, and <a class="el" href="validator_8c_source.html#l01970">val_operate()</a>.</p>

</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>util/<a class="el" href="module_8h.html">module.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Oct 13 06:46:34 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>