Sophie

Sophie

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

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/netevent.c 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>netevent.c File Reference</h1>This file contains event notification functions.  
<a href="#_details">More...</a>
<p>
<code>#include &quot;config.h&quot;</code><br>
<code>#include &quot;<a class="el" href="netevent_8h.html">util/netevent.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="log_8h.html">util/log.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="net__help_8h.html">util/net_help.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="fptr__wlist_8h.html">util/fptr_wlist.h</a>&quot;</code><br>
<code>#include &lt;event.h&gt;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structinternal__event.html">internal_event</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The internal event structure for keeping libevent info for the event.  <a href="structinternal__event.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="structinternal__base.html">internal_base</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal base structure, so that every thread has its own events.  <a href="structinternal__base.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="structinternal__timer.html">internal_timer</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal timer structure, to store timer event in.  <a href="structinternal__timer.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="structinternal__signal.html">internal_signal</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal signal structure, to store signal event in.  <a href="structinternal__signal.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f17806cb394f812a9c0f37acf2f20d5c"></a><!-- doxytag: member="netevent.c::TCP_QUERY_TIMEOUT" ref="f17806cb394f812a9c0f37acf2f20d5c" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#f17806cb394f812a9c0f37acf2f20d5c">TCP_QUERY_TIMEOUT</a>&nbsp;&nbsp;&nbsp;120</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The TCP reading or writing query timeout in seconds. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="159dcaa7b1b551df743f246297359a0b"></a><!-- doxytag: member="netevent.c::NUM_UDP_PER_SELECT" ref="159dcaa7b1b551df743f246297359a0b" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#159dcaa7b1b551df743f246297359a0b">NUM_UDP_PER_SELECT</a>&nbsp;&nbsp;&nbsp;100</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">number of UDP reads to perform per read indication from select <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3c9d186413ba630fbdcefc69a40849f6"></a><!-- doxytag: member="netevent.c::CMSG_LEN" ref="3c9d186413ba630fbdcefc69a40849f6" args="(x)" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#3c9d186413ba630fbdcefc69a40849f6">CMSG_LEN</a>(x)&nbsp;&nbsp;&nbsp;(sizeof(struct cmsghdr)+(x))</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">if no CMSG_LEN (Solaris 9) define something reasonable for one element <br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="76b81d94c9d253c77018efaecdab6228"></a><!-- doxytag: member="netevent.c::comm_point_create_tcp_handler" ref="76b81d94c9d253c77018efaecdab6228" args="(struct comm_base *base, struct comm_point *parent, size_t bufsize, comm_point_callback_t *callback, void *callback_arg)" -->
static struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#76b81d94c9d253c77018efaecdab6228">comm_point_create_tcp_handler</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *base, struct <a class="el" href="structcomm__point.html">comm_point</a> *parent, size_t bufsize, <a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *callback, void *callback_arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">create a tcp handler with a parent <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b0fb5dbdcbd795b939f2da21d775ee2d"></a><!-- doxytag: member="netevent.c::comm_base_now" ref="b0fb5dbdcbd795b939f2da21d775ee2d" args="(struct comm_base *b)" -->
static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#b0fb5dbdcbd795b939f2da21d775ee2d">comm_base_now</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">fillup the time values in the event base <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structcomm__base.html">comm_base</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#293475957bb92e98416ad675e490b8e2">comm_base_create</a> (int sigs)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new comm base.  <a href="#293475957bb92e98416ad675e490b8e2"></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="netevent_8c.html#246dfec6fa0a44e60c087add866d0734">comm_base_delete</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy a comm base.  <a href="#246dfec6fa0a44e60c087add866d0734"></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="netevent_8c.html#56be8a27caa68fa0e1bc960b6e194755">comm_base_timept</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *b, uint32_t **tt, struct timeval **tv)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Obtain two pointers.  <a href="#56be8a27caa68fa0e1bc960b6e194755"></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="netevent_8c.html#4a906aec807342d69d4a3701c668aca3">comm_base_dispatch</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dispatch the comm base events.  <a href="#4a906aec807342d69d4a3701c668aca3"></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="netevent_8c.html#6d683b040b8c52444881294ca9c19283">comm_base_exit</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Exit from dispatch loop.  <a href="#6d683b040b8c52444881294ca9c19283"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct event_base *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#6b0ffc9baa38f111fb074e8f0fd5df69">comm_base_internal</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Access internal data structure (for <a class="el" href="tube_8c.html" title="This file contains pipe service functions.">util/tube.c</a> on windows).  <a href="#6b0ffc9baa38f111fb074e8f0fd5df69"></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="netevent_8c.html#17cfdd2ad27590a02c128ee9ebc55e26">comm_point_send_udp_msg</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c, ldns_buffer *packet, struct sockaddr *addr, socklen_t addrlen)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send an udp message over a commpoint.  <a href="#17cfdd2ad27590a02c128ee9ebc55e26"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ef5ebe608f0846d6aa84d1e048fb088c"></a><!-- doxytag: member="netevent.c::p_ancil" ref="ef5ebe608f0846d6aa84d1e048fb088c" args="(const char *str, struct comm_reply *r)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#ef5ebe608f0846d6aa84d1e048fb088c">p_ancil</a> (const char *str, struct <a class="el" href="structcomm__reply.html">comm_reply</a> *r)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">print debug ancillary info <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e07eacd1417e1e723aaa6ef15c00c2e7"></a><!-- doxytag: member="netevent.c::comm_point_send_udp_msg_if" ref="e07eacd1417e1e723aaa6ef15c00c2e7" args="(struct comm_point *c, ldns_buffer *packet, struct sockaddr *addr, socklen_t addrlen, struct comm_reply *r)" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#e07eacd1417e1e723aaa6ef15c00c2e7">comm_point_send_udp_msg_if</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c, ldns_buffer *packet, struct sockaddr *addr, socklen_t addrlen, struct <a class="el" href="structcomm__reply.html">comm_reply</a> *r)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">send a UDP reply over specified interface <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#03da860ff7bf90dd3f5d7918bd63a6c9">comm_point_udp_ancil_callback</a> (int fd, short event, void *arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This routine is published for checks and tests, and is only used internally.  <a href="#03da860ff7bf90dd3f5d7918bd63a6c9"></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="netevent_8c.html#9a28a84c828591725627bd5275c724fd">comm_point_udp_callback</a> (int fd, short event, void *arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This routine is published for checks and tests, and is only used internally.  <a href="#9a28a84c828591725627bd5275c724fd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ef06d34b671472b53a81cbde3062f456"></a><!-- doxytag: member="netevent.c::setup_tcp_handler" ref="ef06d34b671472b53a81cbde3062f456" args="(struct comm_point *c, int fd)" -->
static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#ef06d34b671472b53a81cbde3062f456">setup_tcp_handler</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c, int fd)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Use a new tcp handler for new query fd, set to read query. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#9a04855bca30aeb14d60e7848de41d4f">comm_point_perform_accept</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c, struct sockaddr_storage *addr, socklen_t *addrlen)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">perform accept(2) with error checking.  <a href="#9a04855bca30aeb14d60e7848de41d4f"></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="netevent_8c.html#8071b50a655584e9ab583c1170df9169">comm_point_tcp_accept_callback</a> (int fd, short event, void *arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This routine is published for checks and tests, and is only used internally.  <a href="#8071b50a655584e9ab583c1170df9169"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5f692bc08d775ce5fd90c40947923eea"></a><!-- doxytag: member="netevent.c::reclaim_tcp_handler" ref="5f692bc08d775ce5fd90c40947923eea" args="(struct comm_point *c)" -->
static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#5f692bc08d775ce5fd90c40947923eea">reclaim_tcp_handler</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Make tcp handler free for next assignment. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c9879dcf31f7d18baa666e16efc306e4"></a><!-- doxytag: member="netevent.c::tcp_callback_writer" ref="c9879dcf31f7d18baa666e16efc306e4" args="(struct comm_point *c)" -->
static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#c9879dcf31f7d18baa666e16efc306e4">tcp_callback_writer</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">do the callback when writing is done <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d79cdbc5b7644ed9895cbbb3ece4ec26"></a><!-- doxytag: member="netevent.c::tcp_callback_reader" ref="d79cdbc5b7644ed9895cbbb3ece4ec26" args="(struct comm_point *c)" -->
static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#d79cdbc5b7644ed9895cbbb3ece4ec26">tcp_callback_reader</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">do the callback when reading is done <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#ee24180b90b55d5608db9099c215ea19">comm_point_tcp_handle_read</a> (int fd, struct <a class="el" href="structcomm__point.html">comm_point</a> *c, int short_ok)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Handle tcp reading callback.  <a href="#ee24180b90b55d5608db9099c215ea19"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#c726473b60b3308d7f888013436d334e">comm_point_tcp_handle_write</a> (int fd, struct <a class="el" href="structcomm__point.html">comm_point</a> *c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Handle tcp writing callback.  <a href="#c726473b60b3308d7f888013436d334e"></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="netevent_8c.html#33f013d617684b997476fe9bf8be231a">comm_point_tcp_handle_callback</a> (int fd, short event, void *arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This routine is published for checks and tests, and is only used internally.  <a href="#33f013d617684b997476fe9bf8be231a"></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="netevent_8c.html#c50a5301fce190e30d3293e764e470f3">comm_point_local_handle_callback</a> (int fd, short event, void *arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This routine is published for checks and tests, and is only used internally.  <a href="#c50a5301fce190e30d3293e764e470f3"></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="netevent_8c.html#efca81e9ffcf53591b7d9555c498d3dd">comm_point_raw_handle_callback</a> (int fd, short event, void *arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This routine is published for checks and tests, and is only used internally.  <a href="#efca81e9ffcf53591b7d9555c498d3dd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#d7a1e298dc95be914cab6e6a8bdaef51">comm_point_create_udp</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *base, int fd, ldns_buffer *buffer, <a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *callback, void *callback_arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an UDP comm point.  <a href="#d7a1e298dc95be914cab6e6a8bdaef51"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#30294d3080d0ac1acf33ceb80d6f44fe">comm_point_create_udp_ancil</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *base, int fd, ldns_buffer *buffer, <a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *callback, void *callback_arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an UDP with ancillary data comm point.  <a href="#30294d3080d0ac1acf33ceb80d6f44fe"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#c29c65a940ecee00cc239d74f7e94014">comm_point_create_tcp</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *base, int fd, int num, size_t bufsize, <a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *callback, void *callback_arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a TCP listener comm point.  <a href="#c29c65a940ecee00cc239d74f7e94014"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#20c4fac7d9882fd0d6a4655284674409">comm_point_create_tcp_out</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *base, size_t bufsize, <a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *callback, void *callback_arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an outgoing TCP commpoint.  <a href="#20c4fac7d9882fd0d6a4655284674409"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#bfd80dff2df0cb2ab35ec359ba1cad12">comm_point_create_local</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *base, int fd, size_t bufsize, <a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *callback, void *callback_arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create commpoint to listen to a local domain file descriptor.  <a href="#bfd80dff2df0cb2ab35ec359ba1cad12"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#793278e8c315ea3cc44ff12f18ac02fc">comm_point_create_raw</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *base, int fd, int writing, <a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *callback, void *callback_arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create commpoint to listen to a local domain pipe descriptor.  <a href="#793278e8c315ea3cc44ff12f18ac02fc"></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="netevent_8c.html#6eb4b8e228226cf7ab9359742f050d66">comm_point_close</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close a comm point fd.  <a href="#6eb4b8e228226cf7ab9359742f050d66"></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="netevent_8c.html#9cfab13f86b3f2f180ea6b66119b455d">comm_point_delete</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close and deallocate (free) the comm point.  <a href="#9cfab13f86b3f2f180ea6b66119b455d"></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="netevent_8c.html#848235a0ded0c17ce32d5bbfcb5f094d">comm_point_set_cb_arg</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c, void *arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reset the callback argument for a comm point.  <a href="#848235a0ded0c17ce32d5bbfcb5f094d"></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="netevent_8c.html#08297db7cb55faf7951477731ae17a92">comm_point_send_reply</a> (struct <a class="el" href="structcomm__reply.html">comm_reply</a> *repinfo)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send reply.  <a href="#08297db7cb55faf7951477731ae17a92"></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="netevent_8c.html#74cf8926a893e62b5e75ccc1c0f87147">comm_point_drop_reply</a> (struct <a class="el" href="structcomm__reply.html">comm_reply</a> *repinfo)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Drop reply.  <a href="#74cf8926a893e62b5e75ccc1c0f87147"></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="netevent_8c.html#44b1a87283127a1f6632ac8d45895920">comm_point_stop_listening</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop listening for input on the commpoint.  <a href="#44b1a87283127a1f6632ac8d45895920"></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="netevent_8c.html#f0b8caf76732fbeef49f6b4730387ab0">comm_point_start_listening</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c, int newfd, int sec)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start listening again for input on the comm point.  <a href="#f0b8caf76732fbeef49f6b4730387ab0"></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="netevent_8c.html#a03b8bdd6f1deb74751a23886fc05ac2">comm_point_listen_for_rw</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c, int rd, int wr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop listening and start listening again for reading or writing.  <a href="#a03b8bdd6f1deb74751a23886fc05ac2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#89e19915fd58de03f17d247440654ebe">comm_point_get_mem</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get size of memory used by comm point.  <a href="#89e19915fd58de03f17d247440654ebe"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structcomm__timer.html">comm_timer</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#1a5faccab873a9e377fb715cb00be916">comm_timer_create</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *base, void(*cb)(void *), void *cb_arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">create timer.  <a href="#1a5faccab873a9e377fb715cb00be916"></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="netevent_8c.html#cbfb9cf754701131fd122454a8bc999e">comm_timer_disable</a> (struct <a class="el" href="structcomm__timer.html">comm_timer</a> *timer)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">disable timer.  <a href="#cbfb9cf754701131fd122454a8bc999e"></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="netevent_8c.html#5ae99ac696c5300d19e0a7a2c04816ee">comm_timer_set</a> (struct <a class="el" href="structcomm__timer.html">comm_timer</a> *timer, struct timeval *tv)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">reset timevalue for timer.  <a href="#5ae99ac696c5300d19e0a7a2c04816ee"></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="netevent_8c.html#bb7d9fb9155c3508dce467b0b361194d">comm_timer_delete</a> (struct <a class="el" href="structcomm__timer.html">comm_timer</a> *timer)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">delete timer.  <a href="#bb7d9fb9155c3508dce467b0b361194d"></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="netevent_8c.html#a2ef06dfc6040dd3acca1eefa92cfc90">comm_timer_callback</a> (int fd, short event, void *arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This routine is published for checks and tests, and is only used internally.  <a href="#a2ef06dfc6040dd3acca1eefa92cfc90"></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="netevent_8c.html#7f41e0e0e5a9abd4ad9ddd28c7aaf053">comm_timer_is_set</a> (struct <a class="el" href="structcomm__timer.html">comm_timer</a> *timer)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">see if timeout has been set to a value.  <a href="#7f41e0e0e5a9abd4ad9ddd28c7aaf053"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#91f9c886f97be545cb20d5f75d47ca2e">comm_timer_get_mem</a> (struct <a class="el" href="structcomm__timer.html">comm_timer</a> *timer)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get size of memory used by comm timer.  <a href="#91f9c886f97be545cb20d5f75d47ca2e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structcomm__signal.html">comm_signal</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netevent_8c.html#c3ccdc4685ec7c16d71e281df794496c">comm_signal_create</a> (struct <a class="el" href="structcomm__base.html">comm_base</a> *base, void(*callback)(int, void *), void *cb_arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a signal handler.  <a href="#c3ccdc4685ec7c16d71e281df794496c"></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="netevent_8c.html#8149bd04578417ec0a3992aae52f3868">comm_signal_callback</a> (int sig, short event, void *arg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This routine is published for checks and tests, and is only used internally.  <a href="#8149bd04578417ec0a3992aae52f3868"></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="netevent_8c.html#79ef8b0d4fe81fa4193679a29b9d49f4">comm_signal_bind</a> (struct <a class="el" href="structcomm__signal.html">comm_signal</a> *comsig, int sig)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bind signal struct to catch a signal.  <a href="#79ef8b0d4fe81fa4193679a29b9d49f4"></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="netevent_8c.html#c496abe80a96c70f933d3b288f5035da">comm_signal_delete</a> (struct <a class="el" href="structcomm__signal.html">comm_signal</a> *comsig)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete the signal communication point.  <a href="#c496abe80a96c70f933d3b288f5035da"></a><br></td></tr>
</table>
<hr><h2>Detailed Description</h2>
This file contains event notification functions. 
<p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="293475957bb92e98416ad675e490b8e2"></a><!-- doxytag: member="netevent.c::comm_base_create" ref="293475957bb92e98416ad675e490b8e2" args="(int sigs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structcomm__base.html">comm_base</a>* comm_base_create           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>sigs</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a new comm 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>sigs,:</em>&nbsp;</td><td>if true it attempts to create a default loop for signal handling. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: the new comm base. NULL on error. </dd></dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="netevent_8c_source.html#l00129">comm_base_now()</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="netevent_8c_source.html#l00091">internal_base::now</a>, <a class="el" href="replay_8h_source.html#l00210">replay_runtime::scenario</a>, <a class="el" href="netevent_8c_source.html#l00089">internal_base::secs</a>, <a class="el" href="log_8h_source.html#l00058">VERB_ALGO</a>, and <a class="el" href="ldns-testpkts_8c.html#a557e5b23b2833d7c1ec0415a1bdd2b1">verbose()</a>.</p>

</div>
</div><p>
<a class="anchor" name="246dfec6fa0a44e60c087add866d0734"></a><!-- doxytag: member="netevent.c::comm_base_delete" ref="246dfec6fa0a44e60c087add866d0734" args="(struct comm_base *b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_base_delete           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__base.html">comm_base</a> *&nbsp;</td>
          <td class="paramname"> <em>b</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destroy a comm base. 
<p>
All comm points must have been deleted. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>b,:</em>&nbsp;</td><td>the base to delete. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="replay_8h_source.html#l00225">replay_runtime::answer_list</a>, <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="fake__event_8c_source.html#l00126">delete_fake_pending()</a>, <a class="el" href="fake__event_8c_source.html#l00137">delete_replay_answer()</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="replay_8h_source.html#l00285">replay_answer::next</a>, <a class="el" href="replay_8h_source.html#l00269">fake_pending::next</a>, <a class="el" href="replay_8h_source.html#l00220">replay_runtime::pending_list</a>, and <a class="el" href="replay_8h_source.html#l00210">replay_runtime::scenario</a>.</p>

</div>
</div><p>
<a class="anchor" name="56be8a27caa68fa0e1bc960b6e194755"></a><!-- doxytag: member="netevent.c::comm_base_timept" ref="56be8a27caa68fa0e1bc960b6e194755" args="(struct comm_base *b, uint32_t **tt, struct timeval **tv)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_base_timept           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__base.html">comm_base</a> *&nbsp;</td>
          <td class="paramname"> <em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t **&nbsp;</td>
          <td class="paramname"> <em>tt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct timeval **&nbsp;</td>
          <td class="paramname"> <em>tv</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Obtain two pointers. 
<p>
The pointers never change (until base_delete()). The pointers point to time values that are updated regularly. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>b,:</em>&nbsp;</td><td>the communication base that will update the time values. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>tt,:</em>&nbsp;</td><td>pointer to time in seconds is returned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>tv,:</em>&nbsp;</td><td>pointer to time in microseconds is returned. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="netevent_8c_source.html#l00091">internal_base::now</a>, <a class="el" href="replay_8h_source.html#l00236">replay_runtime::now_secs</a>, <a class="el" href="replay_8h_source.html#l00238">replay_runtime::now_tv</a>, and <a class="el" href="netevent_8c_source.html#l00089">internal_base::secs</a>.</p>

</div>
</div><p>
<a class="anchor" name="4a906aec807342d69d4a3701c668aca3"></a><!-- doxytag: member="netevent.c::comm_base_dispatch" ref="4a906aec807342d69d4a3701c668aca3" args="(struct comm_base *b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_base_dispatch           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__base.html">comm_base</a> *&nbsp;</td>
          <td class="paramname"> <em>b</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Dispatch the comm base events. 
<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>b,:</em>&nbsp;</td><td>the communication to perform. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="log_8c_source.html#l00267">fatal_exit()</a>, <a class="el" href="fake__event_8c_source.html#l00515">run_scenario()</a>, <a class="el" href="structreplay__runtime.html#19c84c5fa28c12405aa8313c3c994fb1">replay_runtime::sig_cb</a>, and <a class="el" href="replay_8h_source.html#l00243">replay_runtime::sig_cb_arg</a>.</p>

</div>
</div><p>
<a class="anchor" name="6d683b040b8c52444881294ca9c19283"></a><!-- doxytag: member="netevent.c::comm_base_exit" ref="6d683b040b8c52444881294ca9c19283" args="(struct comm_base *b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_base_exit           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__base.html">comm_base</a> *&nbsp;</td>
          <td class="paramname"> <em>b</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Exit from dispatch loop. 
<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>b,:</em>&nbsp;</td><td>the communication base that is in dispatch(). </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="replay_8h_source.html#l00245">replay_runtime::exit_cleanly</a>, <a class="el" href="log_8c_source.html#l00267">fatal_exit()</a>, and <a class="el" href="log_8c_source.html#l00241">log_err()</a>.</p>

</div>
</div><p>
<a class="anchor" name="6b0ffc9baa38f111fb074e8f0fd5df69"></a><!-- doxytag: member="netevent.c::comm_base_internal" ref="6b0ffc9baa38f111fb074e8f0fd5df69" args="(struct comm_base *b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct event_base* comm_base_internal           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__base.html">comm_base</a> *&nbsp;</td>
          <td class="paramname"> <em>b</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Access internal data structure (for <a class="el" href="tube_8c.html" title="This file contains pipe service functions.">util/tube.c</a> on windows). 
<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>b,:</em>&nbsp;</td><td>comm base </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>event_base. Could be libevent, or internal event handler. </dd></dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, and <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>.</p>

</div>
</div><p>
<a class="anchor" name="17cfdd2ad27590a02c128ee9ebc55e26"></a><!-- doxytag: member="netevent.c::comm_point_send_udp_msg" ref="17cfdd2ad27590a02c128ee9ebc55e26" args="(struct comm_point *c, ldns_buffer *packet, struct sockaddr *addr, socklen_t addrlen)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int comm_point_send_udp_msg           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ldns_buffer *&nbsp;</td>
          <td class="paramname"> <em>packet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct sockaddr *&nbsp;</td>
          <td class="paramname"> <em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">socklen_t&nbsp;</td>
          <td class="paramname"> <em>addrlen</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Send an udp message over a commpoint. 
<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>c,:</em>&nbsp;</td><td>commpoint to send it from. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>packet,:</em>&nbsp;</td><td>what to send. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>addr,:</em>&nbsp;</td><td>where to send it to. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>addrlen,:</em>&nbsp;</td><td>length of addr. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: false on a failure. </dd></dl>

<p>References <a class="el" href="net__help_8c_source.html#l00479">addr_is_ip4mapped()</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="net__help_8c_source.html#l00150">log_addr()</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="log_8h_source.html#l00058">VERB_ALGO</a>, <a class="el" href="log_8h_source.html#l00054">VERB_DETAIL</a>, <a class="el" href="log_8h_source.html#l00052">VERB_OPS</a>, <a class="el" href="ldns-testpkts_8c.html#a557e5b23b2833d7c1ec0415a1bdd2b1">verbose()</a>, and <a class="el" href="log_8c_source.html#l00062">verbosity</a>.</p>

<p>Referenced by <a class="el" href="netevent_8c_source.html#l01453">comm_point_send_reply()</a>, <a class="el" href="netevent_8c_source.html#l00532">comm_point_udp_callback()</a>, and <a class="el" href="outside__network_8c_source.html#l00864">randomize_and_send_udp()</a>.</p>

</div>
</div><p>
<a class="anchor" name="03da860ff7bf90dd3f5d7918bd63a6c9"></a><!-- doxytag: member="netevent.c::comm_point_udp_ancil_callback" ref="03da860ff7bf90dd3f5d7918bd63a6c9" args="(int fd, short event, void *arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_udp_ancil_callback           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short&nbsp;</td>
          <td class="paramname"> <em>event</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>
This routine is published for checks and tests, and is only used internally. 
<p>
handle libevent callback for udp ancillary data comm point. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fd,:</em>&nbsp;</td><td>file descriptor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>event,:</em>&nbsp;</td><td>event bits from libevent: EV_READ, EV_WRITE, EV_SIGNAL, EV_TIMEOUT. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>arg,:</em>&nbsp;</td><td>the <a class="el" href="structcomm__point.html" title="Communication point to the network These behaviours can be accomplished by setting...">comm_point</a> structure. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8h_source.html#l00100">comm_reply::addr</a>, <a class="el" href="netevent_8h_source.html#l00102">comm_reply::addrlen</a>, <a class="el" href="netevent_8c_source.html#l00077">internal_event::base</a>, <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8h_source.html#l00098">comm_reply::c</a>, <a class="el" href="netevent_8h_source.html#l00224">comm_point::callback</a>, <a class="el" href="netevent_8h_source.html#l00226">comm_point::cb_arg</a>, <a class="el" href="netevent_8c_source.html#l00129">comm_base_now()</a>, <a class="el" href="netevent_8c_source.html#l00351">comm_point_send_udp_msg_if()</a>, <a class="el" href="netevent_8h_source.html#l00165">comm_point::comm_udp</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="log_8c_source.html#l00267">fatal_exit()</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="fptr__wlist_8h_source.html#l00067">fptr_ok</a>, <a class="el" href="fptr__wlist_8c_source.html#l00081">fptr_whitelist_comm_point()</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00077">NETEVENT_NOERROR</a>, <a class="el" href="netevent_8c_source.html#l00053">NUM_UDP_PER_SELECT</a>, <a class="el" href="netevent_8c_source.html#l00303">p_ancil()</a>, <a class="el" href="structcomm__reply.html#98165cfe3032a57007bda04b1cc659b2">comm_reply::pktinfo</a>, <a class="el" href="netevent_8h_source.html#l00104">comm_reply::srctype</a>, <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>, <a class="el" href="log_8h_source.html#l00058">VERB_ALGO</a>, and <a class="el" href="log_8c_source.html#l00062">verbosity</a>.</p>

</div>
</div><p>
<a class="anchor" name="9a28a84c828591725627bd5275c724fd"></a><!-- doxytag: member="netevent.c::comm_point_udp_callback" ref="9a28a84c828591725627bd5275c724fd" args="(int fd, short event, void *arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_udp_callback           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short&nbsp;</td>
          <td class="paramname"> <em>event</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>
This routine is published for checks and tests, and is only used internally. 
<p>
handle libevent callback for udp comm point. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fd,:</em>&nbsp;</td><td>file descriptor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>event,:</em>&nbsp;</td><td>event bits from libevent: EV_READ, EV_WRITE, EV_SIGNAL, EV_TIMEOUT. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>arg,:</em>&nbsp;</td><td>the <a class="el" href="structcomm__point.html" title="Communication point to the network These behaviours can be accomplished by setting...">comm_point</a> structure. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8h_source.html#l00100">comm_reply::addr</a>, <a class="el" href="netevent_8h_source.html#l00102">comm_reply::addrlen</a>, <a class="el" href="netevent_8c_source.html#l00077">internal_event::base</a>, <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8h_source.html#l00098">comm_reply::c</a>, <a class="el" href="netevent_8h_source.html#l00224">comm_point::callback</a>, <a class="el" href="netevent_8h_source.html#l00226">comm_point::cb_arg</a>, <a class="el" href="netevent_8c_source.html#l00129">comm_base_now()</a>, <a class="el" href="netevent_8c_source.html#l00239">comm_point_send_udp_msg()</a>, <a class="el" href="netevent_8h_source.html#l00165">comm_point::comm_udp</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="fptr__wlist_8h_source.html#l00067">fptr_ok</a>, <a class="el" href="fptr__wlist_8c_source.html#l00081">fptr_whitelist_comm_point()</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00077">NETEVENT_NOERROR</a>, <a class="el" href="netevent_8c_source.html#l00053">NUM_UDP_PER_SELECT</a>, <a class="el" href="netevent_8h_source.html#l00104">comm_reply::srctype</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

</div>
</div><p>
<a class="anchor" name="9a04855bca30aeb14d60e7848de41d4f"></a><!-- doxytag: member="netevent.c::comm_point_perform_accept" ref="9a04855bca30aeb14d60e7848de41d4f" args="(struct comm_point *c, struct sockaddr_storage *addr, socklen_t *addrlen)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int comm_point_perform_accept           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct sockaddr_storage *&nbsp;</td>
          <td class="paramname"> <em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">socklen_t *&nbsp;</td>
          <td class="paramname"> <em>addrlen</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
perform accept(2) with error checking. 
<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>c,:</em>&nbsp;</td><td>commpoint with accept fd. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>addr,:</em>&nbsp;</td><td>remote end returned here. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>addrlen,:</em>&nbsp;</td><td>length of remote end returned here. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>new fd, or -1 on error. if -1, error message has been printed if necessary, simply drop out of the reading handler. </dd></dl>

<p>References <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="net__help_8c_source.html#l00083">fd_set_nonblock()</a>, <a class="el" href="net__help_8c_source.html#l00150">log_addr()</a>, and <a class="el" href="log_8c_source.html#l00241">log_err()</a>.</p>

<p>Referenced by <a class="el" href="netevent_8c_source.html#l00634">comm_point_tcp_accept_callback()</a>, and <a class="el" href="remote_8c_source.html#l00372">remote_accept_callback()</a>.</p>

</div>
</div><p>
<a class="anchor" name="8071b50a655584e9ab583c1170df9169"></a><!-- doxytag: member="netevent.c::comm_point_tcp_accept_callback" ref="8071b50a655584e9ab583c1170df9169" args="(int fd, short event, void *arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_tcp_accept_callback           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short&nbsp;</td>
          <td class="paramname"> <em>event</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>
This routine is published for checks and tests, and is only used internally. 
<p>
handle libevent callback for tcp accept comm point <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fd,:</em>&nbsp;</td><td>file descriptor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>event,:</em>&nbsp;</td><td>event bits from libevent: EV_READ, EV_WRITE, EV_SIGNAL, EV_TIMEOUT. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>arg,:</em>&nbsp;</td><td>the <a class="el" href="structcomm__point.html" title="Communication point to the network These behaviours can be accomplished by setting...">comm_point</a> structure. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8h_source.html#l00100">comm_reply::addr</a>, <a class="el" href="netevent_8c_source.html#l00077">internal_event::base</a>, <a class="el" href="netevent_8c_source.html#l00129">comm_base_now()</a>, <a class="el" href="netevent_8c_source.html#l00594">comm_point_perform_accept()</a>, <a class="el" href="fake__event_8c_source.html#l01007">comm_point_stop_listening()</a>, <a class="el" href="netevent_8h_source.html#l00167">comm_point::comm_tcp_accept</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="log_8c_source.html#l00228">log_info()</a>, <a class="el" href="log_8c_source.html#l00254">log_warn()</a>, <a class="el" href="netevent_8h_source.html#l00150">comm_point::repinfo</a>, <a class="el" href="netevent_8c_source.html#l00584">setup_tcp_handler()</a>, <a class="el" href="netevent_8h_source.html#l00160">comm_point::tcp_free</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

</div>
</div><p>
<a class="anchor" name="ee24180b90b55d5608db9099c215ea19"></a><!-- doxytag: member="netevent.c::comm_point_tcp_handle_read" ref="ee24180b90b55d5608db9099c215ea19" args="(int fd, struct comm_point *c, int short_ok)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int comm_point_tcp_handle_read           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>short_ok</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Handle tcp reading callback. 
<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>fd,:</em>&nbsp;</td><td>file descriptor of socket. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c,:</em>&nbsp;</td><td>comm point to read from into buffer. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>short_ok,:</em>&nbsp;</td><td>if true, very short packets are OK (for comm_local). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: 0 on error </dd></dl>

<p>References <a class="el" href="netevent_8h_source.html#l00100">comm_reply::addr</a>, <a class="el" href="netevent_8h_source.html#l00102">comm_reply::addrlen</a>, <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8h_source.html#l00171">comm_point::comm_local</a>, <a class="el" href="netevent_8h_source.html#l00169">comm_point::comm_tcp</a>, <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="net__help_8c_source.html#l00150">log_addr()</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00150">comm_point::repinfo</a>, <a class="el" href="netevent_8h_source.html#l00146">comm_point::tcp_byte_count</a>, <a class="el" href="netevent_8c_source.html#l00699">tcp_callback_reader()</a>, <a class="el" href="netevent_8h_source.html#l00144">comm_point::tcp_is_reading</a>, <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>, <a class="el" href="log_8h_source.html#l00058">VERB_ALGO</a>, <a class="el" href="log_8h_source.html#l00056">VERB_QUERY</a>, <a class="el" href="ldns-testpkts_8c.html#a557e5b23b2833d7c1ec0415a1bdd2b1">verbose()</a>, and <a class="el" href="log_8c_source.html#l00062">verbosity</a>.</p>

<p>Referenced by <a class="el" href="netevent_8c_source.html#l00996">comm_point_local_handle_callback()</a>, and <a class="el" href="netevent_8c_source.html#l00953">comm_point_tcp_handle_callback()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c726473b60b3308d7f888013436d334e"></a><!-- doxytag: member="netevent.c::comm_point_tcp_handle_write" ref="c726473b60b3308d7f888013436d334e" args="(int fd, struct comm_point *c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int comm_point_tcp_handle_write           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Handle tcp writing callback. 
<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>fd,:</em>&nbsp;</td><td>file descriptor of socket. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c,:</em>&nbsp;</td><td>comm point to write buffer out of. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: 0 on error </dd></dl>

<p>References <a class="el" href="netevent_8h_source.html#l00100">comm_reply::addr</a>, <a class="el" href="netevent_8h_source.html#l00102">comm_reply::addrlen</a>, <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8h_source.html#l00169">comm_point::comm_tcp</a>, <a class="el" href="ldns-testpkts_8c_source.html#l00038">error()</a>, <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="net__help_8c_source.html#l00150">log_addr()</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00150">comm_point::repinfo</a>, <a class="el" href="netevent_8h_source.html#l00146">comm_point::tcp_byte_count</a>, <a class="el" href="netevent_8c_source.html#l00685">tcp_callback_writer()</a>, <a class="el" href="netevent_8h_source.html#l00194">comm_point::tcp_check_nb_connect</a>, <a class="el" href="netevent_8h_source.html#l00144">comm_point::tcp_is_reading</a>, <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>, and <a class="el" href="log_8c_source.html#l00062">verbosity</a>.</p>

<p>Referenced by <a class="el" href="netevent_8c_source.html#l00953">comm_point_tcp_handle_callback()</a>.</p>

</div>
</div><p>
<a class="anchor" name="33f013d617684b997476fe9bf8be231a"></a><!-- doxytag: member="netevent.c::comm_point_tcp_handle_callback" ref="33f013d617684b997476fe9bf8be231a" args="(int fd, short event, void *arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_tcp_handle_callback           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short&nbsp;</td>
          <td class="paramname"> <em>event</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>
This routine is published for checks and tests, and is only used internally. 
<p>
handle libevent callback for tcp data comm point <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fd,:</em>&nbsp;</td><td>file descriptor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>event,:</em>&nbsp;</td><td>event bits from libevent: EV_READ, EV_WRITE, EV_SIGNAL, EV_TIMEOUT. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>arg,:</em>&nbsp;</td><td>the <a class="el" href="structcomm__point.html" title="Communication point to the network These behaviours can be accomplished by setting...">comm_point</a> structure. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8c_source.html#l00077">internal_event::base</a>, <a class="el" href="netevent_8h_source.html#l00224">comm_point::callback</a>, <a class="el" href="netevent_8h_source.html#l00226">comm_point::cb_arg</a>, <a class="el" href="netevent_8c_source.html#l00129">comm_base_now()</a>, <a class="el" href="netevent_8c_source.html#l00721">comm_point_tcp_handle_read()</a>, <a class="el" href="netevent_8c_source.html#l00819">comm_point_tcp_handle_write()</a>, <a class="el" href="netevent_8h_source.html#l00169">comm_point::comm_tcp</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="fptr__wlist_8h_source.html#l00067">fptr_ok</a>, <a class="el" href="fptr__wlist_8c_source.html#l00081">fptr_whitelist_comm_point()</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00079">NETEVENT_CLOSED</a>, <a class="el" href="netevent_8h_source.html#l00081">NETEVENT_TIMEOUT</a>, <a class="el" href="netevent_8c_source.html#l00669">reclaim_tcp_handler()</a>, <a class="el" href="netevent_8h_source.html#l00184">comm_point::tcp_do_close</a>, <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>, <a class="el" href="log_8h_source.html#l00056">VERB_QUERY</a>, and <a class="el" href="ldns-testpkts_8c.html#a557e5b23b2833d7c1ec0415a1bdd2b1">verbose()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c50a5301fce190e30d3293e764e470f3"></a><!-- doxytag: member="netevent.c::comm_point_local_handle_callback" ref="c50a5301fce190e30d3293e764e470f3" args="(int fd, short event, void *arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_local_handle_callback           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short&nbsp;</td>
          <td class="paramname"> <em>event</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>
This routine is published for checks and tests, and is only used internally. 
<p>
libevent callback for AF_UNIX fds <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fd,:</em>&nbsp;</td><td>file descriptor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>event,:</em>&nbsp;</td><td>event bits from libevent: EV_READ, EV_WRITE, EV_SIGNAL, EV_TIMEOUT. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>arg,:</em>&nbsp;</td><td>the <a class="el" href="structcomm__point.html" title="Communication point to the network These behaviours can be accomplished by setting...">comm_point</a> structure. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8c_source.html#l00077">internal_event::base</a>, <a class="el" href="netevent_8h_source.html#l00224">comm_point::callback</a>, <a class="el" href="netevent_8h_source.html#l00226">comm_point::cb_arg</a>, <a class="el" href="netevent_8c_source.html#l00129">comm_base_now()</a>, <a class="el" href="netevent_8h_source.html#l00171">comm_point::comm_local</a>, <a class="el" href="netevent_8c_source.html#l00721">comm_point_tcp_handle_read()</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="fptr__wlist_8h_source.html#l00067">fptr_ok</a>, <a class="el" href="fptr__wlist_8c_source.html#l00081">fptr_whitelist_comm_point()</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00079">NETEVENT_CLOSED</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

</div>
</div><p>
<a class="anchor" name="efca81e9ffcf53591b7d9555c498d3dd"></a><!-- doxytag: member="netevent.c::comm_point_raw_handle_callback" ref="efca81e9ffcf53591b7d9555c498d3dd" args="(int fd, short event, void *arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_raw_handle_callback           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short&nbsp;</td>
          <td class="paramname"> <em>event</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>
This routine is published for checks and tests, and is only used internally. 
<p>
libevent callback for raw fd access. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fd,:</em>&nbsp;</td><td>file descriptor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>event,:</em>&nbsp;</td><td>event bits from libevent: EV_READ, EV_WRITE, EV_SIGNAL, EV_TIMEOUT. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>arg,:</em>&nbsp;</td><td>the <a class="el" href="structcomm__point.html" title="Communication point to the network These behaviours can be accomplished by setting...">comm_point</a> structure. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8c_source.html#l00077">internal_event::base</a>, <a class="el" href="netevent_8h_source.html#l00224">comm_point::callback</a>, <a class="el" href="netevent_8h_source.html#l00226">comm_point::cb_arg</a>, <a class="el" href="netevent_8c_source.html#l00129">comm_base_now()</a>, <a class="el" href="netevent_8h_source.html#l00173">comm_point::comm_raw</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="fptr__wlist_8h_source.html#l00067">fptr_ok</a>, <a class="el" href="fptr__wlist_8c_source.html#l00091">fptr_whitelist_comm_point_raw()</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="netevent_8h_source.html#l00077">NETEVENT_NOERROR</a>, <a class="el" href="netevent_8h_source.html#l00081">NETEVENT_TIMEOUT</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

</div>
</div><p>
<a class="anchor" name="d7a1e298dc95be914cab6e6a8bdaef51"></a><!-- doxytag: member="netevent.c::comm_point_create_udp" ref="d7a1e298dc95be914cab6e6a8bdaef51" args="(struct comm_base *base, int fd, ldns_buffer *buffer, comm_point_callback_t *callback, void *callback_arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structcomm__point.html">comm_point</a>* comm_point_create_udp           </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">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ldns_buffer *&nbsp;</td>
          <td class="paramname"> <em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *&nbsp;</td>
          <td class="paramname"> <em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>callback_arg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create an UDP comm point. 
<p>
Calls malloc. setups the structure with the parameters you provide. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>base,:</em>&nbsp;</td><td>in which base to alloc the commpoint. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fd</em>&nbsp;</td><td>: file descriptor of open UDP socket. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buffer,:</em>&nbsp;</td><td>shared buffer by UDP sockets from this thread. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback,:</em>&nbsp;</td><td>callback function pointer. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback_arg,:</em>&nbsp;</td><td>will be passed to your callback function. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: returns the allocated communication point. NULL on error. Sets timeout to NULL. Turns off TCP options. </dd></dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="netevent_8c_source.html#l00077">internal_event::base</a>, <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8h_source.html#l00224">comm_point::callback</a>, <a class="el" href="netevent_8h_source.html#l00226">comm_point::cb_arg</a>, <a class="el" href="fake__event_8c_source.html#l01013">comm_point_delete()</a>, <a class="el" href="fake__event_8c_source.html#l01065">comm_point_udp_callback()</a>, <a class="el" href="netevent_8h_source.html#l00180">comm_point::do_not_close</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="netevent_8h_source.html#l00198">comm_point::inuse</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00154">comm_point::max_tcp_count</a>, <a class="el" href="netevent_8h_source.html#l00146">comm_point::tcp_byte_count</a>, <a class="el" href="netevent_8h_source.html#l00194">comm_point::tcp_check_nb_connect</a>, <a class="el" href="netevent_8h_source.html#l00184">comm_point::tcp_do_close</a>, <a class="el" href="netevent_8h_source.html#l00191">comm_point::tcp_do_toggle_rw</a>, <a class="el" href="netevent_8h_source.html#l00160">comm_point::tcp_free</a>, <a class="el" href="netevent_8h_source.html#l00157">comm_point::tcp_handlers</a>, <a class="el" href="netevent_8h_source.html#l00144">comm_point::tcp_is_reading</a>, <a class="el" href="netevent_8h_source.html#l00148">comm_point::tcp_parent</a>, <a class="el" href="netevent_8h_source.html#l00137">comm_point::timeout</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

<p>Referenced by <a class="el" href="listen__dnsport_8c_source.html#l00534">listen_create()</a>, and <a class="el" href="outside__network_8c_source.html#l00468">outside_network_create()</a>.</p>

</div>
</div><p>
<a class="anchor" name="30294d3080d0ac1acf33ceb80d6f44fe"></a><!-- doxytag: member="netevent.c::comm_point_create_udp_ancil" ref="30294d3080d0ac1acf33ceb80d6f44fe" args="(struct comm_base *base, int fd, ldns_buffer *buffer, comm_point_callback_t *callback, void *callback_arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structcomm__point.html">comm_point</a>* comm_point_create_udp_ancil           </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">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ldns_buffer *&nbsp;</td>
          <td class="paramname"> <em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *&nbsp;</td>
          <td class="paramname"> <em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>callback_arg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create an UDP with ancillary data comm point. 
<p>
Calls malloc. Uses recvmsg instead of recv to get udp message. setups the structure with the parameters you provide. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>base,:</em>&nbsp;</td><td>in which base to alloc the commpoint. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fd</em>&nbsp;</td><td>: file descriptor of open UDP socket. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buffer,:</em>&nbsp;</td><td>shared buffer by UDP sockets from this thread. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback,:</em>&nbsp;</td><td>callback function pointer. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback_arg,:</em>&nbsp;</td><td>will be passed to your callback function. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: returns the allocated communication point. NULL on error. Sets timeout to NULL. Turns off TCP options. </dd></dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="netevent_8c_source.html#l00077">internal_event::base</a>, <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8h_source.html#l00224">comm_point::callback</a>, <a class="el" href="netevent_8h_source.html#l00226">comm_point::cb_arg</a>, <a class="el" href="fake__event_8c_source.html#l01013">comm_point_delete()</a>, <a class="el" href="fake__event_8c_source.html#l01071">comm_point_udp_ancil_callback()</a>, <a class="el" href="netevent_8h_source.html#l00180">comm_point::do_not_close</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="netevent_8h_source.html#l00198">comm_point::inuse</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00154">comm_point::max_tcp_count</a>, <a class="el" href="netevent_8h_source.html#l00146">comm_point::tcp_byte_count</a>, <a class="el" href="netevent_8h_source.html#l00194">comm_point::tcp_check_nb_connect</a>, <a class="el" href="netevent_8h_source.html#l00184">comm_point::tcp_do_close</a>, <a class="el" href="netevent_8h_source.html#l00191">comm_point::tcp_do_toggle_rw</a>, <a class="el" href="netevent_8h_source.html#l00160">comm_point::tcp_free</a>, <a class="el" href="netevent_8h_source.html#l00157">comm_point::tcp_handlers</a>, <a class="el" href="netevent_8h_source.html#l00144">comm_point::tcp_is_reading</a>, <a class="el" href="netevent_8h_source.html#l00148">comm_point::tcp_parent</a>, <a class="el" href="netevent_8h_source.html#l00137">comm_point::timeout</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

<p>Referenced by <a class="el" href="listen__dnsport_8c_source.html#l00534">listen_create()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c29c65a940ecee00cc239d74f7e94014"></a><!-- doxytag: member="netevent.c::comm_point_create_tcp" ref="c29c65a940ecee00cc239d74f7e94014" args="(struct comm_base *base, int fd, int num, size_t bufsize, comm_point_callback_t *callback, void *callback_arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structcomm__point.html">comm_point</a>* comm_point_create_tcp           </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">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>bufsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *&nbsp;</td>
          <td class="paramname"> <em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>callback_arg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a TCP listener comm point. 
<p>
Calls malloc. Setups the structure with the parameters you provide. Also Creates TCP Handlers, pre allocated for you. Uses the parameters you provide. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>base,:</em>&nbsp;</td><td>in which base to alloc the commpoint. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fd,:</em>&nbsp;</td><td>file descriptor of open TCP socket set to listen nonblocking. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>num,:</em>&nbsp;</td><td>becomes max_tcp_count, the routine allocates that many tcp handler commpoints. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bufsize,:</em>&nbsp;</td><td>size of buffer to create for handlers. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback,:</em>&nbsp;</td><td>callback function pointer for TCP handlers. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback_arg,:</em>&nbsp;</td><td>will be passed to your callback function. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: returns the TCP listener commpoint. You can find the TCP handlers in the array inside the listener commpoint. returns NULL on error. Inits timeout to NULL. All handlers are on the free list. </dd></dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="netevent_8c_source.html#l00077">internal_event::base</a>, <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8h_source.html#l00224">comm_point::callback</a>, <a class="el" href="netevent_8h_source.html#l00226">comm_point::cb_arg</a>, <a class="el" href="netevent_8c_source.html#l01127">comm_point_create_tcp_handler()</a>, <a class="el" href="fake__event_8c_source.html#l01013">comm_point_delete()</a>, <a class="el" href="fake__event_8c_source.html#l01077">comm_point_tcp_accept_callback()</a>, <a class="el" href="netevent_8h_source.html#l00167">comm_point::comm_tcp_accept</a>, <a class="el" href="netevent_8h_source.html#l00180">comm_point::do_not_close</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00154">comm_point::max_tcp_count</a>, <a class="el" href="netevent_8h_source.html#l00146">comm_point::tcp_byte_count</a>, <a class="el" href="netevent_8h_source.html#l00194">comm_point::tcp_check_nb_connect</a>, <a class="el" href="netevent_8h_source.html#l00184">comm_point::tcp_do_close</a>, <a class="el" href="netevent_8h_source.html#l00191">comm_point::tcp_do_toggle_rw</a>, <a class="el" href="netevent_8h_source.html#l00160">comm_point::tcp_free</a>, <a class="el" href="netevent_8h_source.html#l00157">comm_point::tcp_handlers</a>, <a class="el" href="netevent_8h_source.html#l00144">comm_point::tcp_is_reading</a>, <a class="el" href="netevent_8h_source.html#l00148">comm_point::tcp_parent</a>, <a class="el" href="netevent_8h_source.html#l00137">comm_point::timeout</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

<p>Referenced by <a class="el" href="listen__dnsport_8c_source.html#l00534">listen_create()</a>.</p>

</div>
</div><p>
<a class="anchor" name="20c4fac7d9882fd0d6a4655284674409"></a><!-- doxytag: member="netevent.c::comm_point_create_tcp_out" ref="20c4fac7d9882fd0d6a4655284674409" args="(struct comm_base *base, size_t bufsize, comm_point_callback_t *callback, void *callback_arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structcomm__point.html">comm_point</a>* comm_point_create_tcp_out           </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">size_t&nbsp;</td>
          <td class="paramname"> <em>bufsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *&nbsp;</td>
          <td class="paramname"> <em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>callback_arg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create an outgoing TCP commpoint. 
<p>
No file descriptor is opened, left at -1. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>base,:</em>&nbsp;</td><td>in which base to alloc the commpoint. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bufsize,:</em>&nbsp;</td><td>size of buffer to create for handlers. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback,:</em>&nbsp;</td><td>callback function pointer for the handler. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback_arg,:</em>&nbsp;</td><td>will be passed to your callback function. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: the commpoint or NULL on error. </dd></dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="netevent_8c_source.html#l00077">internal_event::base</a>, <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8h_source.html#l00098">comm_reply::c</a>, <a class="el" href="netevent_8h_source.html#l00224">comm_point::callback</a>, <a class="el" href="netevent_8h_source.html#l00226">comm_point::cb_arg</a>, <a class="el" href="fake__event_8c_source.html#l01083">comm_point_tcp_handle_callback()</a>, <a class="el" href="netevent_8h_source.html#l00180">comm_point::do_not_close</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00154">comm_point::max_tcp_count</a>, <a class="el" href="netevent_8h_source.html#l00150">comm_point::repinfo</a>, <a class="el" href="netevent_8h_source.html#l00146">comm_point::tcp_byte_count</a>, <a class="el" href="netevent_8h_source.html#l00194">comm_point::tcp_check_nb_connect</a>, <a class="el" href="netevent_8h_source.html#l00184">comm_point::tcp_do_close</a>, <a class="el" href="netevent_8h_source.html#l00191">comm_point::tcp_do_toggle_rw</a>, <a class="el" href="netevent_8h_source.html#l00160">comm_point::tcp_free</a>, <a class="el" href="netevent_8h_source.html#l00157">comm_point::tcp_handlers</a>, <a class="el" href="netevent_8h_source.html#l00144">comm_point::tcp_is_reading</a>, <a class="el" href="netevent_8h_source.html#l00148">comm_point::tcp_parent</a>, <a class="el" href="netevent_8h_source.html#l00137">comm_point::timeout</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

<p>Referenced by <a class="el" href="outside__network_8c_source.html#l00425">create_pending_tcp()</a>.</p>

</div>
</div><p>
<a class="anchor" name="bfd80dff2df0cb2ab35ec359ba1cad12"></a><!-- doxytag: member="netevent.c::comm_point_create_local" ref="bfd80dff2df0cb2ab35ec359ba1cad12" args="(struct comm_base *base, int fd, size_t bufsize, comm_point_callback_t *callback, void *callback_arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structcomm__point.html">comm_point</a>* comm_point_create_local           </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">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>bufsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *&nbsp;</td>
          <td class="paramname"> <em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>callback_arg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create commpoint to listen to a local domain file descriptor. 
<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>base,:</em>&nbsp;</td><td>in which base to alloc the commpoint. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fd,:</em>&nbsp;</td><td>file descriptor of open AF_UNIX socket set to listen nonblocking. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bufsize,:</em>&nbsp;</td><td>size of buffer to create for handlers. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback,:</em>&nbsp;</td><td>callback function pointer for the handler. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback_arg,:</em>&nbsp;</td><td>will be passed to your callback function. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: the commpoint or NULL on error. </dd></dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="netevent_8c_source.html#l00077">internal_event::base</a>, <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8h_source.html#l00224">comm_point::callback</a>, <a class="el" href="netevent_8h_source.html#l00226">comm_point::cb_arg</a>, <a class="el" href="fake__event_8c_source.html#l01101">comm_point_local_handle_callback()</a>, <a class="el" href="netevent_8h_source.html#l00180">comm_point::do_not_close</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00154">comm_point::max_tcp_count</a>, <a class="el" href="netevent_8h_source.html#l00146">comm_point::tcp_byte_count</a>, <a class="el" href="netevent_8h_source.html#l00194">comm_point::tcp_check_nb_connect</a>, <a class="el" href="netevent_8h_source.html#l00184">comm_point::tcp_do_close</a>, <a class="el" href="netevent_8h_source.html#l00191">comm_point::tcp_do_toggle_rw</a>, <a class="el" href="netevent_8h_source.html#l00160">comm_point::tcp_free</a>, <a class="el" href="netevent_8h_source.html#l00157">comm_point::tcp_handlers</a>, <a class="el" href="netevent_8h_source.html#l00144">comm_point::tcp_is_reading</a>, <a class="el" href="netevent_8h_source.html#l00148">comm_point::tcp_parent</a>, <a class="el" href="netevent_8h_source.html#l00137">comm_point::timeout</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

</div>
</div><p>
<a class="anchor" name="793278e8c315ea3cc44ff12f18ac02fc"></a><!-- doxytag: member="netevent.c::comm_point_create_raw" ref="793278e8c315ea3cc44ff12f18ac02fc" args="(struct comm_base *base, int fd, int writing, comm_point_callback_t *callback, void *callback_arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structcomm__point.html">comm_point</a>* comm_point_create_raw           </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">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>writing</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="netevent_8h.html#2ac6c8fe545b6f40c109a064ce17a24d">comm_point_callback_t</a> *&nbsp;</td>
          <td class="paramname"> <em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>callback_arg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create commpoint to listen to a local domain pipe descriptor. 
<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>base,:</em>&nbsp;</td><td>in which base to alloc the commpoint. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fd,:</em>&nbsp;</td><td>file descriptor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>writing,:</em>&nbsp;</td><td>true if you want to listen to writes, false for reads. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback,:</em>&nbsp;</td><td>callback function pointer for the handler. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback_arg,:</em>&nbsp;</td><td>will be passed to your callback function. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: the commpoint or NULL on error. </dd></dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="netevent_8c_source.html#l00077">internal_event::base</a>, <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8h_source.html#l00224">comm_point::callback</a>, <a class="el" href="netevent_8h_source.html#l00226">comm_point::cb_arg</a>, <a class="el" href="fake__event_8c_source.html#l01107">comm_point_raw_handle_callback()</a>, <a class="el" href="netevent_8h_source.html#l00180">comm_point::do_not_close</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00154">comm_point::max_tcp_count</a>, <a class="el" href="netevent_8h_source.html#l00146">comm_point::tcp_byte_count</a>, <a class="el" href="netevent_8h_source.html#l00194">comm_point::tcp_check_nb_connect</a>, <a class="el" href="netevent_8h_source.html#l00184">comm_point::tcp_do_close</a>, <a class="el" href="netevent_8h_source.html#l00191">comm_point::tcp_do_toggle_rw</a>, <a class="el" href="netevent_8h_source.html#l00160">comm_point::tcp_free</a>, <a class="el" href="netevent_8h_source.html#l00157">comm_point::tcp_handlers</a>, <a class="el" href="netevent_8h_source.html#l00144">comm_point::tcp_is_reading</a>, <a class="el" href="netevent_8h_source.html#l00148">comm_point::tcp_parent</a>, <a class="el" href="netevent_8h_source.html#l00137">comm_point::timeout</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

</div>
</div><p>
<a class="anchor" name="6eb4b8e228226cf7ab9359742f050d66"></a><!-- doxytag: member="netevent.c::comm_point_close" ref="6eb4b8e228226cf7ab9359742f050d66" args="(struct comm_point *c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_close           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Close a comm point fd. 
<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>c,:</em>&nbsp;</td><td>comm point to close. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8h_source.html#l00180">comm_point::do_not_close</a>, <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="log_8h_source.html#l00058">VERB_ALGO</a>, and <a class="el" href="ldns-testpkts_8c.html#a557e5b23b2833d7c1ec0415a1bdd2b1">verbose()</a>.</p>

<p>Referenced by <a class="el" href="netevent_8c_source.html#l01427">comm_point_delete()</a>, <a class="el" href="outside__network_8c_source.html#l00215">decomission_pending_tcp()</a>, <a class="el" href="outside__network_8c_source.html#l00949">outnet_tcptimer()</a>, <a class="el" href="outside__network_8c_source.html#l00254">portcomm_loweruse()</a>, and <a class="el" href="netevent_8c_source.html#l00669">reclaim_tcp_handler()</a>.</p>

</div>
</div><p>
<a class="anchor" name="9cfab13f86b3f2f180ea6b66119b455d"></a><!-- doxytag: member="netevent.c::comm_point_delete" ref="9cfab13f86b3f2f180ea6b66119b455d" args="(struct comm_point *c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_delete           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Close and deallocate (free) the comm point. 
<p>
If the comm point is a tcp-accept point, also its tcp-handler points are deleted. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c,:</em>&nbsp;</td><td>comm point to delete. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8c_source.html#l01406">comm_point_close()</a>, <a class="el" href="fake__event_8c_source.html#l01013">comm_point_delete()</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00154">comm_point::max_tcp_count</a>, <a class="el" href="netevent_8h_source.html#l00157">comm_point::tcp_handlers</a>, <a class="el" href="netevent_8h_source.html#l00137">comm_point::timeout</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

</div>
</div><p>
<a class="anchor" name="848235a0ded0c17ce32d5bbfcb5f094d"></a><!-- doxytag: member="netevent.c::comm_point_set_cb_arg" ref="848235a0ded0c17ce32d5bbfcb5f094d" args="(struct comm_point *c, void *arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_set_cb_arg           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td>
          <td class="paramname"> <em>c</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>
Reset the callback argument for a comm point. 
<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>c,:</em>&nbsp;</td><td>the comm point to change. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>arg,:</em>&nbsp;</td><td>the new callback user argument. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8h_source.html#l00226">comm_point::cb_arg</a>, and <a class="el" href="log_8h_source.html#l00185">log_assert</a>.</p>

</div>
</div><p>
<a class="anchor" name="08297db7cb55faf7951477731ae17a92"></a><!-- doxytag: member="netevent.c::comm_point_send_reply" ref="08297db7cb55faf7951477731ae17a92" args="(struct comm_reply *repinfo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_send_reply           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__reply.html">comm_reply</a> *&nbsp;</td>
          <td class="paramname"> <em>repinfo</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Send reply. 
<p>
Put message into commpoint 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>repinfo,:</em>&nbsp;</td><td>The reply info copied from a commpoint callback call. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8h_source.html#l00100">comm_reply::addr</a>, <a class="el" href="netevent_8h_source.html#l00102">comm_reply::addrlen</a>, <a class="el" href="replay_8h_source.html#l00228">replay_runtime::answer_last</a>, <a class="el" href="replay_8h_source.html#l00225">replay_runtime::answer_list</a>, <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8h_source.html#l00098">comm_reply::c</a>, <a class="el" href="netevent_8c_source.html#l00239">comm_point_send_udp_msg()</a>, <a class="el" href="netevent_8c_source.html#l00351">comm_point_send_udp_msg_if()</a>, <a class="el" href="fake__event_8c_source.html#l01001">comm_point_start_listening()</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="log_8c_source.html#l00267">fatal_exit()</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="log_8c_source.html#l00228">log_info()</a>, <a class="el" href="fake__event_8c_source.html#l00094">log_pkt()</a>, <a class="el" href="replay_8h_source.html#l00285">replay_answer::next</a>, <a class="el" href="replay_8h_source.html#l00289">replay_answer::pkt</a>, <a class="el" href="replay_8h_source.html#l00287">replay_answer::repinfo</a>, <a class="el" href="netevent_8h_source.html#l00104">comm_reply::srctype</a>, <a class="el" href="netevent_8c_source.html#l00049">TCP_QUERY_TIMEOUT</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

</div>
</div><p>
<a class="anchor" name="74cf8926a893e62b5e75ccc1c0f87147"></a><!-- doxytag: member="netevent.c::comm_point_drop_reply" ref="74cf8926a893e62b5e75ccc1c0f87147" args="(struct comm_reply *repinfo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_drop_reply           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__reply.html">comm_reply</a> *&nbsp;</td>
          <td class="paramname"> <em>repinfo</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Drop reply. 
<p>
Cleans up. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>repinfo,:</em>&nbsp;</td><td>The reply info copied from a commpoint callback call. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="netevent_8h_source.html#l00098">comm_reply::c</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="log_8c_source.html#l00228">log_info()</a>, <a class="el" href="netevent_8c_source.html#l00669">reclaim_tcp_handler()</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

</div>
</div><p>
<a class="anchor" name="44b1a87283127a1f6632ac8d45895920"></a><!-- doxytag: member="netevent.c::comm_point_stop_listening" ref="44b1a87283127a1f6632ac8d45895920" args="(struct comm_point *c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_stop_listening           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Stop listening for input on the commpoint. 
<p>
No callbacks will happen. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c,:</em>&nbsp;</td><td>commpoint to disable. The fd is not closed. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="log_8h_source.html#l00058">VERB_ALGO</a>, and <a class="el" href="ldns-testpkts_8c.html#a557e5b23b2833d7c1ec0415a1bdd2b1">verbose()</a>.</p>

</div>
</div><p>
<a class="anchor" name="f0b8caf76732fbeef49f6b4730387ab0"></a><!-- doxytag: member="netevent.c::comm_point_start_listening" ref="f0b8caf76732fbeef49f6b4730387ab0" args="(struct comm_point *c, int newfd, int sec)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_start_listening           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>newfd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>sec</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 again for input on the comm point. 
<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>c,:</em>&nbsp;</td><td>commpoint to enable again. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>newfd,:</em>&nbsp;</td><td>new fd, or -1 to leave fd be. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sec,:</em>&nbsp;</td><td>timeout in seconds, or -1 for no (change to the) timeout. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00160">comm_point::tcp_free</a>, <a class="el" href="netevent_8h_source.html#l00144">comm_point::tcp_is_reading</a>, <a class="el" href="netevent_8h_source.html#l00137">comm_point::timeout</a>, <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>, <a class="el" href="log_8h_source.html#l00058">VERB_ALGO</a>, and <a class="el" href="ldns-testpkts_8c.html#a557e5b23b2833d7c1ec0415a1bdd2b1">verbose()</a>.</p>

</div>
</div><p>
<a class="anchor" name="a03b8bdd6f1deb74751a23886fc05ac2"></a><!-- doxytag: member="netevent.c::comm_point_listen_for_rw" ref="a03b8bdd6f1deb74751a23886fc05ac2" args="(struct comm_point *c, int rd, int wr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_point_listen_for_rw           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>rd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>wr</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Stop listening and start listening again for reading or writing. 
<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>c,:</em>&nbsp;</td><td>commpoint </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>rd,:</em>&nbsp;</td><td>if true, listens for reading. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>wr,:</em>&nbsp;</td><td>if true, listens for writing. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8c_source.html#l00079">internal_event::ev</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00134">comm_point::fd</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="netevent_8h_source.html#l00137">comm_point::timeout</a>, <a class="el" href="log_8h_source.html#l00058">VERB_ALGO</a>, and <a class="el" href="ldns-testpkts_8c.html#a557e5b23b2833d7c1ec0415a1bdd2b1">verbose()</a>.</p>

<p>Referenced by <a class="el" href="remote_8c_source.html#l01613">remote_control_callback()</a>.</p>

</div>
</div><p>
<a class="anchor" name="89e19915fd58de03f17d247440654ebe"></a><!-- doxytag: member="netevent.c::comm_point_get_mem" ref="89e19915fd58de03f17d247440654ebe" args="(struct comm_point *c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t comm_point_get_mem           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__point.html">comm_point</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get size of memory used by comm point. 
<p>
For TCP handlers this includes subhandlers. For UDP handlers, this does not include the (shared) UDP 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>c,:</em>&nbsp;</td><td>commpoint. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>size in bytes. </dd></dl>

<p>References <a class="el" href="netevent_8h_source.html#l00140">comm_point::buffer</a>, <a class="el" href="fake__event_8c_source.html#l01028">comm_point_get_mem()</a>, <a class="el" href="netevent_8h_source.html#l00131">comm_point::ev</a>, <a class="el" href="netevent_8h_source.html#l00154">comm_point::max_tcp_count</a>, <a class="el" href="netevent_8h_source.html#l00157">comm_point::tcp_handlers</a>, <a class="el" href="netevent_8h_source.html#l00137">comm_point::timeout</a>, and <a class="el" href="structcomm__point.html#e97adb4dd9e0ea2e4b18465bcc8b0162">comm_point::type</a>.</p>

</div>
</div><p>
<a class="anchor" name="1a5faccab873a9e377fb715cb00be916"></a><!-- doxytag: member="netevent.c::comm_timer_create" ref="1a5faccab873a9e377fb715cb00be916" args="(struct comm_base *base, void(*cb)(void *), void *cb_arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structcomm__timer.html">comm_timer</a>* comm_timer_create           </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">void(*)(void *)&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>cb_arg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
create timer. 
<p>
Not active upon creation. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>base,:</em>&nbsp;</td><td>event handling base. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cb,:</em>&nbsp;</td><td>callback function: void myfunc(void* myarg); </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cb_arg,:</em>&nbsp;</td><td>user callback argument. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: the new timer or NULL on error. </dd></dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="netevent_8c_source.html#l00099">internal_timer::base</a>, <a class="el" href="structcomm__timer.html#7199b4ca68c48368098ad3460b5b1928">comm_timer::callback</a>, <a class="el" href="netevent_8h_source.html#l00240">comm_timer::cb_arg</a>, <a class="el" href="fake__event_8c_source.html#l01089">comm_timer_callback()</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="netevent_8c_source.html#l00101">internal_timer::ev</a>, <a class="el" href="netevent_8h_source.html#l00234">comm_timer::ev_timer</a>, and <a class="el" href="log_8c_source.html#l00241">log_err()</a>.</p>

</div>
</div><p>
<a class="anchor" name="cbfb9cf754701131fd122454a8bc999e"></a><!-- doxytag: member="netevent.c::comm_timer_disable" ref="cbfb9cf754701131fd122454a8bc999e" args="(struct comm_timer *timer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_timer_disable           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__timer.html">comm_timer</a> *&nbsp;</td>
          <td class="paramname"> <em>timer</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
disable timer. 
<p>
Stops callbacks from happening. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>timer,:</em>&nbsp;</td><td>to disable. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8c_source.html#l00103">internal_timer::enabled</a>, <a class="el" href="netevent_8c_source.html#l00101">internal_timer::ev</a>, and <a class="el" href="netevent_8h_source.html#l00234">comm_timer::ev_timer</a>.</p>

</div>
</div><p>
<a class="anchor" name="5ae99ac696c5300d19e0a7a2c04816ee"></a><!-- doxytag: member="netevent.c::comm_timer_set" ref="5ae99ac696c5300d19e0a7a2c04816ee" args="(struct comm_timer *timer, struct timeval *tv)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_timer_set           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__timer.html">comm_timer</a> *&nbsp;</td>
          <td class="paramname"> <em>timer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct timeval *&nbsp;</td>
          <td class="paramname"> <em>tv</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
reset timevalue for timer. 
<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>timer,:</em>&nbsp;</td><td>timer to (re)set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>tv,:</em>&nbsp;</td><td>when the timer should activate. if NULL timer is disabled. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="netevent_8c_source.html#l00099">internal_timer::base</a>, <a class="el" href="fake__event_8c_source.html#l01089">comm_timer_callback()</a>, <a class="el" href="fake__event_8c_source.html#l01149">comm_timer_disable()</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="netevent_8c_source.html#l00103">internal_timer::enabled</a>, <a class="el" href="netevent_8c_source.html#l00101">internal_timer::ev</a>, <a class="el" href="netevent_8h_source.html#l00234">comm_timer::ev_timer</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, and <a class="el" href="log_8c_source.html#l00241">log_err()</a>.</p>

</div>
</div><p>
<a class="anchor" name="bb7d9fb9155c3508dce467b0b361194d"></a><!-- doxytag: member="netevent.c::comm_timer_delete" ref="bb7d9fb9155c3508dce467b0b361194d" args="(struct comm_timer *timer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_timer_delete           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__timer.html">comm_timer</a> *&nbsp;</td>
          <td class="paramname"> <em>timer</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
delete timer. 
<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>timer,:</em>&nbsp;</td><td>to delete. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="fake__event_8c_source.html#l01149">comm_timer_disable()</a>, and <a class="el" href="netevent_8h_source.html#l00234">comm_timer::ev_timer</a>.</p>

</div>
</div><p>
<a class="anchor" name="a2ef06dfc6040dd3acca1eefa92cfc90"></a><!-- doxytag: member="netevent.c::comm_timer_callback" ref="a2ef06dfc6040dd3acca1eefa92cfc90" args="(int fd, short event, void *arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_timer_callback           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short&nbsp;</td>
          <td class="paramname"> <em>event</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>
This routine is published for checks and tests, and is only used internally. 
<p>
handle libevent callback for timer comm. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fd,:</em>&nbsp;</td><td>file descriptor (always -1). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>event,:</em>&nbsp;</td><td>event bits from libevent: EV_READ, EV_WRITE, EV_SIGNAL, EV_TIMEOUT. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>arg,:</em>&nbsp;</td><td>the <a class="el" href="structcomm__timer.html" title="Structure only for making timeout events.">comm_timer</a> structure. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8c_source.html#l00099">internal_timer::base</a>, <a class="el" href="structcomm__timer.html#7199b4ca68c48368098ad3460b5b1928">comm_timer::callback</a>, <a class="el" href="netevent_8h_source.html#l00240">comm_timer::cb_arg</a>, <a class="el" href="netevent_8c_source.html#l00129">comm_base_now()</a>, <a class="el" href="netevent_8c_source.html#l00103">internal_timer::enabled</a>, <a class="el" href="netevent_8h_source.html#l00234">comm_timer::ev_timer</a>, <a class="el" href="fptr__wlist_8h_source.html#l00067">fptr_ok</a>, <a class="el" href="fptr__wlist_8c_source.html#l00101">fptr_whitelist_comm_timer()</a>, and <a class="el" href="log_8h_source.html#l00185">log_assert</a>.</p>

</div>
</div><p>
<a class="anchor" name="7f41e0e0e5a9abd4ad9ddd28c7aaf053"></a><!-- doxytag: member="netevent.c::comm_timer_is_set" ref="7f41e0e0e5a9abd4ad9ddd28c7aaf053" args="(struct comm_timer *timer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int comm_timer_is_set           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__timer.html">comm_timer</a> *&nbsp;</td>
          <td class="paramname"> <em>timer</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
see if timeout has been set to a value. 
<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>timer,:</em>&nbsp;</td><td>the timer to examine. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: false if disabled or not set. </dd></dl>

<p>References <a class="el" href="netevent_8c_source.html#l00103">internal_timer::enabled</a>, and <a class="el" href="netevent_8h_source.html#l00234">comm_timer::ev_timer</a>.</p>

</div>
</div><p>
<a class="anchor" name="91f9c886f97be545cb20d5f75d47ca2e"></a><!-- doxytag: member="netevent.c::comm_timer_get_mem" ref="91f9c886f97be545cb20d5f75d47ca2e" args="(struct comm_timer *timer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t comm_timer_get_mem           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__timer.html">comm_timer</a> *&nbsp;</td>
          <td class="paramname"> <em>timer</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get size of memory used by comm timer. 
<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>timer,:</em>&nbsp;</td><td>the timer to examine. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>size in bytes. </dd></dl>

<p>Referenced by <a class="el" href="outside__network_8c_source.html#l01710">serviced_get_mem()</a>, <a class="el" href="outside__network_8c_source.html#l01631">waiting_tcp_get_mem()</a>, and <a class="el" href="outside__network_8c_source.html#l01657">waiting_udp_get_mem()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c3ccdc4685ec7c16d71e281df794496c"></a><!-- doxytag: member="netevent.c::comm_signal_create" ref="c3ccdc4685ec7c16d71e281df794496c" args="(struct comm_base *base, void(*callback)(int, void *), void *cb_arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structcomm__signal.html">comm_signal</a>* comm_signal_create           </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">void(*)(int, void *)&nbsp;</td>
          <td class="paramname"> <em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>cb_arg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a signal handler. 
<p>
Call signal_bind() later to bind to a signal. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>base,:</em>&nbsp;</td><td>communication base to use. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback,:</em>&nbsp;</td><td>called when signal is caught. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cb_arg,:</em>&nbsp;</td><td>user argument to callback </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: the signal struct or NULL on error. </dd></dl>

<p>References <a class="el" href="netevent_8h_source.html#l00248">comm_signal::base</a>, <a class="el" href="structcomm__signal.html#60e31fb7a43d986a4395d3ec965a04c2">comm_signal::callback</a>, <a class="el" href="netevent_8h_source.html#l00257">comm_signal::cb_arg</a>, <a class="el" href="netevent_8h_source.html#l00251">comm_signal::ev_signal</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="structreplay__runtime.html#19c84c5fa28c12405aa8313c3c994fb1">replay_runtime::sig_cb</a>, and <a class="el" href="replay_8h_source.html#l00243">replay_runtime::sig_cb_arg</a>.</p>

</div>
</div><p>
<a class="anchor" name="8149bd04578417ec0a3992aae52f3868"></a><!-- doxytag: member="netevent.c::comm_signal_callback" ref="8149bd04578417ec0a3992aae52f3868" args="(int sig, short event, void *arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_signal_callback           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short&nbsp;</td>
          <td class="paramname"> <em>event</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>
This routine is published for checks and tests, and is only used internally. 
<p>
handle libevent callback for signal comm. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fd,:</em>&nbsp;</td><td>file descriptor (used for the signal number). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>event,:</em>&nbsp;</td><td>event bits from libevent: EV_READ, EV_WRITE, EV_SIGNAL, EV_TIMEOUT. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>arg,:</em>&nbsp;</td><td>the internal commsignal structure. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8h_source.html#l00248">comm_signal::base</a>, <a class="el" href="structcomm__signal.html#60e31fb7a43d986a4395d3ec965a04c2">comm_signal::callback</a>, <a class="el" href="netevent_8h_source.html#l00257">comm_signal::cb_arg</a>, <a class="el" href="netevent_8c_source.html#l00129">comm_base_now()</a>, <a class="el" href="fptr__wlist_8h_source.html#l00067">fptr_ok</a>, <a class="el" href="fptr__wlist_8c_source.html#l00113">fptr_whitelist_comm_signal()</a>, and <a class="el" href="log_8h_source.html#l00185">log_assert</a>.</p>

</div>
</div><p>
<a class="anchor" name="79ef8b0d4fe81fa4193679a29b9d49f4"></a><!-- doxytag: member="netevent.c::comm_signal_bind" ref="79ef8b0d4fe81fa4193679a29b9d49f4" args="(struct comm_signal *comsig, int sig)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int comm_signal_bind           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__signal.html">comm_signal</a> *&nbsp;</td>
          <td class="paramname"> <em>comsig</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>sig</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Bind signal struct to catch a signal. 
<p>
A signle <a class="el" href="structcomm__signal.html" title="Structure only for signal events.">comm_signal</a> can be bound to multiple signals, calling comm_signal_bind multiple times. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>comsig,:</em>&nbsp;</td><td>the communication point, with callback information. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sig,:</em>&nbsp;</td><td>signal number. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: true on success. false on error. </dd></dl>

<p>References <a class="el" href="netevent_8c_source.html#l00087">internal_base::base</a>, <a class="el" href="netevent_8h_source.html#l00248">comm_signal::base</a>, <a class="el" href="fake__event_8c_source.html#l01095">comm_signal_callback()</a>, <a class="el" href="netevent_8h_source.html#l00090">comm_base::eb</a>, <a class="el" href="netevent_8c_source.html#l00111">internal_signal::ev</a>, <a class="el" href="netevent_8h_source.html#l00251">comm_signal::ev_signal</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, and <a class="el" href="netevent_8c_source.html#l00113">internal_signal::next</a>.</p>

</div>
</div><p>
<a class="anchor" name="c496abe80a96c70f933d3b288f5035da"></a><!-- doxytag: member="netevent.c::comm_signal_delete" ref="c496abe80a96c70f933d3b288f5035da" args="(struct comm_signal *comsig)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void comm_signal_delete           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcomm__signal.html">comm_signal</a> *&nbsp;</td>
          <td class="paramname"> <em>comsig</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete the signal communication point. 
<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>comsig,:</em>&nbsp;</td><td>to delete. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="netevent_8c_source.html#l00111">internal_signal::ev</a>, <a class="el" href="netevent_8h_source.html#l00251">comm_signal::ev_signal</a>, and <a class="el" href="netevent_8c_source.html#l00113">internal_signal::next</a>.</p>

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