Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 29c369053a983cc5d8c880dc6e0a2237 > files > 939

libdtn-devel-2.6.0-2mdv2009.1.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>DTN Reference Implementation: dtn::BundleRouter Class 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.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespacedtn.html">dtn</a>::<a class="el" href="classdtn_1_1BundleRouter.html">BundleRouter</a>
  </div>
</div>
<div class="contents">
<h1>dtn::BundleRouter Class Reference</h1><!-- doxytag: class="dtn::BundleRouter" --><!-- doxytag: inherits="dtn::BundleEventHandler" -->The <a class="el" href="classdtn_1_1BundleRouter.html" title="The BundleRouter is the main decision maker for all routing decisions related to...">BundleRouter</a> is the main decision maker for all routing decisions related to bundles.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="BundleRouter_8h-source.html">BundleRouter.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for dtn::BundleRouter:</div>
<div class="dynsection">

<p><center><img src="classdtn_1_1BundleRouter.png" usemap="#dtn::BundleRouter_map" border="0" alt=""></center>
<map name="dtn::BundleRouter_map">
<area href="classdtn_1_1BundleEventHandler.html" alt="dtn::BundleEventHandler" shape="rect" coords="120,0,271,24">
<area href="classdtn_1_1ProphetRouter.html" alt="dtn::ProphetRouter" shape="rect" coords="0,112,151,136">
<area href="classdtn_1_1TableBasedRouter.html" alt="dtn::TableBasedRouter" shape="rect" coords="241,112,392,136">
<area href="classdtn_1_1DTLSRRouter.html" alt="dtn::DTLSRRouter" shape="rect" coords="0,168,151,192">
<area href="classdtn_1_1FloodBundleRouter.html" alt="dtn::FloodBundleRouter" shape="rect" coords="161,168,312,192">
<area href="classdtn_1_1StaticBundleRouter.html" alt="dtn::StaticBundleRouter" shape="rect" coords="322,168,473,192">
<area href="classdtn_1_1TcaRouter.html" alt="dtn::TcaRouter" shape="rect" coords="483,168,634,192">
</map>
</div>

<p>
<a href="classdtn_1_1BundleRouter-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdtn_1_1BundleRouter_1_1Config.html">Config</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="structdtn_1_1BundleRouter_1_1Config.html" title="Config variables.">Config</a> variables.  <a href="structdtn_1_1BundleRouter_1_1Config.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#ab8365216a5adc94dbdb8f5adc9c18f8">~BundleRouter</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#ab8365216a5adc94dbdb8f5adc9c18f8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#58bdadd6a5f618d44cd4c2084acc707c">initialize</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#8c592e5d57adf8287f2b886ba39d5d93">handle_event</a> (<a class="el" href="classdtn_1_1BundleEvent.html">BundleEvent</a> *event)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pure virtual event handler function (copied from <a class="el" href="classdtn_1_1BundleEventHandler.html" title="Both the BundleDaemon and all the BundleRouter classes need to process the various...">BundleEventHandler</a> for clarity).  <a href="#8c592e5d57adf8287f2b886ba39d5d93"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#47afbf9e1c42ae2cfb396c3895ddca45">accept_bundle</a> (<a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, int *errp)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Synchronous probe indicating whether or not this bundle should be accepted by the system.  <a href="#47afbf9e1c42ae2cfb396c3895ddca45"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#50702bb5cf9c4e2b9be0a7b452c94629">can_delete_bundle</a> (const <a class="el" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1">BundleRef</a> &amp;bundle)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Synchronous probe indicating whether or not this bundle can be deleted by the system.  <a href="#50702bb5cf9c4e2b9be0a7b452c94629"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#4e48a822cf5f7b143cf641d26a12091f">delete_bundle</a> (const <a class="el" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1">BundleRef</a> &amp;bundle)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Synchronous call indicating that the bundle is being deleted from the system and that the router should remove it from any lists where it may be queued.  <a href="#4e48a822cf5f7b143cf641d26a12091f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#a0bfd372d2ae8e1c324e6beae5a31573">get_routing_state</a> (oasys::StringBuffer *<a class="el" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Format the given StringBuffer with current routing info.  <a href="#a0bfd372d2ae8e1c324e6beae5a31573"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#b30e99f427cc0526fce08b77e0ae95c7">should_fwd</a> (const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> &amp;link, <a class="el" href="classdtn_1_1ForwardingInfo.html#18ec95dc1b1b8a7e9df9873a0d9b5947">ForwardingInfo::action_t</a> action=ForwardingInfo::COPY_ACTION)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if the bundle should be forwarded to the given next hop.  <a href="#b30e99f427cc0526fce08b77e0ae95c7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#2083fea1b1c69c671626c6e71ef78d5d">tcl_dump_state</a> (oasys::StringBuffer *<a class="el" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Format the given StringBuffer with a tcl-parsable version of the routing state.  <a href="#2083fea1b1c69c671626c6e71ef78d5d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#b679ffe5062b9bbc936b0e6dd7c6d834">recompute_routes</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hook to force route recomputation from the command interpreter.  <a href="#b679ffe5062b9bbc936b0e6dd7c6d834"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#0862b94502efe0e65fc1a7020532ba96">shutdown</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">for registration with the <a class="el" href="classdtn_1_1BundleDaemon.html" title="Class that handles the basic event / action mechanism.">BundleDaemon</a>  <a href="#0862b94502efe0e65fc1a7020532ba96"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classdtn_1_1BundleRouter.html">BundleRouter</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#deb4dc788d0ca34bfb1e06eb49c42de4">create_router</a> (const char *type)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Factory method to create the correct subclass of <a class="el" href="classdtn_1_1BundleRouter.html" title="The BundleRouter is the main decision maker for all routing decisions related to...">BundleRouter</a> for the registered algorithm type.  <a href="#deb4dc788d0ca34bfb1e06eb49c42de4"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static struct <br class="typebreak">
<a class="el" href="structdtn_1_1BundleRouter_1_1Config.html">dtn::BundleRouter::Config</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#344d85ef64a884adf9fb173a82674cca">config_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="structdtn_1_1BundleRouter_1_1Config.html" title="Config variables.">Config</a> variables.  <a href="#344d85ef64a884adf9fb173a82674cca"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#372135e06860e84c440fd9ee02253ea8">BundleRouter</a> (const char *classname, const std::string &amp;name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#372135e06860e84c440fd9ee02253ea8"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#6e25e98eb6d3a10c75aecd7b7d89e253">name_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Name of this particular router.  <a href="#6e25e98eb6d3a10c75aecd7b7d89e253"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtn_1_1BundleList.html">BundleList</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#06ef6e02e26e9a78a9d15619810d56dc">pending_bundles_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The list of all bundles still pending delivery.  <a href="#06ef6e02e26e9a78a9d15619810d56dc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtn_1_1BundleList.html">BundleList</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#c37671a1e74edfb709e0b0d3ca9ed2d9">custody_bundles_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The list of all bundles that I have custody of.  <a href="#c37671a1e74edfb709e0b0d3ca9ed2d9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtn_1_1BundleActions.html">BundleActions</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BundleRouter.html#cf71e3f1982b36bafa7ac5cd45d38675">actions_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The actions interface, set by the <a class="el" href="classdtn_1_1BundleDaemon.html" title="Class that handles the basic event / action mechanism.">BundleDaemon</a> when the router is initialized.  <a href="#cf71e3f1982b36bafa7ac5cd45d38675"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The <a class="el" href="classdtn_1_1BundleRouter.html" title="The BundleRouter is the main decision maker for all routing decisions related to...">BundleRouter</a> is the main decision maker for all routing decisions related to bundles. 
<p>
It receives events from the <a class="el" href="classdtn_1_1BundleDaemon.html" title="Class that handles the basic event / action mechanism.">BundleDaemon</a> having been posted by other components. These events include all operations and occurrences that may affect bundle delivery, including new bundle arrival, contact arrival, timeouts, etc.<p>
In response to each event the router may call one of the action functions implemented by the <a class="el" href="classdtn_1_1BundleDaemon.html" title="Class that handles the basic event / action mechanism.">BundleDaemon</a>. Note that to support the simulator environment, all interactions with the rest of the system should go through the singleton BundleAction classs.<p>
To support prototyping of different routing protocols and frameworks, the base class has a list of prospective <a class="el" href="classdtn_1_1BundleRouter.html" title="The BundleRouter is the main decision maker for all routing decisions related to...">BundleRouter</a> implementations, and at boot time, one of these is selected as the active routing algorithm. As new algorithms are added to the system, new cases should be added to the "create_router" function. 
<p>Definition at line <a class="el" href="BundleRouter_8h-source.html#l00060">60</a> of file <a class="el" href="BundleRouter_8h-source.html">BundleRouter.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="ab8365216a5adc94dbdb8f5adc9c18f8"></a><!-- doxytag: member="dtn::BundleRouter::~BundleRouter" ref="ab8365216a5adc94dbdb8f5adc9c18f8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dtn::BundleRouter::~BundleRouter           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor. 
<p>

<p>Definition at line <a class="el" href="BundleRouter_8cc-source.html#l00195">195</a> of file <a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a>.</p>

</div>
</div><p>
<a class="anchor" name="372135e06860e84c440fd9ee02253ea8"></a><!-- doxytag: member="dtn::BundleRouter::BundleRouter" ref="372135e06860e84c440fd9ee02253ea8" args="(const char *classname, const std::string &amp;name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dtn::BundleRouter::BundleRouter           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>classname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>name</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>

<p>Definition at line <a class="el" href="BundleRouter_8cc-source.html#l00084">84</a> of file <a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a>.</p>

<p>References <a class="el" href="BundleRouter_8h-source.html#l00204">actions_</a>, <a class="el" href="BundleRouter_8h-source.html#l00200">custody_bundles_</a>, and <a class="el" href="BundleRouter_8h-source.html#l00197">pending_bundles_</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="47afbf9e1c42ae2cfb396c3895ddca45"></a><!-- doxytag: member="dtn::BundleRouter::accept_bundle" ref="47afbf9e1c42ae2cfb396c3895ddca45" args="(Bundle *bundle, int *errp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::BundleRouter::accept_bundle           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>errp</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Synchronous probe indicating whether or not this bundle should be accepted by the system. 
<p>
The default implementation checks if the bundle size will exceed the configured storage quota (if any).<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if the bundle was accepted. if false, then errp is set to a value from <a class="el" href="classdtn_1_1BundleProtocol.html#37b000d94172c06970bb8af32889f917" title="Bundle Status Report &quot;Reason Code&quot; flags.">BundleProtocol::status_report_reason_t</a> </dd></dl>

<p>Reimplemented in <a class="el" href="classdtn_1_1ProphetRouter.html#fdbd79c1f2d0d746ab05de40af7c6a7b">dtn::ProphetRouter</a>.</p>

<p>Definition at line <a class="el" href="BundleRouter_8cc-source.html#l00201">201</a> of file <a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a>.</p>

<p>References <a class="el" href="BundlePayload_8h-source.html#l00077">dtn::BundlePayload::length()</a>, <a class="el" href="bundling_2Bundle_8h-source.html#l00232">dtn::Bundle::payload()</a>, <a class="el" href="BundleStore_8h-source.html#l00076">dtn::BundleStore::payload_quota()</a>, <a class="el" href="BundleProtocol_8h-source.html#l00128">dtn::BundleProtocol::REASON_DEPLETED_STORAGE</a>, and <a class="el" href="BundleStore_8h-source.html#l00078">dtn::BundleStore::total_size()</a>.</p>

<p>Referenced by <a class="el" href="ProphetRouter_8cc-source.html#l00144">dtn::ProphetRouter::accept_bundle()</a>, <a class="el" href="BundleDaemon_8cc-source.html#l00473">dtn::BundleDaemon::handle_bundle_accept()</a>, and <a class="el" href="BundleDaemon_8cc-source.html#l00486">dtn::BundleDaemon::handle_bundle_received()</a>.</p>

</div>
</div><p>
<a class="anchor" name="50702bb5cf9c4e2b9be0a7b452c94629"></a><!-- doxytag: member="dtn::BundleRouter::can_delete_bundle" ref="50702bb5cf9c4e2b9be0a7b452c94629" args="(const BundleRef &amp;bundle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::BundleRouter::can_delete_bundle           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1">BundleRef</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>bundle</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Synchronous probe indicating whether or not this bundle can be deleted by the system. 
<p>
The default implementation returns true if the bundle is queued on more than one list (i.e. the pending bundles list). 
<p>Reimplemented in <a class="el" href="classdtn_1_1DTLSRRouter.html#2820245e08b955fa33bf8b5dbaaca00c">dtn::DTLSRRouter</a>, and <a class="el" href="classdtn_1_1TableBasedRouter.html#feb96189b85d0035ad08874204bdc86b">dtn::TableBasedRouter</a>.</p>

<p>Definition at line <a class="el" href="BundleRouter_8cc-source.html#l00224">224</a> of file <a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a>.</p>

<p>Referenced by <a class="el" href="BundleDaemon_8cc-source.html#l02222">dtn::BundleDaemon::try_to_delete()</a>.</p>

</div>
</div><p>
<a class="anchor" name="deb4dc788d0ca34bfb1e06eb49c42de4"></a><!-- doxytag: member="dtn::BundleRouter::create_router" ref="deb4dc788d0ca34bfb1e06eb49c42de4" args="(const char *type)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1BundleRouter.html">BundleRouter</a> * dtn::BundleRouter::create_router           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>type</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Factory method to create the correct subclass of <a class="el" href="classdtn_1_1BundleRouter.html" title="The BundleRouter is the main decision maker for all routing decisions related to...">BundleRouter</a> for the registered algorithm type. 
<p>

<p>Definition at line <a class="el" href="BundleRouter_8cc-source.html#l00053">53</a> of file <a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a>.</p>

<p>References <a class="el" href="TcaRouter_8h-source.html#l00053">dtn::TcaRouter::TCA_GATEWAY</a>, and <a class="el" href="TcaRouter_8h-source.html#l00053">dtn::TcaRouter::TCA_ROUTER</a>.</p>

<p>Referenced by <a class="el" href="BundleDaemon_8cc-source.html#l02546">dtn::BundleDaemon::run()</a>.</p>

</div>
</div><p>
<a class="anchor" name="4e48a822cf5f7b143cf641d26a12091f"></a><!-- doxytag: member="dtn::BundleRouter::delete_bundle" ref="4e48a822cf5f7b143cf641d26a12091f" args="(const BundleRef &amp;bundle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dtn::BundleRouter::delete_bundle           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1">BundleRef</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>bundle</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Synchronous call indicating that the bundle is being deleted from the system and that the router should remove it from any lists where it may be queued. 
<p>

<p>Reimplemented in <a class="el" href="classdtn_1_1DTLSRRouter.html#819cff8c7468bbcf0fe6ec13f386e7e0">dtn::DTLSRRouter</a>, and <a class="el" href="classdtn_1_1TableBasedRouter.html#469390b9ba77d858ed51d5d80176407e">dtn::TableBasedRouter</a>.</p>

<p>Definition at line <a class="el" href="BundleRouter_8cc-source.html#l00239">239</a> of file <a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a>.</p>

<p>Referenced by <a class="el" href="BundleDaemon_8cc-source.html#l02265">dtn::BundleDaemon::delete_bundle()</a>.</p>

</div>
</div><p>
<a class="anchor" name="a0bfd372d2ae8e1c324e6beae5a31573"></a><!-- doxytag: member="dtn::BundleRouter::get_routing_state" ref="a0bfd372d2ae8e1c324e6beae5a31573" args="(oasys::StringBuffer *buf)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void dtn::BundleRouter::get_routing_state           </td>
          <td>(</td>
          <td class="paramtype">oasys::StringBuffer *&nbsp;</td>
          <td class="paramname"> <em>buf</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Format the given StringBuffer with current routing info. 
<p>

<p>Implemented in <a class="el" href="classdtn_1_1DTLSRRouter.html#3f070b730307f39d2febe44628495606">dtn::DTLSRRouter</a>, <a class="el" href="classdtn_1_1ProphetRouter.html#490806ff616e7d4695f14ada5ec17f2e">dtn::ProphetRouter</a>, and <a class="el" href="classdtn_1_1TableBasedRouter.html#c7e05bea7fada765cb85bc589e8fe9ab">dtn::TableBasedRouter</a>.</p>

<p>Referenced by <a class="el" href="BundleDaemon_8cc-source.html#l00180">dtn::BundleDaemon::get_routing_state()</a>.</p>

</div>
</div><p>
<a class="anchor" name="8c592e5d57adf8287f2b886ba39d5d93"></a><!-- doxytag: member="dtn::BundleRouter::handle_event" ref="8c592e5d57adf8287f2b886ba39d5d93" args="(BundleEvent *event)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void dtn::BundleRouter::handle_event           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BundleEvent.html">BundleEvent</a> *&nbsp;</td>
          <td class="paramname"> <em>event</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pure virtual event handler function (copied from <a class="el" href="classdtn_1_1BundleEventHandler.html" title="Both the BundleDaemon and all the BundleRouter classes need to process the various...">BundleEventHandler</a> for clarity). 
<p>

<p>Implements <a class="el" href="classdtn_1_1BundleEventHandler.html#792145d879547bde5c1f4a767eb5615b">dtn::BundleEventHandler</a>.</p>

<p>Implemented in <a class="el" href="classdtn_1_1ProphetRouter.html#d8879a4475b92ace92406c197705e052">dtn::ProphetRouter</a>, and <a class="el" href="classdtn_1_1TableBasedRouter.html#0a41a70c82d3a58ec0fc044dbe99dfe9">dtn::TableBasedRouter</a>.</p>

<p>Referenced by <a class="el" href="BundleDaemon_8cc-source.html#l02393">dtn::BundleDaemon::handle_event()</a>.</p>

</div>
</div><p>
<a class="anchor" name="58bdadd6a5f618d44cd4c2084acc707c"></a><!-- doxytag: member="dtn::BundleRouter::initialize" ref="58bdadd6a5f618d44cd4c2084acc707c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dtn::BundleRouter::initialize           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Reimplemented in <a class="el" href="classdtn_1_1DTLSRRouter.html#525e06e163b70b76792ea4ad4f08f23c">dtn::DTLSRRouter</a>, <a class="el" href="classdtn_1_1FloodBundleRouter.html#c64fdfc35227035b64312f6271317381">dtn::FloodBundleRouter</a>, and <a class="el" href="classdtn_1_1ProphetRouter.html#304a0bf554ed47ef4859269a85282e07">dtn::ProphetRouter</a>.</p>

<p>Definition at line <a class="el" href="BundleRouter_8cc-source.html#l00190">190</a> of file <a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a>.</p>

<p>Referenced by <a class="el" href="sim_2Node_8cc-source.html#l00121">dtnsim::Node::configure()</a>, and <a class="el" href="BundleDaemon_8cc-source.html#l02546">dtn::BundleDaemon::run()</a>.</p>

</div>
</div><p>
<a class="anchor" name="b679ffe5062b9bbc936b0e6dd7c6d834"></a><!-- doxytag: member="dtn::BundleRouter::recompute_routes" ref="b679ffe5062b9bbc936b0e6dd7c6d834" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dtn::BundleRouter::recompute_routes           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Hook to force route recomputation from the command interpreter. 
<p>
The default implementation does nothing. 
<p>Reimplemented in <a class="el" href="classdtn_1_1DTLSRRouter.html#526947e56ad2813e93b07ba2c4ce1aca">dtn::DTLSRRouter</a>, and <a class="el" href="classdtn_1_1TableBasedRouter.html#7339ab822d11b9cf8c83ae608e79058e">dtn::TableBasedRouter</a>.</p>

<p>Definition at line <a class="el" href="BundleRouter_8cc-source.html#l00253">253</a> of file <a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a>.</p>

</div>
</div><p>
<a class="anchor" name="b30e99f427cc0526fce08b77e0ae95c7"></a><!-- doxytag: member="dtn::BundleRouter::should_fwd" ref="b30e99f427cc0526fce08b77e0ae95c7" args="(const Bundle *bundle, const LinkRef &amp;link, ForwardingInfo::action_t action=ForwardingInfo::COPY_ACTION)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::BundleRouter::should_fwd           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1ForwardingInfo.html#18ec95dc1b1b8a7e9df9873a0d9b5947">ForwardingInfo::action_t</a>&nbsp;</td>
          <td class="paramname"> <em>action</em> = <code>ForwardingInfo::COPY_ACTION</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Check if the bundle should be forwarded to the given next hop. 
<p>
Reasons why it would not be forwarded include that it was already transmitted or is currently in flight on the link, or that the route indicates <a class="el" href="classdtn_1_1ForwardingInfo.html#18ec95dc1b1b8a7e9df9873a0d9b59471efad47dbf6015f5e4458ac355eabbaa" title="Forward the bundle to only this next hop.">ForwardingInfo::FORWARD_ACTION</a> and it is already in flight on another route. 
<p>Definition at line <a class="el" href="BundleRouter_8cc-source.html#l00099">99</a> of file <a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a>.</p>

<p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="bundling_2Bundle_8h-source.html#l00201">dtn::Bundle::bundleid()</a>, <a class="el" href="dtnping_8c-source.html#l00045">count</a>, <a class="el" href="ForwardingInfo_8h-source.html#l00045">dtn::ForwardingInfo::FORWARD_ACTION</a>, <a class="el" href="bundling_2Bundle_8h-source.html#l00233">dtn::Bundle::fwdlog()</a>, <a class="el" href="ForwardingLog_8cc-source.html#l00133">dtn::ForwardingLog::get_count()</a>, <a class="el" href="ForwardingLog_8cc-source.html#l00037">dtn::ForwardingLog::get_latest_entry()</a>, <a class="el" href="dtncat_8c-source.html#l00085">info</a>, <a class="el" href="ForwardingInfo_8h-source.html#l00070">dtn::ForwardingInfo::NONE</a>, <a class="el" href="EndpointID_8h-source.html#l00358">dtn::EndpointID::NULL_EID()</a>, <a class="el" href="ForwardingInfo_8h-source.html#l00071">dtn::ForwardingInfo::QUEUED</a>, <a class="el" href="bundling_2Bundle_8h-source.html#l00213">dtn::Bundle::singleton_dest()</a>, <a class="el" href="ForwardingInfo_8h-source.html#l00158">dtn::ForwardingInfo::state()</a>, <a class="el" href="ForwardingInfo_8h-source.html#l00087">dtn::ForwardingInfo::state_to_str()</a>, <a class="el" href="ForwardingInfo_8h-source.html#l00077">dtn::ForwardingInfo::SUPPRESSED</a>, and <a class="el" href="ForwardingInfo_8h-source.html#l00072">dtn::ForwardingInfo::TRANSMITTED</a>.</p>

<p>Referenced by <a class="el" href="TableBasedRouter_8cc-source.html#l00802">dtn::TableBasedRouter::check_next_hop()</a>, and <a class="el" href="ProphetBundleCore_8cc-source.html#l00081">dtn::ProphetBundleCore::should_fwd()</a>.</p>

</div>
</div><p>
<a class="anchor" name="0862b94502efe0e65fc1a7020532ba96"></a><!-- doxytag: member="dtn::BundleRouter::shutdown" ref="0862b94502efe0e65fc1a7020532ba96" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dtn::BundleRouter::shutdown           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
for registration with the <a class="el" href="classdtn_1_1BundleDaemon.html" title="Class that handles the basic event / action mechanism.">BundleDaemon</a> 
<p>

<p>Reimplemented in <a class="el" href="classdtn_1_1ProphetRouter.html#a920b30dda10ae715f859d808a7d32d1">dtn::ProphetRouter</a>.</p>

<p>Definition at line <a class="el" href="BundleRouter_8cc-source.html#l00259">259</a> of file <a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a>.</p>

</div>
</div><p>
<a class="anchor" name="2083fea1b1c69c671626c6e71ef78d5d"></a><!-- doxytag: member="dtn::BundleRouter::tcl_dump_state" ref="2083fea1b1c69c671626c6e71ef78d5d" args="(oasys::StringBuffer *buf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dtn::BundleRouter::tcl_dump_state           </td>
          <td>(</td>
          <td class="paramtype">oasys::StringBuffer *&nbsp;</td>
          <td class="paramname"> <em>buf</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Format the given StringBuffer with a tcl-parsable version of the routing state. 
<p>
The expected format is:<p>
{ {dest_eid1 nexthop_link1 [params]} {dest_eid2 nexthop_link2 [params]} }<p>
where [params] is a var val list. 
<p>Reimplemented in <a class="el" href="classdtn_1_1TableBasedRouter.html#b84236fc3f6862121bb83088b2e35d42">dtn::TableBasedRouter</a>.</p>

<p>Definition at line <a class="el" href="BundleRouter_8cc-source.html#l00246">246</a> of file <a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a>.</p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="cf71e3f1982b36bafa7ac5cd45d38675"></a><!-- doxytag: member="dtn::BundleRouter::actions_" ref="cf71e3f1982b36bafa7ac5cd45d38675" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1BundleActions.html">BundleActions</a>* <a class="el" href="classdtn_1_1BundleRouter.html#cf71e3f1982b36bafa7ac5cd45d38675">dtn::BundleRouter::actions_</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The actions interface, set by the <a class="el" href="classdtn_1_1BundleDaemon.html" title="Class that handles the basic event / action mechanism.">BundleDaemon</a> when the router is initialized. 
<p>

<p>Definition at line <a class="el" href="BundleRouter_8h-source.html#l00204">204</a> of file <a class="el" href="BundleRouter_8h-source.html">BundleRouter.h</a>.</p>

<p>Referenced by <a class="el" href="BundleRouter_8cc-source.html#l00084">BundleRouter()</a>, <a class="el" href="TableBasedRouter_8cc-source.html#l00802">dtn::TableBasedRouter::check_next_hop()</a>, <a class="el" href="TableBasedRouter_8cc-source.html#l00670">dtn::TableBasedRouter::fwd_to_nexthop()</a>, <a class="el" href="TableBasedRouter_8cc-source.html#l00556">dtn::TableBasedRouter::handle_link_available()</a>, <a class="el" href="ProphetRouter_8cc-source.html#l00297">dtn::ProphetRouter::handle_link_available()</a>, <a class="el" href="ProphetRouter_8cc-source.html#l00055">dtn::ProphetRouter::initialize()</a>, and <a class="el" href="TableBasedRouter_8cc-source.html#l00520">dtn::TableBasedRouter::reroute_bundles()</a>.</p>

</div>
</div><p>
<a class="anchor" name="344d85ef64a884adf9fb173a82674cca"></a><!-- doxytag: member="dtn::BundleRouter::config_" ref="344d85ef64a884adf9fb173a82674cca" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structdtn_1_1BundleRouter_1_1Config.html">BundleRouter::Config</a> <a class="el" href="classdtn_1_1BundleRouter.html#344d85ef64a884adf9fb173a82674cca">dtn::BundleRouter::config_</a><code> [static]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<a class="el" href="structdtn_1_1BundleRouter_1_1Config.html" title="Config variables.">Config</a> variables. 
<p>
These must be static since they're set by the config parser before any router objects are created. 
<p>Definition at line <a class="el" href="BundleRouter_8cc-source.html#l00049">49</a> of file <a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a>.</p>

<p>Referenced by <a class="el" href="TableBasedRouter_8cc-source.html#l00394">dtn::TableBasedRouter::add_nexthop_route()</a>, <a class="el" href="DTLSRRouter_8cc-source.html#l00169">dtn::DTLSRRouter::DTLSRRouter()</a>, <a class="el" href="RouteTable_8cc-source.html#l00126">dtn::RouteTable::get_matching_helper()</a>, <a class="el" href="TableBasedRouter_8cc-source.html#l00556">dtn::TableBasedRouter::handle_link_available()</a>, <a class="el" href="FloodBundleRouter_8cc-source.html#l00047">dtn::FloodBundleRouter::initialize()</a>, <a class="el" href="RouteCommand_8cc-source.html#l00040">dtn::RouteCommand::RouteCommand()</a>, <a class="el" href="BundleDaemon_8cc-source.html#l02546">dtn::BundleDaemon::run()</a>, and <a class="el" href="TableBasedRouter_8cc-source.html#l01038">dtn::TableBasedRouter::subscribe_to_session()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c37671a1e74edfb709e0b0d3ca9ed2d9"></a><!-- doxytag: member="dtn::BundleRouter::custody_bundles_" ref="c37671a1e74edfb709e0b0d3ca9ed2d9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1BundleList.html">BundleList</a>* <a class="el" href="classdtn_1_1BundleRouter.html#c37671a1e74edfb709e0b0d3ca9ed2d9">dtn::BundleRouter::custody_bundles_</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The list of all bundles that I have custody of. 
<p>

<p>Definition at line <a class="el" href="BundleRouter_8h-source.html#l00200">200</a> of file <a class="el" href="BundleRouter_8h-source.html">BundleRouter.h</a>.</p>

<p>Referenced by <a class="el" href="BundleRouter_8cc-source.html#l00084">BundleRouter()</a>.</p>

</div>
</div><p>
<a class="anchor" name="6e25e98eb6d3a10c75aecd7b7d89e253"></a><!-- doxytag: member="dtn::BundleRouter::name_" ref="6e25e98eb6d3a10c75aecd7b7d89e253" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string <a class="el" href="classdtn_1_1BundleRouter.html#6e25e98eb6d3a10c75aecd7b7d89e253">dtn::BundleRouter::name_</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Name of this particular router. 
<p>

<p>Definition at line <a class="el" href="BundleRouter_8h-source.html#l00194">194</a> of file <a class="el" href="BundleRouter_8h-source.html">BundleRouter.h</a>.</p>

<p>Referenced by <a class="el" href="TableBasedRouter_8cc-source.html#l00622">dtn::TableBasedRouter::get_routing_state()</a>.</p>

</div>
</div><p>
<a class="anchor" name="06ef6e02e26e9a78a9d15619810d56dc"></a><!-- doxytag: member="dtn::BundleRouter::pending_bundles_" ref="06ef6e02e26e9a78a9d15619810d56dc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1BundleList.html">BundleList</a>* <a class="el" href="classdtn_1_1BundleRouter.html#06ef6e02e26e9a78a9d15619810d56dc">dtn::BundleRouter::pending_bundles_</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The list of all bundles still pending delivery. 
<p>

<p>Definition at line <a class="el" href="BundleRouter_8h-source.html#l00197">197</a> of file <a class="el" href="BundleRouter_8h-source.html">BundleRouter.h</a>.</p>

<p>Referenced by <a class="el" href="BundleRouter_8cc-source.html#l00084">BundleRouter()</a>, and <a class="el" href="TableBasedRouter_8cc-source.html#l00880">dtn::TableBasedRouter::reroute_all_bundles()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="BundleRouter_8h-source.html">BundleRouter.h</a><li><a class="el" href="BundleRouter_8cc-source.html">BundleRouter.cc</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 30 09:27:04 2009 for DTN Reference Implementation by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>