Sophie

Sophie

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

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: testcode/testbound.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_aae0f736e7b956edab2d753def1ee5b5.html">testcode</a>
  </div>
</div>
<div class="contents">
<h1>testbound.c File Reference</h1>Exits with code 1 on a failure.  
<a href="#_details">More...</a>
<p>
<code>#include &quot;config.h&quot;</code><br>
<code>#include &quot;<a class="el" href="ldns-testpkts_8h.html">testcode/ldns-testpkts.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="replay_8h.html">testcode/replay.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="fake__event_8h.html">testcode/fake_event.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="remote_8h.html">daemon/remote.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="unbound_8c.html">daemon/unbound.c</a>&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#a4e97f3782107649d3e4eb3875090b3a">main</a>&nbsp;&nbsp;&nbsp;daemon_main</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">include the main program from the unbound <a class="el" href="structdaemon.html" title="Structure holding worker list.">daemon</a>.  <a href="#a4e97f3782107649d3e4eb3875090b3a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#09a3b394b8602092d58347b791158062">MAX_LINE_LEN</a>&nbsp;&nbsp;&nbsp;1024</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">maximum line length for lines in the replay file.  <a href="#09a3b394b8602092d58347b791158062"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#4c171d1ccc50f0b6ce7ad2f475eeba32">MAXARG</a>&nbsp;&nbsp;&nbsp;100</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Max number of arguments to pass to unbound.  <a href="#4c171d1ccc50f0b6ce7ad2f475eeba32"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#719d6813c26f52e99e27c1668d68386c">testbound_usage</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">give commandline usage for testbound.  <a href="#719d6813c26f52e99e27c1668d68386c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#eb6e569f4f16548c04c2459ed622e545">add_opts</a> (const char *<a class="el" href="streamtcp_8c.html#db50a0eab9fed92fc3bfc7dfa4f2c410">optarg</a>, int *pass_argc, char *pass_argv[])</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add options from string to passed argc.  <a href="#eb6e569f4f16548c04c2459ed622e545"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9efe8a356f6640b0b73fadb6f072b00d"></a><!-- doxytag: member="testbound.c::echo_cmdline" ref="9efe8a356f6640b0b73fadb6f072b00d" args="(int argc, char *argv[])" -->
static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#9efe8a356f6640b0b73fadb6f072b00d">echo_cmdline</a> (int argc, char *argv[])</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">pretty print commandline for unbound in this test <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0c8e1eeafa69c0f19289515de0525382"></a><!-- doxytag: member="testbound.c::setup_config" ref="0c8e1eeafa69c0f19289515de0525382" args="(FILE *in, char *configfile, int *lineno, int *pass_argc, char *pass_argv[])" -->
static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#0c8e1eeafa69c0f19289515de0525382">setup_config</a> (FILE *in, char *configfile, int *lineno, int *pass_argc, char *pass_argv[])</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">process config elements <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cbefea35bffa8c4f69b11d8f4ea94f93"></a><!-- doxytag: member="testbound.c::setup_playback" ref="cbefea35bffa8c4f69b11d8f4ea94f93" args="(const char *filename, char *configfile, int *pass_argc, char *pass_argv[])" -->
static struct <a class="el" href="structreplay__scenario.html">replay_scenario</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#cbefea35bffa8c4f69b11d8f4ea94f93">setup_playback</a> (const char *filename, char *configfile, int *pass_argc, char *pass_argv[])</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">read playback file <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8cb5de5012c2bd2de1d4f05bb3c68b6a"></a><!-- doxytag: member="testbound.c::remove_configfile" ref="8cb5de5012c2bd2de1d4f05bb3c68b6a" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#8cb5de5012c2bd2de1d4f05bb3c68b6a">remove_configfile</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">remove config file at exit <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Main fake event test program.  <a href="#0ddf1224851353fc92bfbff6f499fa97"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structlisten__port.html">listen_port</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#9c04050d7761d1302de6ed9ce599c9fd">daemon_remote_open_ports</a> (struct <a class="el" href="structconfig__file.html">config_file</a> *cfg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open and create listening ports for remote control.  <a href="#9c04050d7761d1302de6ed9ce599c9fd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structdaemon__remote.html">daemon_remote</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#38ce75f597fd29e9c16ca3f6e4995772">daemon_remote_create</a> (struct <a class="el" href="structconfig__file.html">config_file</a> *cfg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create new remote control state for the <a class="el" href="structdaemon.html" title="Structure holding worker list.">daemon</a>.  <a href="#38ce75f597fd29e9c16ca3f6e4995772"></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="testbound_8c.html#54a5bd1d8c909682d94cd5a9d29d5f36">daemon_remote_delete</a> (struct <a class="el" href="structdaemon__remote.html">daemon_remote</a> *rc)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">remote control state to delete.  <a href="#54a5bd1d8c909682d94cd5a9d29d5f36"></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="testbound_8c.html#9c33fc4690e14b7e485f9a41f1fb5113">daemon_remote_clear</a> (struct <a class="el" href="structdaemon__remote.html">daemon_remote</a> *rc)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">remote control state to clear up.  <a href="#9c33fc4690e14b7e485f9a41f1fb5113"></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="testbound_8c.html#b01473810775dd2d8713c4f1bee63b95">daemon_remote_open_accept</a> (struct <a class="el" href="structdaemon__remote.html">daemon_remote</a> *rc, struct <a class="el" href="structlisten__port.html">listen_port</a> *ports, struct <a class="el" href="structworker.html">worker</a> *<a class="el" href="structworker.html">worker</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Setup comm points for accepting remote control connections.  <a href="#b01473810775dd2d8713c4f1bee63b95"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="89ef0feff4f1e812010d3c1b737d9e23"></a><!-- doxytag: member="testbound.c::remote_accept_callback" ref="89ef0feff4f1e812010d3c1b737d9e23" args="(struct comm_point *c, void *arg, int error, struct comm_reply *repinfo)" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#89ef0feff4f1e812010d3c1b737d9e23">remote_accept_callback</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c, void *arg, int error, struct <a class="el" href="structcomm__reply.html">comm_reply</a> *repinfo)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">handle remote control accept callbacks <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8556c74151759791770ce94c717789a5"></a><!-- doxytag: member="testbound.c::remote_control_callback" ref="8556c74151759791770ce94c717789a5" args="(struct comm_point *c, void *arg, int error, struct comm_reply *repinfo)" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#8556c74151759791770ce94c717789a5">remote_control_callback</a> (struct <a class="el" href="structcomm__point.html">comm_point</a> *c, void *arg, int error, struct <a class="el" href="structcomm__reply.html">comm_reply</a> *repinfo)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">handle remote control data callbacks <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#18d9e4c0c8d426dc4e754f74c0a82223">wsvc_command_option</a> (const char *wopt, const char *<a class="el" href="testbound_8c.html#90e3838491a7b92fdb154c9026326af5">cfgfile</a>, int v, int c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Handle commandline service for windows.  <a href="#18d9e4c0c8d426dc4e754f74c0a82223"></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="testbound_8c.html#44cab70a179721bf70e52c0379c7d4dc">wsvc_setup_worker</a> (struct <a class="el" href="structworker.html">worker</a> *<a class="el" href="structworker.html">worker</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Setup lead <a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> events.  <a href="#44cab70a179721bf70e52c0379c7d4dc"></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="testbound_8c.html#1aa589fcc756d3f05201e0f490d4a736">wsvc_desetup_worker</a> (struct <a class="el" href="structworker.html">worker</a> *<a class="el" href="structworker.html">worker</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Desetup lead <a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> events.  <a href="#1aa589fcc756d3f05201e0f490d4a736"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="90e3838491a7b92fdb154c9026326af5"></a><!-- doxytag: member="testbound.c::cfgfile" ref="90e3838491a7b92fdb154c9026326af5" args="[MAX_LINE_LEN]" -->
static char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="testbound_8c.html#90e3838491a7b92fdb154c9026326af5">cfgfile</a> [MAX_LINE_LEN]</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the config file (removed at exit) <br></td></tr>
</table>
<hr><h2>Detailed Description</h2>
Exits with code 1 on a failure. 
<p>
0 if all unit tests are successfull. <hr><h2>Define Documentation</h2>
<a class="anchor" name="a4e97f3782107649d3e4eb3875090b3a"></a><!-- doxytag: member="testbound.c::main" ref="a4e97f3782107649d3e4eb3875090b3a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define main&nbsp;&nbsp;&nbsp;daemon_main          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
include the main program from the unbound <a class="el" href="structdaemon.html" title="Structure holding worker list.">daemon</a>. 
<p>
rename main to daemon_main to call it 
</div>
</div><p>
<a class="anchor" name="09a3b394b8602092d58347b791158062"></a><!-- doxytag: member="testbound.c::MAX_LINE_LEN" ref="09a3b394b8602092d58347b791158062" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_LINE_LEN&nbsp;&nbsp;&nbsp;1024          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
maximum line length for lines in the replay file. 
<p>

</div>
</div><p>
<a class="anchor" name="4c171d1ccc50f0b6ce7ad2f475eeba32"></a><!-- doxytag: member="testbound.c::MAXARG" ref="4c171d1ccc50f0b6ce7ad2f475eeba32" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAXARG&nbsp;&nbsp;&nbsp;100          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Max number of arguments to pass to unbound. 
<p>

<p>Referenced by <a class="el" href="testbound_8c_source.html#l00085">add_opts()</a>, and <a class="el" href="testbound_8c_source.html#l00210">main()</a>.</p>

</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="719d6813c26f52e99e27c1668d68386c"></a><!-- doxytag: member="testbound.c::testbound_usage" ref="719d6813c26f52e99e27c1668d68386c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void testbound_usage           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
give commandline usage for testbound. 
<p>

<p>Referenced by <a class="el" href="testbound_8c_source.html#l00210">main()</a>.</p>

</div>
</div><p>
<a class="anchor" name="eb6e569f4f16548c04c2459ed622e545"></a><!-- doxytag: member="testbound.c::add_opts" ref="eb6e569f4f16548c04c2459ed622e545" args="(const char *optarg, int *pass_argc, char *pass_argv[])" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void add_opts           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>optarg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>pass_argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>pass_argv</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>
Add options from string to passed argc. 
<p>
splits on whitespace. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>optarg,:</em>&nbsp;</td><td>the option argument, "-v -p 12345" or so. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pass_argc,:</em>&nbsp;</td><td>ptr to the argc for unbound. Modified. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pass_argv,:</em>&nbsp;</td><td>the argv to pass to unbound. Modified. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="log_8c_source.html#l00267">fatal_exit()</a>, and <a class="el" href="testbound_8c_source.html#l00076">MAXARG</a>.</p>

<p>Referenced by <a class="el" href="testbound_8c_source.html#l00210">main()</a>, and <a class="el" href="testbound_8c_source.html#l00126">setup_config()</a>.</p>

</div>
</div><p>
<a class="anchor" name="0ddf1224851353fc92bfbff6f499fa97"></a><!-- doxytag: member="testbound.c::main" ref="0ddf1224851353fc92bfbff6f499fa97" args="(int argc, char *argv[])" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>argv</em>[]</td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Main fake event test program. 
<p>
Setup, teardown and report errors. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>argc,:</em>&nbsp;</td><td>arg count. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>argv,:</em>&nbsp;</td><td>array of commandline arguments. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="testbound_8c_source.html#l00085">add_opts()</a>, <a class="el" href="testbound_8c_source.html#l00058">cfgfile</a>, <a class="el" href="testbound_8c_source.html#l00114">echo_cmdline()</a>, <a class="el" href="fake__event_8c_source.html#l00086">fake_event_cleanup()</a>, <a class="el" href="fake__event_8c_source.html#l00080">fake_event_init()</a>, <a class="el" href="log_8c_source.html#l00267">fatal_exit()</a>, <a class="el" href="log_8c_source.html#l00228">log_info()</a>, <a class="el" href="log_8c_source.html#l00081">log_init()</a>, <a class="el" href="testbound_8c_source.html#l00076">MAXARG</a>, <a class="el" href="unbound_8c.html#db50a0eab9fed92fc3bfc7dfa4f2c410">optarg</a>, <a class="el" href="unbound_8c.html#d5e1c16213bbee2d5e8cc363309f418c">optind</a>, <a class="el" href="testbound_8c_source.html#l00199">remove_configfile()</a>, <a class="el" href="testbound_8c_source.html#l00175">setup_playback()</a>, and <a class="el" href="testbound_8c_source.html#l00062">testbound_usage()</a>.</p>

</div>
</div><p>
<a class="anchor" name="9c04050d7761d1302de6ed9ce599c9fd"></a><!-- doxytag: member="testbound.c::daemon_remote_open_ports" ref="9c04050d7761d1302de6ed9ce599c9fd" args="(struct config_file *cfg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structlisten__port.html">listen_port</a>* daemon_remote_open_ports           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structconfig__file.html">config_file</a> *&nbsp;</td>
          <td class="paramname"> <em>cfg</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Open and create listening ports for remote control. 
<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>cfg,:</em>&nbsp;</td><td>config options. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>list of ports or NULL on failure. can be freed with <a class="el" href="listen__dnsport_8c.html#5cce26477bd2f47503c12ea36cb79814" title="Close and delete the (list of) listening ports.">listening_ports_free()</a>. </dd></dl>

<p>References <a class="el" href="remote_8c_source.html#l00246">add_open()</a>, <a class="el" href="config__file_8h_source.html#l00240">config_file::control_ifs</a>, <a class="el" href="config__file_8h_source.html#l00242">config_file::control_port</a>, <a class="el" href="config__file_8h_source.html#l00069">config_file::do_ip4</a>, <a class="el" href="config__file_8h_source.html#l00071">config_file::do_ip6</a>, <a class="el" href="listen__dnsport_8c_source.html#l00709">listening_ports_free()</a>, <a class="el" href="log_8h_source.html#l00185">log_assert</a>, <a class="el" href="config__file_8h_source.html#l00280">config_strlist::next</a>, <a class="el" href="config__file_8h_source.html#l00238">config_file::remote_control_enable</a>, and <a class="el" href="config__file_8h_source.html#l00282">config_strlist::str</a>.</p>

</div>
</div><p>
<a class="anchor" name="38ce75f597fd29e9c16ca3f6e4995772"></a><!-- doxytag: member="testbound.c::daemon_remote_create" ref="38ce75f597fd29e9c16ca3f6e4995772" args="(struct config_file *cfg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structdaemon__remote.html">daemon_remote</a>* daemon_remote_create           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structconfig__file.html">config_file</a> *&nbsp;</td>
          <td class="paramname"> <em>cfg</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create new remote control state for the <a class="el" href="structdaemon.html" title="Structure holding worker list.">daemon</a>. 
<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>cfg,:</em>&nbsp;</td><td>config file with key file settings. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>new state, or NULL on failure. </dd></dl>

<p>References <a class="el" href="remote_8h_source.html#l00094">daemon_remote::ctx</a>, <a class="el" href="remote_8c_source.html#l00227">daemon_remote_delete()</a>, <a class="el" href="config__file_8c_source.html#l00881">fname_after_chroot()</a>, <a class="el" href="remote_8c_source.html#l00090">log_crypto_err()</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="remote_8h_source.html#l00090">daemon_remote::max_active</a>, <a class="el" href="config__file_8h_source.html#l00238">config_file::remote_control_enable</a>, <a class="el" href="config__file_8h_source.html#l00246">config_file::server_cert_file</a>, <a class="el" href="config__file_8h_source.html#l00244">config_file::server_key_file</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="54a5bd1d8c909682d94cd5a9d29d5f36"></a><!-- doxytag: member="testbound.c::daemon_remote_delete" ref="54a5bd1d8c909682d94cd5a9d29d5f36" args="(struct daemon_remote *rc)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void daemon_remote_delete           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structdaemon__remote.html">daemon_remote</a> *&nbsp;</td>
          <td class="paramname"> <em>rc</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>References <a class="el" href="remote_8h_source.html#l00094">daemon_remote::ctx</a>, and <a class="el" href="remote_8c_source.html#l00205">daemon_remote_clear()</a>.</p>

</div>
</div><p>
<a class="anchor" name="9c33fc4690e14b7e485f9a41f1fb5113"></a><!-- doxytag: member="testbound.c::daemon_remote_clear" ref="9c33fc4690e14b7e485f9a41f1fb5113" args="(struct daemon_remote *rc)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void daemon_remote_clear           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structdaemon__remote.html">daemon_remote</a> *&nbsp;</td>
          <td class="paramname"> <em>rc</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
remote control state to clear up. 
<p>
Busy and accept points are closed. Does not delete the rc itself, or the ssl context (with its keys). <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rc,:</em>&nbsp;</td><td>state to clear. </td></tr>
  </table>
</dl>

<p>References <a class="el" href="remote_8h_source.html#l00086">daemon_remote::accept_list</a>, <a class="el" href="remote_8h_source.html#l00088">daemon_remote::active</a>, <a class="el" href="remote_8h_source.html#l00092">daemon_remote::busy_list</a>, <a class="el" href="remote_8h_source.html#l00066">rc_state::c</a>, <a class="el" href="fake__event_8c_source.html#l01013">comm_point_delete()</a>, <a class="el" href="listen__dnsport_8c_source.html#l00585">listen_list_delete()</a>, <a class="el" href="remote_8h_source.html#l00064">rc_state::next</a>, <a class="el" href="remote_8h_source.html#l00070">rc_state::ssl</a>, and <a class="el" href="remote_8h_source.html#l00084">daemon_remote::worker</a>.</p>

</div>
</div><p>
<a class="anchor" name="b01473810775dd2d8713c4f1bee63b95"></a><!-- doxytag: member="testbound.c::daemon_remote_open_accept" ref="b01473810775dd2d8713c4f1bee63b95" args="(struct daemon_remote *rc, struct listen_port *ports, struct worker *worker)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int daemon_remote_open_accept           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structdaemon__remote.html">daemon_remote</a> *&nbsp;</td>
          <td class="paramname"> <em>rc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structlisten__port.html">listen_port</a> *&nbsp;</td>
          <td class="paramname"> <em>ports</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structworker.html">worker</a> *&nbsp;</td>
          <td class="paramname"> <em>worker</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Setup comm points for accepting remote control connections. 
<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>rc,:</em>&nbsp;</td><td>state </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ports,:</em>&nbsp;</td><td>already opened ports. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a>,:</em>&nbsp;</td><td><a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> with communication base. and links to command channels. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>false on error. </dd></dl>

<p>References <a class="el" href="remote_8c_source.html#l00339">accept_open()</a>, <a class="el" href="listen__dnsport_8h_source.html#l00096">listen_port::fd</a>, <a class="el" href="log_8c_source.html#l00241">log_err()</a>, <a class="el" href="listen__dnsport_8h_source.html#l00094">listen_port::next</a>, and <a class="el" href="remote_8h_source.html#l00084">daemon_remote::worker</a>.</p>

</div>
</div><p>
<a class="anchor" name="18d9e4c0c8d426dc4e754f74c0a82223"></a><!-- doxytag: member="testbound.c::wsvc_command_option" ref="18d9e4c0c8d426dc4e754f74c0a82223" args="(const char *wopt, const char *cfgfile, int v, int c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wsvc_command_option           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>wopt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>cfgfile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>c</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Handle commandline service for 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>wopt,:</em>&nbsp;</td><td>windows option string (install, remove, service). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cfgfile,:</em>&nbsp;</td><td>configfile to open (default or passed with -c). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>v,:</em>&nbsp;</td><td>amount of commandline verbosity added with -v. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c,:</em>&nbsp;</td><td>true if cfgfile was set by commandline -c option. </td></tr>
  </table>
</dl>

<p>Referenced by <a class="el" href="unbound_8c_source.html#l00595">main()</a>.</p>

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

<p>
Setup lead <a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> 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><a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a>,:</em>&nbsp;</td><td>the <a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> </td></tr>
  </table>
</dl>

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

</div>
</div><p>
<a class="anchor" name="1aa589fcc756d3f05201e0f490d4a736"></a><!-- doxytag: member="testbound.c::wsvc_desetup_worker" ref="1aa589fcc756d3f05201e0f490d4a736" args="(struct worker *worker)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wsvc_desetup_worker           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structworker.html">worker</a> *&nbsp;</td>
          <td class="paramname"> <em>worker</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Desetup lead <a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> 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><a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a>,:</em>&nbsp;</td><td>the <a class="el" href="structworker.html" title="Structure holding working information for unbound.">worker</a> </td></tr>
  </table>
</dl>

<p>Referenced by <a class="el" href="worker_8c_source.html#l01115">worker_delete()</a>.</p>

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