Sophie

Sophie

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

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: ub_ctx 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>ub_ctx Struct Reference</h1><!-- doxytag: class="ub_ctx" -->The context structure.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;context.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="0f85f8b291e3445b0932c036fd0fa63a"></a><!-- doxytag: member="ub_ctx::qqpipe_lock" ref="0f85f8b291e3445b0932c036fd0fa63a" args="" -->
lock_basic_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#0f85f8b291e3445b0932c036fd0fa63a">qqpipe_lock</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">mutex on query write pipe <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d7cf5c40c00086b278a0f573efd2244a"></a><!-- doxytag: member="ub_ctx::qq_pipe" ref="d7cf5c40c00086b278a0f573efd2244a" args="" -->
struct <a class="el" href="structtube.html">tube</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#d7cf5c40c00086b278a0f573efd2244a">qq_pipe</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the query write pipe <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f9242edb26ed5db04a71b9f6a77c4dfd"></a><!-- doxytag: member="ub_ctx::rrpipe_lock" ref="f9242edb26ed5db04a71b9f6a77c4dfd" args="" -->
lock_basic_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#f9242edb26ed5db04a71b9f6a77c4dfd">rrpipe_lock</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">mutex on result read pipe <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1d0a569718eb546213576fe499861780"></a><!-- doxytag: member="ub_ctx::rr_pipe" ref="1d0a569718eb546213576fe499861780" args="" -->
struct <a class="el" href="structtube.html">tube</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#1d0a569718eb546213576fe499861780">rr_pipe</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the result read pipe <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="817a754cb2c2b459d7e6b9651adb73fb"></a><!-- doxytag: member="ub_ctx::cfglock" ref="817a754cb2c2b459d7e6b9651adb73fb" args="" -->
lock_basic_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#817a754cb2c2b459d7e6b9651adb73fb">cfglock</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">mutex for access to env.cfg, finalized and dothread <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#a533b56dc1d5b509b927759ddaf511cd">finalized</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The context has been finalized This is after config when the first resolve is done.  <a href="#a533b56dc1d5b509b927759ddaf511cd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5161a0ccdcb80757ff5f1ab72090946a"></a><!-- doxytag: member="ub_ctx::created_bg" ref="5161a0ccdcb80757ff5f1ab72090946a" args="" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#5161a0ccdcb80757ff5f1ab72090946a">created_bg</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">is bg <a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> created yet ? <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8977970a97c0b648f6c863fc8487e23d"></a><!-- doxytag: member="ub_ctx::bg_pid" ref="8977970a97c0b648f6c863fc8487e23d" args="" -->
pid_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#8977970a97c0b648f6c863fc8487e23d">bg_pid</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">pid of bg <a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> process <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4ec5636e7bed73c0a53cb6125135d85e"></a><!-- doxytag: member="ub_ctx::bg_tid" ref="4ec5636e7bed73c0a53cb6125135d85e" args="" -->
ub_thread_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#4ec5636e7bed73c0a53cb6125135d85e">bg_tid</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">tid of bg <a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> thread <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d6905cfc5282f4069e651ad7020d997e"></a><!-- doxytag: member="ub_ctx::dothread" ref="d6905cfc5282f4069e651ad7020d997e" args="" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#d6905cfc5282f4069e651ad7020d997e">dothread</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">do threading (instead of forking) for async resolution <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f2e8d3ec9e081b38a48ef62c5e25f569"></a><!-- doxytag: member="ub_ctx::thr_next_num" ref="f2e8d3ec9e081b38a48ef62c5e25f569" args="" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#f2e8d3ec9e081b38a48ef62c5e25f569">thr_next_num</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">next thread number for new threads <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9111aa4fe07ff9615fa2eb301f8f076f"></a><!-- doxytag: member="ub_ctx::logfile_override" ref="9111aa4fe07ff9615fa2eb301f8f076f" args="" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#9111aa4fe07ff9615fa2eb301f8f076f">logfile_override</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">if logfile is overriden <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="98777316e8565cca6ac0bc514ae57fac"></a><!-- doxytag: member="ub_ctx::log_out" ref="98777316e8565cca6ac0bc514ae57fac" args="" -->
FILE *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#98777316e8565cca6ac0bc514ae57fac">log_out</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">what logfile to use instead <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structalloc__cache.html">alloc_cache</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#6ec64acb4ffb4c357bb0e4100a44d9e1">alloc_list</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">List of alloc-cache-id points per threadnum for notinuse threads.  <a href="#6ec64acb4ffb4c357bb0e4100a44d9e1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f8a2e7e04f07882ced3162ffdea02850"></a><!-- doxytag: member="ub_ctx::superalloc" ref="f8a2e7e04f07882ced3162ffdea02850" args="" -->
struct <a class="el" href="structalloc__cache.html">alloc_cache</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#f8a2e7e04f07882ced3162ffdea02850">superalloc</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">shared caches, and so on <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fee3cba0acc1d131a79d6955cdc76787"></a><!-- doxytag: member="ub_ctx::env" ref="fee3cba0acc1d131a79d6955cdc76787" args="" -->
struct <a class="el" href="structmodule__env.html">module_env</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#fee3cba0acc1d131a79d6955cdc76787">env</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">module env master value <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="45048e8ff7c0ce3f1700e5b5b035386d"></a><!-- doxytag: member="ub_ctx::mods" ref="45048e8ff7c0ce3f1700e5b5b035386d" args="" -->
struct <a class="el" href="structmodule__stack.html">module_stack</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#45048e8ff7c0ce3f1700e5b5b035386d">mods</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">module stack <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9db235e68fc2a635b96cbc3f2b4e4455"></a><!-- doxytag: member="ub_ctx::local_zones" ref="9db235e68fc2a635b96cbc3f2b4e4455" args="" -->
struct <a class="el" href="structlocal__zones.html">local_zones</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#9db235e68fc2a635b96cbc3f2b4e4455">local_zones</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">local authority zones <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ef4d67efb7fab671fe0e7bee0fc802c5"></a><!-- doxytag: member="ub_ctx::seed_rnd" ref="ef4d67efb7fab671fe0e7bee0fc802c5" args="" -->
struct <a class="el" href="structub__randstate.html">ub_randstate</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#ef4d67efb7fab671fe0e7bee0fc802c5">seed_rnd</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">random state used to seed new random state structures <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="df36cb9e75b10e47f237776a884a53ec"></a><!-- doxytag: member="ub_ctx::next_querynum" ref="df36cb9e75b10e47f237776a884a53ec" args="" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#df36cb9e75b10e47f237776a884a53ec">next_querynum</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">next query number (to try) to use <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f1be783ca4f4aab7daef41b804674685"></a><!-- doxytag: member="ub_ctx::num_async" ref="f1be783ca4f4aab7daef41b804674685" args="" -->
size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#f1be783ca4f4aab7daef41b804674685">num_async</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">number of async queries outstanding <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structrbtree__t.html">rbtree_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structub__ctx.html#52031f9951f96a0db417abc62ca45fcc">queries</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tree of outstanding queries.  <a href="#52031f9951f96a0db417abc62ca45fcc"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The context structure. 
<p>
Contains two pipes for async service qq : write queries to the async service pid/tid. rr : read results from the async service pid/tid. <hr><h2>Field Documentation</h2>
<a class="anchor" name="a533b56dc1d5b509b927759ddaf511cd"></a><!-- doxytag: member="ub_ctx::finalized" ref="a533b56dc1d5b509b927759ddaf511cd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="structub__ctx.html#a533b56dc1d5b509b927759ddaf511cd">ub_ctx::finalized</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The context has been finalized This is after config when the first resolve is done. 
<p>
The modules are inited (module-init()) and shared caches created. 
<p>Referenced by <a class="el" href="context_8c_source.html#l00054">context_finalize()</a>, <a class="el" href="libunbound_8c_source.html#l00258">ub_ctx_add_ta()</a>, <a class="el" href="libunbound_8c_source.html#l00277">ub_ctx_add_ta_file()</a>, <a class="el" href="libunbound_8c_source.html#l00335">ub_ctx_async()</a>, <a class="el" href="libunbound_8c_source.html#l00242">ub_ctx_config()</a>, <a class="el" href="libunbound_8c_source.html#l00911">ub_ctx_finalize()</a>, <a class="el" href="libunbound_8c_source.html#l00831">ub_ctx_hosts()</a>, <a class="el" href="libunbound_8c_source.html#l00712">ub_ctx_set_fwd()</a>, <a class="el" href="libunbound_8c_source.html#l00226">ub_ctx_set_option()</a>, <a class="el" href="libunbound_8c_source.html#l00296">ub_ctx_trustedkeys()</a>, <a class="el" href="libunbound_8c_source.html#l00528">ub_resolve()</a>, and <a class="el" href="libunbound_8c_source.html#l00572">ub_resolve_async()</a>.</p>

</div>
</div><p>
<a class="anchor" name="6ec64acb4ffb4c357bb0e4100a44d9e1"></a><!-- doxytag: member="ub_ctx::alloc_list" ref="6ec64acb4ffb4c357bb0e4100a44d9e1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structalloc__cache.html">alloc_cache</a>* <a class="el" href="structub__ctx.html#6ec64acb4ffb4c357bb0e4100a44d9e1">ub_ctx::alloc_list</a><code> [read]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
List of alloc-cache-id points per threadnum for notinuse threads. 
<p>
Simply the entire struct <a class="el" href="structalloc__cache.html" title="Structure that provides allocation.">alloc_cache</a> with the 'super' member used to link a simply linked list. Reset super member to the superalloc before use. 
<p>Referenced by <a class="el" href="context_8c_source.html#l00167">context_obtain_alloc()</a>, <a class="el" href="context_8c_source.html#l00193">context_release_alloc()</a>, and <a class="el" href="libunbound_8c_source.html#l00153">ub_ctx_delete()</a>.</p>

</div>
</div><p>
<a class="anchor" name="52031f9951f96a0db417abc62ca45fcc"></a><!-- doxytag: member="ub_ctx::queries" ref="52031f9951f96a0db417abc62ca45fcc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structrbtree__t.html">rbtree_t</a> <a class="el" href="structub__ctx.html#52031f9951f96a0db417abc62ca45fcc">ub_ctx::queries</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Tree of outstanding queries. 
<p>
Indexed by querynum Used when results come in for async to lookup. Used when cancel is done for lookup (and delete). Used to see if querynum is free for use. Content of type <a class="el" href="structctx__query.html" title="The queries outstanding for the libunbound resolver.">ctx_query</a>. 
<p>Referenced by <a class="el" href="libworker_8c_source.html#l00540">add_bg_result()</a>, <a class="el" href="context_8c_source.html#l00309">context_deserialize_answer()</a>, <a class="el" href="context_8c_source.html#l00348">context_deserialize_cancel()</a>, <a class="el" href="context_8c_source.html#l00232">context_deserialize_new_query()</a>, <a class="el" href="context_8c_source.html#l00265">context_lookup_new_query()</a>, <a class="el" href="context_8c_source.html#l00127">context_new()</a>, <a class="el" href="context_8c_source.html#l00113">find_id()</a>, <a class="el" href="libworker_8c_source.html#l00577">libworker_bg_done_cb()</a>, <a class="el" href="libunbound_8c_source.html#l00366">process_answer_detail()</a>, <a class="el" href="libunbound_8c_source.html#l00635">ub_cancel()</a>, <a class="el" href="libunbound_8c_source.html#l00064">ub_ctx_create()</a>, <a class="el" href="libunbound_8c_source.html#l00153">ub_ctx_delete()</a>, <a class="el" href="libunbound_8c_source.html#l00528">ub_resolve()</a>, and <a class="el" href="libunbound_8c_source.html#l00572">ub_resolve_async()</a>.</p>

</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>libunbound/<a class="el" href="context_8h.html">context.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>