Sophie

Sophie

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

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: util/tube.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_4b581c88b01efb1cf178857b56f0f2fb.html">util</a>
  </div>
</div>
<div class="contents">
<h1>tube.h File Reference</h1>This file contains pipe service functions.  
<a href="#_details">More...</a>
<p>
<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="structtube.html">tube</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A pipe.  <a href="structtube.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="structtube__res__list.html">tube_res_list</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">List of results (arbitrary command serializations) to write back.  <a href="structtube__res__list.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5be6f2edf660f981ad8ccab8d8dac2d3"></a><!-- doxytag: member="tube.h::tube_callback_t" ref="5be6f2edf660f981ad8ccab8d8dac2d3" args="(struct tube *, uint8_t *, size_t, int, void *)" -->
typedef void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="tube_8h.html#5be6f2edf660f981ad8ccab8d8dac2d3">tube_callback_t</a> (struct <a class="el" href="structtube.html">tube</a> *, uint8_t *, size_t, int, void *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback from pipe listen function void mycallback(tube, msg, len, error, user_argument); if error is true (NETEVENT_*), msg is probably NULL. <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="structtube.html">tube</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="tube_8h.html#c28499d47c089fd595d891255cfffab7">tube_create</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a pipe.  <a href="#c28499d47c089fd595d891255cfffab7"></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="tube_8h.html#37fc9cf7fa55312534556ac1ef201d92">tube_delete</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete and destroy a pipe.  <a href="#37fc9cf7fa55312534556ac1ef201d92"></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="tube_8h.html#1d73b42c4cc7b47a8b92ec4cb899cc82">tube_write_msg</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>, uint8_t *buf, uint32_t len, int nonblock)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write length bytes followed by message.  <a href="#1d73b42c4cc7b47a8b92ec4cb899cc82"></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="tube_8h.html#7e79fe41d9b3c22cc40f885e3ab47af5">tube_read_msg</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>, uint8_t **buf, uint32_t *len, int nonblock)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read length bytes followed by message.  <a href="#7e79fe41d9b3c22cc40f885e3ab47af5"></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="tube_8h.html#ec96389183aba6585c958350825d49d0">tube_close_read</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close read part of the pipe.  <a href="#ec96389183aba6585c958350825d49d0"></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="tube_8h.html#2ac2aed1aee2747c86d9909c7d2bba70">tube_close_write</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close write part of the pipe.  <a href="#2ac2aed1aee2747c86d9909c7d2bba70"></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="tube_8h.html#2e915bb2992c7f91119e0424982bbf2f">tube_poll</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">See if data is ready for reading on the <a class="el" href="structtube.html" title="A pipe.">tube</a> without blocking.  <a href="#2e915bb2992c7f91119e0424982bbf2f"></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="tube_8h.html#33a2f0bd02ba63c943e241aac05aecd3">tube_wait</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wait for data to be ready for reading on the <a class="el" href="structtube.html" title="A pipe.">tube</a>.  <a href="#33a2f0bd02ba63c943e241aac05aecd3"></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="tube_8h.html#f97d14fe35038a8759502d2bcff54eb8">tube_read_fd</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get FD that is readable when new information arrives.  <a href="#f97d14fe35038a8759502d2bcff54eb8"></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="tube_8h.html#936b75b11d40c05b7be7e108a752898b">tube_setup_bg_listen</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>, struct <a class="el" href="structcomm__base.html">comm_base</a> *base, <a class="el" href="tube_8h.html#5be6f2edf660f981ad8ccab8d8dac2d3">tube_callback_t</a> *cb, void *arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start listening for information over the pipe.  <a href="#936b75b11d40c05b7be7e108a752898b"></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="tube_8h.html#5c40de2e52c0b72cf1d2f5bbcb250c22">tube_remove_bg_listen</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove bg listen setup from event base.  <a href="#5c40de2e52c0b72cf1d2f5bbcb250c22"></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="tube_8h.html#560510c1b38ec55f6ff4292036e49f8d">tube_setup_bg_write</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>, struct <a class="el" href="structcomm__base.html">comm_base</a> *base)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start background write handler for the pipe.  <a href="#560510c1b38ec55f6ff4292036e49f8d"></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="tube_8h.html#d8c76a5ffa343b1a2ef939ef59f118c3">tube_remove_bg_write</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove bg write setup from event base.  <a href="#d8c76a5ffa343b1a2ef939ef59f118c3"></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="tube_8h.html#cdb1cb22aaaf0a2555326ff6e20063ad">tube_queue_item</a> (struct <a class="el" href="structtube.html">tube</a> *<a class="el" href="structtube.html">tube</a>, uint8_t *msg, size_t len)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Append data item to background list of writes.  <a href="#cdb1cb22aaaf0a2555326ff6e20063ad"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="caf68e26982a50d78909c7b2ac8732fe"></a><!-- doxytag: member="tube.h::tube_handle_listen" ref="caf68e26982a50d78909c7b2ac8732fe" args="(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="tube_8h.html#caf68e26982a50d78909c7b2ac8732fe">tube_handle_listen</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c, void *arg, int error, struct <a class="el" href="structcomm__reply.html">comm_reply</a> *<a class="el" href="structreply__info.html">reply_info</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">for fptr wlist, callback function <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67e4330a3fda2280611749c3c0dafba7"></a><!-- doxytag: member="tube.h::tube_handle_write" ref="67e4330a3fda2280611749c3c0dafba7" args="(struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="tube_8h.html#67e4330a3fda2280611749c3c0dafba7">tube_handle_write</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c, void *arg, int error, struct <a class="el" href="structcomm__reply.html">comm_reply</a> *<a class="el" href="structreply__info.html">reply_info</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">for fptr wlist, callback function <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="716a5e2a92b9c716622f31243c7765e5"></a><!-- doxytag: member="tube.h::tube_handle_signal" ref="716a5e2a92b9c716622f31243c7765e5" args="(int fd, short events, void *arg)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="tube_8h.html#716a5e2a92b9c716622f31243c7765e5">tube_handle_signal</a> (int fd, short events, void *arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">for fptr wlist, winsock signal event callback function <br></td></tr>
</table>
<hr><h2>Detailed Description</h2>
This file contains pipe service functions. 
<p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="c28499d47c089fd595d891255cfffab7"></a><!-- doxytag: member="tube.h::tube_create" ref="c28499d47c089fd595d891255cfffab7" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structtube.html">tube</a>* tube_create           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a pipe. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: new <a class="el" href="structtube.html" title="A pipe.">tube</a> struct or NULL on error. </dd></dl>

<p>References <a class="el" href="net__help_8c_source.html#l00083">fd_set_nonblock()</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="tube_8h_source.html#l00067">tube::sr</a>, <a class="el" href="tube_8h_source.html#l00069">tube::sw</a>, and <a class="el" href="tube_8c_source.html#l00082">tube_delete()</a>.</p>

<p>Referenced by <a class="el" href="libunbound_8c_source.html#l00064">ub_ctx_create()</a>, and <a class="el" href="worker_8c_source.html#l00944">worker_create()</a>.</p>

</div>
</div><p>
<a class="anchor" name="37fc9cf7fa55312534556ac1ef201d92"></a><!-- doxytag: member="tube.h::tube_delete" ref="37fc9cf7fa55312534556ac1ef201d92" args="(struct tube *tube)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tube_delete           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structtube.html">tube</a> *&nbsp;</td>
          <td class="paramname"> <em>tube</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete and destroy a pipe. 
<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><a class="el" href="structtube.html" title="A pipe.">tube</a>,:</em>&nbsp;</td><td>to delete </td></tr>
  </table>
</dl>

<p>References <a class="el" href="tube_8c_source.html#l00094">tube_close_read()</a>, <a class="el" href="tube_8c_source.html#l00102">tube_close_write()</a>, <a class="el" href="tube_8c_source.html#l00110">tube_remove_bg_listen()</a>, and <a class="el" href="tube_8c_source.html#l00122">tube_remove_bg_write()</a>.</p>

<p>Referenced by <a class="el" href="daemon_8c_source.html#l00312">close_other_pipes()</a>, <a class="el" href="tube_8c_source.html#l00051">tube_create()</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>, and <a class="el" href="worker_8c_source.html#l01115">worker_delete()</a>.</p>

</div>
</div><p>
<a class="anchor" name="1d73b42c4cc7b47a8b92ec4cb899cc82"></a><!-- doxytag: member="tube.h::tube_write_msg" ref="1d73b42c4cc7b47a8b92ec4cb899cc82" args="(struct tube *tube, uint8_t *buf, uint32_t len, int nonblock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tube_write_msg           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structtube.html">tube</a> *&nbsp;</td>
          <td class="paramname"> <em>tube</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_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>nonblock</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Write length bytes followed by message. 
<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><a class="el" href="structtube.html" title="A pipe.">tube</a>,:</em>&nbsp;</td><td>the <a class="el" href="structtube.html" title="A pipe.">tube</a> to write on. If that <a class="el" href="structtube.html" title="A pipe.">tube</a> is a pipe, its write fd is used as the socket to write on. Is nonblocking. Set to blocking by the function, and back to non-blocking at exit of function. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf,:</em>&nbsp;</td><td>the message. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len,:</em>&nbsp;</td><td>length of message. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nonblock,:</em>&nbsp;</td><td>if set to true, the first write is nonblocking. If the first write fails the function returns -1. If set false, the first write is blocking. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: all remainder writes are nonblocking. return 0 on error, in that case blocking/nonblocking of socket is unknown. return 1 if all OK. </dd></dl>

<p>References <a class="el" href="net__help_8c_source.html#l00107">fd_set_block()</a>, <a class="el" href="net__help_8c_source.html#l00083">fd_set_nonblock()</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, and <a class="el" href="tube_8h_source.html#l00069">tube::sw</a>.</p>

<p>Referenced by <a class="el" href="remote_8c_source.html#l01464">distribute_cmd()</a>, <a class="el" href="libworker_8c_source.html#l00257">libworker_dobg()</a>, <a class="el" href="stats_8c_source.html#l00176">server_stats_reply()</a>, <a class="el" href="libunbound_8c_source.html#l00635">ub_cancel()</a>, <a class="el" href="libunbound_8c_source.html#l00153">ub_ctx_delete()</a>, <a class="el" href="libunbound_8c_source.html#l00572">ub_resolve_async()</a>, and <a class="el" href="worker_8c_source.html#l00200">worker_send_cmd()</a>.</p>

</div>
</div><p>
<a class="anchor" name="7e79fe41d9b3c22cc40f885e3ab47af5"></a><!-- doxytag: member="tube.h::tube_read_msg" ref="7e79fe41d9b3c22cc40f885e3ab47af5" args="(struct tube *tube, uint8_t **buf, uint32_t *len, int nonblock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tube_read_msg           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structtube.html">tube</a> *&nbsp;</td>
          <td class="paramname"> <em>tube</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t **&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_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>nonblock</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read length bytes followed by message. 
<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><a class="el" href="structtube.html" title="A pipe.">tube</a>,:</em>&nbsp;</td><td>The <a class="el" href="structtube.html" title="A pipe.">tube</a> to read on. If that <a class="el" href="structtube.html" title="A pipe.">tube</a> is a pipe, its read fd is used as the socket to read on. Is nonblocking. Set to blocking by the function, and back to non-blocking at exit of function. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf,:</em>&nbsp;</td><td>the message, malloced. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len,:</em>&nbsp;</td><td>length of message, returned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nonblock,:</em>&nbsp;</td><td>if set to true, the first read is nonblocking. If the first read fails the function returns -1. If set false, the first read is blocking. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: all remainder reads are nonblocking. return 0 on error, in that case blocking/nonblocking of socket is unknown. On EOF 0 is returned. return 1 if all OK. </dd></dl>

<p>References <a class="el" href="net__help_8c_source.html#l00107">fd_set_block()</a>, <a class="el" href="net__help_8c_source.html#l00083">fd_set_nonblock()</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, and <a class="el" href="tube_8h_source.html#l00067">tube::sr</a>.</p>

<p>Referenced by <a class="el" href="remote_8c_source.html#l01561">daemon_remote_exec()</a>, <a class="el" href="stats_8c_source.html#l00151">server_stats_obtain()</a>, <a class="el" href="libunbound_8c_source.html#l00153">ub_ctx_delete()</a>, <a class="el" href="libunbound_8c_source.html#l00450">ub_process()</a>, and <a class="el" href="libunbound_8c_source.html#l00474">ub_wait()</a>.</p>

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

<p>
Close read part of the pipe. 
<p>
The <a class="el" href="structtube.html" title="A pipe.">tube</a> can no longer be read from. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="structtube.html" title="A pipe.">tube</a>,:</em>&nbsp;</td><td><a class="el" href="structtube.html" title="A pipe.">tube</a> to operate on. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="tube_8h_source.html#l00067">tube::sr</a>.</p>

<p>Referenced by <a class="el" href="daemon_8c_source.html#l00312">close_other_pipes()</a>, <a class="el" href="daemon_8c_source.html#l00356">daemon_start_others()</a>, <a class="el" href="libworker_8c_source.html#l00303">libworker_bg()</a>, <a class="el" href="libworker_8c_source.html#l00257">libworker_dobg()</a>, and <a class="el" href="tube_8c_source.html#l00082">tube_delete()</a>.</p>

</div>
</div><p>
<a class="anchor" name="2ac2aed1aee2747c86d9909c7d2bba70"></a><!-- doxytag: member="tube.h::tube_close_write" ref="2ac2aed1aee2747c86d9909c7d2bba70" args="(struct tube *tube)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tube_close_write           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structtube.html">tube</a> *&nbsp;</td>
          <td class="paramname"> <em>tube</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Close write part of the pipe. 
<p>
The <a class="el" href="structtube.html" title="A pipe.">tube</a> can no longer be written to. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="structtube.html" title="A pipe.">tube</a>,:</em>&nbsp;</td><td><a class="el" href="structtube.html" title="A pipe.">tube</a> to operate on. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="tube_8h_source.html#l00069">tube::sw</a>.</p>

<p>Referenced by <a class="el" href="libworker_8c_source.html#l00303">libworker_bg()</a>, <a class="el" href="libworker_8c_source.html#l00257">libworker_dobg()</a>, <a class="el" href="daemon_8c_source.html#l00334">thread_start()</a>, and <a class="el" href="tube_8c_source.html#l00082">tube_delete()</a>.</p>

</div>
</div><p>
<a class="anchor" name="2e915bb2992c7f91119e0424982bbf2f"></a><!-- doxytag: member="tube.h::tube_poll" ref="2e915bb2992c7f91119e0424982bbf2f" args="(struct tube *tube)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tube_poll           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structtube.html">tube</a> *&nbsp;</td>
          <td class="paramname"> <em>tube</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
See if data is ready for reading on the <a class="el" href="structtube.html" title="A pipe.">tube</a> without blocking. 
<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><a class="el" href="structtube.html" title="A pipe.">tube</a>,:</em>&nbsp;</td><td><a class="el" href="structtube.html" title="A pipe.">tube</a> to check for readable items </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if readable items are present. False if not (or error). true on pipe_closed. </dd></dl>

<p>References <a class="el" href="tube_8c_source.html#l00376">pollit()</a>, and <a class="el" href="tube_8h_source.html#l00067">tube::sr</a>.</p>

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

</div>
</div><p>
<a class="anchor" name="33a2f0bd02ba63c943e241aac05aecd3"></a><!-- doxytag: member="tube.h::tube_wait" ref="33a2f0bd02ba63c943e241aac05aecd3" args="(struct tube *tube)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tube_wait           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structtube.html">tube</a> *&nbsp;</td>
          <td class="paramname"> <em>tube</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Wait for data to be ready for reading on the <a class="el" href="structtube.html" title="A pipe.">tube</a>. 
<p>
is blocking. No timeout. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="structtube.html" title="A pipe.">tube</a>,:</em>&nbsp;</td><td>the <a class="el" href="structtube.html" title="A pipe.">tube</a> to wait on. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: if there was something to read (false on error). true on pipe_closed. </dd></dl>

<p>References <a class="el" href="tube_8c_source.html#l00376">pollit()</a>, and <a class="el" href="tube_8h_source.html#l00067">tube::sr</a>.</p>

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

</div>
</div><p>
<a class="anchor" name="f97d14fe35038a8759502d2bcff54eb8"></a><!-- doxytag: member="tube.h::tube_read_fd" ref="f97d14fe35038a8759502d2bcff54eb8" args="(struct tube *tube)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tube_read_fd           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structtube.html">tube</a> *&nbsp;</td>
          <td class="paramname"> <em>tube</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get FD that is readable when new information arrives. 
<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><a class="el" href="structtube.html" title="A pipe.">tube</a></em>&nbsp;</td><td></td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>file descriptor. </dd></dl>

<p>References <a class="el" href="tube_8h_source.html#l00067">tube::sr</a>.</p>

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

</div>
</div><p>
<a class="anchor" name="936b75b11d40c05b7be7e108a752898b"></a><!-- doxytag: member="tube.h::tube_setup_bg_listen" ref="936b75b11d40c05b7be7e108a752898b" args="(struct tube *tube, struct comm_base *base, tube_callback_t *cb, void *arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tube_setup_bg_listen           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structtube.html">tube</a> *&nbsp;</td>
          <td class="paramname"> <em>tube</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structcomm__base.html">comm_base</a> *&nbsp;</td>
          <td class="paramname"> <em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tube_8h.html#5be6f2edf660f981ad8ccab8d8dac2d3">tube_callback_t</a> *&nbsp;</td>
          <td class="paramname"> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>arg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Start listening for information over the pipe. 
<p>
Background registration of a read listener, callback when read completed. Do not mix with tube_read_msg style direct reads from the pipe. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="structtube.html" title="A pipe.">tube</a>,:</em>&nbsp;</td><td><a class="el" href="structtube.html" title="A pipe.">tube</a> to listen on </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>base,:</em>&nbsp;</td><td>what base to register event callback. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cb,:</em>&nbsp;</td><td>callback routine. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>arg,:</em>&nbsp;</td><td>user argument for callback routine. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if successful, false on error. </dd></dl>

<p>References <a class="el" href="fake__event_8c_source.html#l00992">comm_point_create_raw()</a>, <a class="el" href="tube_8h_source.html#l00076">tube::listen_arg</a>, <a class="el" href="tube_8h_source.html#l00074">tube::listen_cb</a>, <a class="el" href="tube_8h_source.html#l00072">tube::listen_com</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="tube_8h_source.html#l00067">tube::sr</a>, and <a class="el" href="tube_8c_source.html#l00142">tube_handle_listen()</a>.</p>

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

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

<p>
Remove bg listen setup from event base. 
<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><a class="el" href="structtube.html" title="A pipe.">tube</a>,:</em>&nbsp;</td><td>what <a class="el" href="structtube.html" title="A pipe.">tube</a> to cleanup </td></tr>
  </table>
</dl>

<p>References <a class="el" href="tube_8h_source.html#l00082">tube::cmd_msg</a>, <a class="el" href="fake__event_8c_source.html#l01013">comm_point_delete()</a>, and <a class="el" href="tube_8h_source.html#l00072">tube::listen_com</a>.</p>

<p>Referenced by <a class="el" href="libworker_8c_source.html#l00257">libworker_dobg()</a>, and <a class="el" href="tube_8c_source.html#l00082">tube_delete()</a>.</p>

</div>
</div><p>
<a class="anchor" name="560510c1b38ec55f6ff4292036e49f8d"></a><!-- doxytag: member="tube.h::tube_setup_bg_write" ref="560510c1b38ec55f6ff4292036e49f8d" args="(struct tube *tube, struct comm_base *base)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tube_setup_bg_write           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structtube.html">tube</a> *&nbsp;</td>
          <td class="paramname"> <em>tube</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structcomm__base.html">comm_base</a> *&nbsp;</td>
          <td class="paramname"> <em>base</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Start background write handler for the pipe. 
<p>
Do not mix with tube_write_msg style direct writes to the pipe. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="structtube.html" title="A pipe.">tube</a>,:</em>&nbsp;</td><td><a class="el" href="structtube.html" title="A pipe.">tube</a> to write on </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>base,:</em>&nbsp;</td><td>what base to register event handler on. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if successful, false on error. </dd></dl>

<p>References <a class="el" href="fake__event_8c_source.html#l00992">comm_point_create_raw()</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="tube_8h_source.html#l00085">tube::res_com</a>, <a class="el" href="tube_8h_source.html#l00069">tube::sw</a>, and <a class="el" href="tube_8c_source.html#l00218">tube_handle_write()</a>.</p>

<p>Referenced by <a class="el" href="libworker_8c_source.html#l00257">libworker_dobg()</a>.</p>

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

<p>
Remove bg write setup from event base. 
<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><a class="el" href="structtube.html" title="A pipe.">tube</a>,:</em>&nbsp;</td><td>what <a class="el" href="structtube.html" title="A pipe.">tube</a> to cleanup </td></tr>
  </table>
</dl>

<p>References <a class="el" href="tube_8h_source.html#l00120">tube_res_list::buf</a>, <a class="el" href="fake__event_8c_source.html#l01013">comm_point_delete()</a>, <a class="el" href="tube_8h_source.html#l00118">tube_res_list::next</a>, <a class="el" href="tube_8h_source.html#l00085">tube::res_com</a>, <a class="el" href="tube_8h_source.html#l00092">tube::res_last</a>, and <a class="el" href="tube_8h_source.html#l00090">tube::res_list</a>.</p>

<p>Referenced by <a class="el" href="libworker_8c_source.html#l00257">libworker_dobg()</a>, and <a class="el" href="tube_8c_source.html#l00082">tube_delete()</a>.</p>

</div>
</div><p>
<a class="anchor" name="cdb1cb22aaaf0a2555326ff6e20063ad"></a><!-- doxytag: member="tube.h::tube_queue_item" ref="cdb1cb22aaaf0a2555326ff6e20063ad" args="(struct tube *tube, uint8_t *msg, size_t len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tube_queue_item           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structtube.html">tube</a> *&nbsp;</td>
          <td class="paramname"> <em>tube</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&nbsp;</td>
          <td class="paramname"> <em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Append data item to background list of writes. 
<p>
Mallocs a list <a class="el" href="structentry.html" title="data structure to keep the canned queries in.">entry</a> behind the scenes. Not locked behind the scenes, call from one thread or lock on outside. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="structtube.html" title="A pipe.">tube</a>,:</em>&nbsp;</td><td>what <a class="el" href="structtube.html" title="A pipe.">tube</a> to queue on. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>msg,:</em>&nbsp;</td><td>memory message to send. Is free()d after use. Put at the end of the to-send queue. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len,:</em>&nbsp;</td><td>length of item. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on failure (msg freed). </dd></dl>

<p>References <a class="el" href="tube_8h_source.html#l00120">tube_res_list::buf</a>, <a class="el" href="fake__event_8c_source.html#l01001">comm_point_start_listening()</a>, <a class="el" href="tube_8h_source.html#l00122">tube_res_list::len</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="tube_8h_source.html#l00118">tube_res_list::next</a>, <a class="el" href="tube_8h_source.html#l00085">tube::res_com</a>, <a class="el" href="tube_8h_source.html#l00092">tube::res_last</a>, and <a class="el" href="tube_8h_source.html#l00090">tube::res_list</a>.</p>

<p>Referenced by <a class="el" href="libworker_8c_source.html#l00540">add_bg_result()</a>.</p>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Oct 13 06:46:33 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>