Sophie

Sophie

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

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::RegistrationTable 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_1RegistrationTable.html">RegistrationTable</a>
  </div>
</div>
<div class="contents">
<h1>dtn::RegistrationTable Class Reference</h1><!-- doxytag: class="dtn::RegistrationTable" -->Class for the in-memory registration table.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="RegistrationTable_8h-source.html">RegistrationTable.h</a>&gt;</code>
<p>

<p>
<a href="classdtn_1_1RegistrationTable-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public 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_1RegistrationTable.html#af4beff82d6e382450c73c9edc43701b">RegistrationTable</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#af4beff82d6e382450c73c9edc43701b"></a><br></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_1RegistrationTable.html#16488511e204ac625a9d2a5fde3f6e61">~RegistrationTable</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#16488511e204ac625a9d2a5fde3f6e61"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RegistrationTable.html#a360f9cc20ad946876613e0747211ef0">add</a> (<a class="el" href="classdtn_1_1Registration.html">Registration</a> *reg, <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> add_to_store=true)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a new registration to the database.  <a href="#a360f9cc20ad946876613e0747211ef0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtn_1_1Registration.html">Registration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RegistrationTable.html#f8d5a24ad0b05ab853f80cfea3a1fce1">get</a> (u_int32_t <a class="el" href="dtnsend_8cc.html#8eb0c3e35c1feb7baf9802f03bf42e41">regid</a>) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Look up a matching registration.  <a href="#f8d5a24ad0b05ab853f80cfea3a1fce1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtn_1_1Registration.html">Registration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RegistrationTable.html#9562c665cfcf6086bee94c468ec03242">get</a> (const <a class="el" href="classdtn_1_1EndpointIDPattern.html">EndpointIDPattern</a> &amp;eid) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Look up the first matching registration for the exact endpoint id pattern given.  <a href="#9562c665cfcf6086bee94c468ec03242"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RegistrationTable.html#e69fe9f82af4c5a16973881693d450f1">del</a> (u_int32_t <a class="el" href="dtnsend_8cc.html#8eb0c3e35c1feb7baf9802f03bf42e41">regid</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove the registration from the database, returns true if successful, false if the registration didn't exist.  <a href="#e69fe9f82af4c5a16973881693d450f1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RegistrationTable.html#48ccc6929f57ab9f00f5bba509947023">update</a> (<a class="el" href="classdtn_1_1Registration.html">Registration</a> *reg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Update the registration in the database.  <a href="#48ccc6929f57ab9f00f5bba509947023"></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="classdtn_1_1RegistrationTable.html#334df3b83d924f97cc547f39372380ed">get_matching</a> (const <a class="el" href="classdtn_1_1EndpointID.html">EndpointID</a> &amp;eid, <a class="el" href="classdtn_1_1RegistrationList.html">RegistrationList</a> *reg_list) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Populate the given reglist with all registrations with an endpoint id that matches the bundle demux string.  <a href="#334df3b83d924f97cc547f39372380ed"></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="classdtn_1_1RegistrationTable.html#59930c19d0cf404a8841b150b37c10a3">delete_expired</a> (const time_t now)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete any expired registrations.  <a href="#59930c19d0cf404a8841b150b37c10a3"></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="classdtn_1_1RegistrationTable.html#821a1182a88b6ec542b37e84d91a11f5">dump</a> (oasys::StringBuffer *<a class="el" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dump out the registration database.  <a href="#821a1182a88b6ec542b37e84d91a11f5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classdtn_1_1RegistrationList.html">RegistrationList</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RegistrationTable.html#a68725299a77648d031a899971ba925f">reg_list</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the routing table.  <a href="#a68725299a77648d031a899971ba925f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">oasys::Lock *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RegistrationTable.html#3977a6ef969e1fee4eabb671e818091b">lock</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Accessor for the <a class="el" href="classdtn_1_1RouteTable.html" title="Class that implements the routing table, implemented with an stl vector.">RouteTable</a> internal lock.  <a href="#3977a6ef969e1fee4eabb671e818091b"></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"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RegistrationTable.html#289b6a4a94f7fd6e594c2e4c89963ff4">find</a> (u_int32_t <a class="el" href="dtnsend_8cc.html#8eb0c3e35c1feb7baf9802f03bf42e41">regid</a>, RegistrationList::iterator *iter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal method to find the location of the given registration.  <a href="#289b6a4a94f7fd6e594c2e4c89963ff4"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classdtn_1_1RegistrationList.html">RegistrationList</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RegistrationTable.html#7a347619e854aff4f8f480686bf906eb">reglist_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">All registrations are tabled in-memory in a flat list.  <a href="#7a347619e854aff4f8f480686bf906eb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">oasys::SpinLock&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RegistrationTable.html#613157369bb6dbf59c209a94d6e6bfff">lock_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Lock to protect internal data structures.  <a href="#613157369bb6dbf59c209a94d6e6bfff"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Class for the in-memory registration table. 
<p>
All changes to the table are made persistent via the <a class="el" href="classdtn_1_1RegistrationStore.html" title="The class for registration storage is simply an instantiation of the generic oasys...">RegistrationStore</a>. 
<p>Definition at line <a class="el" href="RegistrationTable_8h-source.html#l00032">32</a> of file <a class="el" href="RegistrationTable_8h-source.html">RegistrationTable.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="af4beff82d6e382450c73c9edc43701b"></a><!-- doxytag: member="dtn::RegistrationTable::RegistrationTable" ref="af4beff82d6e382450c73c9edc43701b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dtn::RegistrationTable::RegistrationTable           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>

<p>Definition at line <a class="el" href="RegistrationTable_8cc-source.html#l00030">30</a> of file <a class="el" href="RegistrationTable_8cc-source.html">RegistrationTable.cc</a>.</p>

</div>
</div><p>
<a class="anchor" name="16488511e204ac625a9d2a5fde3f6e61"></a><!-- doxytag: member="dtn::RegistrationTable::~RegistrationTable" ref="16488511e204ac625a9d2a5fde3f6e61" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dtn::RegistrationTable::~RegistrationTable           </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="RegistrationTable_8cc-source.html#l00036">36</a> of file <a class="el" href="RegistrationTable_8cc-source.html">RegistrationTable.cc</a>.</p>

<p>References <a class="el" href="RegistrationTable_8h-source.html#l00120">reglist_</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a360f9cc20ad946876613e0747211ef0"></a><!-- doxytag: member="dtn::RegistrationTable::add" ref="a360f9cc20ad946876613e0747211ef0" args="(Registration *reg, bool add_to_store=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::RegistrationTable::add           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdtn_1_1Registration.html">Registration</a> *&nbsp;</td>
          <td class="paramname"> <em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td>
          <td class="paramname"> <em>add_to_store</em> = <code>true</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a new registration to the database. 
<p>
Returns true if the registration is successfully added, false if there's another registration with the same {endpoint,regid}.<p>
The flag controls whether or not the registration is added to the persistent store, which is only done for registrations added from the RPC interface. 
<p>Definition at line <a class="el" href="RegistrationTable_8cc-source.html#l00096">96</a> of file <a class="el" href="RegistrationTable_8cc-source.html">RegistrationTable.cc</a>.</p>

<p>References <a class="el" href="EndpointID_8h-source.html#l00264">dtn::EndpointID::c_str()</a>, <a class="el" href="Registration_8h-source.html#l00115">dtn::Registration::endpoint()</a>, <a class="el" href="RegistrationTable_8h-source.html#l00125">lock_</a>, <a class="el" href="Registration_8h-source.html#l00056">dtn::Registration::MAX_RESERVED_REGID</a>, <a class="el" href="Registration_8h-source.html#l00114">dtn::Registration::regid()</a>, and <a class="el" href="RegistrationTable_8h-source.html#l00120">reglist_</a>.</p>

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

</div>
</div><p>
<a class="anchor" name="e69fe9f82af4c5a16973881693d450f1"></a><!-- doxytag: member="dtn::RegistrationTable::del" ref="e69fe9f82af4c5a16973881693d450f1" args="(u_int32_t regid)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::RegistrationTable::del           </td>
          <td>(</td>
          <td class="paramtype">u_int32_t&nbsp;</td>
          <td class="paramname"> <em>regid</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove the registration from the database, returns true if successful, false if the registration didn't exist. 
<p>

<p>Definition at line <a class="el" href="RegistrationTable_8cc-source.html#l00130">130</a> of file <a class="el" href="RegistrationTable_8cc-source.html">RegistrationTable.cc</a>.</p>

<p>References <a class="el" href="RegistrationTable_8cc-source.html#l00046">find()</a>, <a class="el" href="RegistrationTable_8h-source.html#l00125">lock_</a>, and <a class="el" href="RegistrationTable_8h-source.html#l00120">reglist_</a>.</p>

<p>Referenced by <a class="el" href="BundleDaemon_8cc-source.html#l01337">dtn::BundleDaemon::handle_registration_expired()</a>, and <a class="el" href="BundleDaemon_8cc-source.html#l01320">dtn::BundleDaemon::handle_registration_removed()</a>.</p>

</div>
</div><p>
<a class="anchor" name="59930c19d0cf404a8841b150b37c10a3"></a><!-- doxytag: member="dtn::RegistrationTable::delete_expired" ref="59930c19d0cf404a8841b150b37c10a3" args="(const time_t now)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int dtn::RegistrationTable::delete_expired           </td>
          <td>(</td>
          <td class="paramtype">const time_t&nbsp;</td>
          <td class="paramname"> <em>now</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete any expired registrations. 
<p>
(was sweepOldRegistrations) 
</div>
</div><p>
<a class="anchor" name="821a1182a88b6ec542b37e84d91a11f5"></a><!-- doxytag: member="dtn::RegistrationTable::dump" ref="821a1182a88b6ec542b37e84d91a11f5" args="(oasys::StringBuffer *buf) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dtn::RegistrationTable::dump           </td>
          <td>(</td>
          <td class="paramtype">oasys::StringBuffer *&nbsp;</td>
          <td class="paramname"> <em>buf</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Dump out the registration database. 
<p>

<p>Definition at line <a class="el" href="RegistrationTable_8cc-source.html#l00211">211</a> of file <a class="el" href="RegistrationTable_8cc-source.html">RegistrationTable.cc</a>.</p>

<p>References <a class="el" href="RegistrationTable_8h-source.html#l00125">lock_</a>, and <a class="el" href="RegistrationTable_8h-source.html#l00120">reglist_</a>.</p>

<p>Referenced by <a class="el" href="NodeCommand_8cc-source.html#l00049">dtnsim::NodeCommand::exec()</a>.</p>

</div>
</div><p>
<a class="anchor" name="289b6a4a94f7fd6e594c2e4c89963ff4"></a><!-- doxytag: member="dtn::RegistrationTable::find" ref="289b6a4a94f7fd6e594c2e4c89963ff4" args="(u_int32_t regid, RegistrationList::iterator *iter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::RegistrationTable::find           </td>
          <td>(</td>
          <td class="paramtype">u_int32_t&nbsp;</td>
          <td class="paramname"> <em>regid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RegistrationList::iterator *&nbsp;</td>
          <td class="paramname"> <em>iter</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>
Internal method to find the location of the given registration. 
<p>

<p>Definition at line <a class="el" href="RegistrationTable_8cc-source.html#l00046">46</a> of file <a class="el" href="RegistrationTable_8cc-source.html">RegistrationTable.cc</a>.</p>

<p>References <a class="el" href="Registration_8h-source.html#l00114">dtn::Registration::regid()</a>, and <a class="el" href="RegistrationTable_8h-source.html#l00120">reglist_</a>.</p>

<p>Referenced by <a class="el" href="RegistrationTable_8cc-source.html#l00130">del()</a>, and <a class="el" href="RegistrationTable_8cc-source.html#l00063">get()</a>.</p>

</div>
</div><p>
<a class="anchor" name="9562c665cfcf6086bee94c468ec03242"></a><!-- doxytag: member="dtn::RegistrationTable::get" ref="9562c665cfcf6086bee94c468ec03242" args="(const EndpointIDPattern &amp;eid) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1Registration.html">Registration</a> * dtn::RegistrationTable::get           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1EndpointIDPattern.html">EndpointIDPattern</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>eid</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Look up the first matching registration for the exact endpoint id pattern given. 
<p>

<p>Definition at line <a class="el" href="RegistrationTable_8cc-source.html#l00079">79</a> of file <a class="el" href="RegistrationTable_8cc-source.html">RegistrationTable.cc</a>.</p>

<p>References <a class="el" href="Registration_8h-source.html#l00115">dtn::Registration::endpoint()</a>, <a class="el" href="EndpointID_8h-source.html#l00126">dtn::EndpointID::equals()</a>, and <a class="el" href="RegistrationTable_8h-source.html#l00120">reglist_</a>.</p>

</div>
</div><p>
<a class="anchor" name="f8d5a24ad0b05ab853f80cfea3a1fce1"></a><!-- doxytag: member="dtn::RegistrationTable::get" ref="f8d5a24ad0b05ab853f80cfea3a1fce1" args="(u_int32_t regid) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1Registration.html">Registration</a> * dtn::RegistrationTable::get           </td>
          <td>(</td>
          <td class="paramtype">u_int32_t&nbsp;</td>
          <td class="paramname"> <em>regid</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Look up a matching registration. 
<p>

<p>Definition at line <a class="el" href="RegistrationTable_8cc-source.html#l00063">63</a> of file <a class="el" href="RegistrationTable_8cc-source.html">RegistrationTable.cc</a>.</p>

<p>References <a class="el" href="RegistrationTable_8cc-source.html#l00046">find()</a>, and <a class="el" href="RegistrationTable_8h-source.html#l00125">lock_</a>.</p>

<p>Referenced by <a class="el" href="RegistrationCommand_8cc-source.html#l00048">dtn::RegistrationCommand::exec()</a>, <a class="el" href="NodeCommand_8cc-source.html#l00049">dtnsim::NodeCommand::exec()</a>, <a class="el" href="BundleCommand_8cc-source.html#l00112">dtn::BundleCommand::exec()</a>, <a class="el" href="APIServer_8cc-source.html#l00685">dtn::APIClient::handle_bind()</a>, <a class="el" href="BundleDaemon_8cc-source.html#l01159">dtn::BundleDaemon::handle_bundle_inject()</a>, <a class="el" href="BundleDaemon_8cc-source.html#l01337">dtn::BundleDaemon::handle_registration_expired()</a>, <a class="el" href="APIServer_8cc-source.html#l00776">dtn::APIClient::handle_send()</a>, and <a class="el" href="APIServer_8cc-source.html#l00727">dtn::APIClient::handle_unbind()</a>.</p>

</div>
</div><p>
<a class="anchor" name="334df3b83d924f97cc547f39372380ed"></a><!-- doxytag: member="dtn::RegistrationTable::get_matching" ref="334df3b83d924f97cc547f39372380ed" args="(const EndpointID &amp;eid, RegistrationList *reg_list) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int dtn::RegistrationTable::get_matching           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1EndpointID.html">EndpointID</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>eid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1RegistrationList.html">RegistrationList</a> *&nbsp;</td>
          <td class="paramname"> <em>reg_list</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Populate the given reglist with all registrations with an endpoint id that matches the bundle demux string. 
<p>
Returns the count of matching registrations. 
<p>Definition at line <a class="el" href="RegistrationTable_8cc-source.html#l00182">182</a> of file <a class="el" href="RegistrationTable_8cc-source.html">RegistrationTable.cc</a>.</p>

<p>References <a class="el" href="EndpointID_8h-source.html#l00264">dtn::EndpointID::c_str()</a>, <a class="el" href="dtnping_8c-source.html#l00045">count</a>, <a class="el" href="Registration_8h-source.html#l00115">dtn::Registration::endpoint()</a>, <a class="el" href="RegistrationTable_8h-source.html#l00125">lock_</a>, <a class="el" href="EndpointID_8cc-source.html#l00197">dtn::EndpointIDPattern::match()</a>, <a class="el" href="Registration_8h-source.html#l00114">dtn::Registration::regid()</a>, and <a class="el" href="RegistrationTable_8h-source.html#l00120">reglist_</a>.</p>

<p>Referenced by <a class="el" href="BundleDaemon_8cc-source.html#l00442">dtn::BundleDaemon::check_and_deliver_to_registrations()</a>, <a class="el" href="BundleDaemon_8cc-source.html#l00420">dtn::BundleDaemon::check_local_delivery()</a>, and <a class="el" href="APIServer_8cc-source.html#l00776">dtn::APIClient::handle_send()</a>.</p>

</div>
</div><p>
<a class="anchor" name="3977a6ef969e1fee4eabb671e818091b"></a><!-- doxytag: member="dtn::RegistrationTable::lock" ref="3977a6ef969e1fee4eabb671e818091b" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">oasys::Lock* dtn::RegistrationTable::lock           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Accessor for the <a class="el" href="classdtn_1_1RouteTable.html" title="Class that implements the routing table, implemented with an stl vector.">RouteTable</a> internal lock. 
<p>

<p>Definition at line <a class="el" href="RegistrationTable_8h-source.html#l00107">107</a> of file <a class="el" href="RegistrationTable_8h-source.html">RegistrationTable.h</a>.</p>

<p>References <a class="el" href="RegistrationTable_8h-source.html#l00125">lock_</a>.</p>

</div>
</div><p>
<a class="anchor" name="a68725299a77648d031a899971ba925f"></a><!-- doxytag: member="dtn::RegistrationTable::reg_list" ref="a68725299a77648d031a899971ba925f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classdtn_1_1RegistrationList.html">RegistrationList</a> * dtn::RegistrationTable::reg_list           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the routing table. 
<p>
Asserts that the <a class="el" href="classdtn_1_1RegistrationTable.html" title="Class for the in-memory registration table.">RegistrationTable</a> spin lock is held by the caller. 
<p>Definition at line <a class="el" href="RegistrationTable_8cc-source.html#l00227">227</a> of file <a class="el" href="RegistrationTable_8cc-source.html">RegistrationTable.cc</a>.</p>

<p>References <a class="el" href="RegistrationTable_8h-source.html#l00125">lock_</a>, and <a class="el" href="RegistrationTable_8h-source.html#l00120">reglist_</a>.</p>

</div>
</div><p>
<a class="anchor" name="48ccc6929f57ab9f00f5bba509947023"></a><!-- doxytag: member="dtn::RegistrationTable::update" ref="48ccc6929f57ab9f00f5bba509947023" args="(Registration *reg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::RegistrationTable::update           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdtn_1_1Registration.html">Registration</a> *&nbsp;</td>
          <td class="paramname"> <em>reg</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Update the registration in the database. 
<p>
Returns true on success, false on error. 
<p>Definition at line <a class="el" href="RegistrationTable_8cc-source.html#l00157">157</a> of file <a class="el" href="RegistrationTable_8cc-source.html">RegistrationTable.cc</a>.</p>

<p>References <a class="el" href="EndpointID_8h-source.html#l00264">dtn::EndpointID::c_str()</a>, <a class="el" href="Registration_8h-source.html#l00115">dtn::Registration::endpoint()</a>, <a class="el" href="RegistrationTable_8h-source.html#l00125">lock_</a>, and <a class="el" href="Registration_8h-source.html#l00114">dtn::Registration::regid()</a>.</p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="613157369bb6dbf59c209a94d6e6bfff"></a><!-- doxytag: member="dtn::RegistrationTable::lock_" ref="613157369bb6dbf59c209a94d6e6bfff" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">oasys::SpinLock <a class="el" href="classdtn_1_1RegistrationTable.html#613157369bb6dbf59c209a94d6e6bfff">dtn::RegistrationTable::lock_</a><code> [mutable, protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Lock to protect internal data structures. 
<p>

<p>Definition at line <a class="el" href="RegistrationTable_8h-source.html#l00125">125</a> of file <a class="el" href="RegistrationTable_8h-source.html">RegistrationTable.h</a>.</p>

<p>Referenced by <a class="el" href="RegistrationTable_8cc-source.html#l00096">add()</a>, <a class="el" href="RegistrationTable_8cc-source.html#l00130">del()</a>, <a class="el" href="RegistrationTable_8cc-source.html#l00211">dump()</a>, <a class="el" href="RegistrationTable_8cc-source.html#l00063">get()</a>, <a class="el" href="RegistrationTable_8cc-source.html#l00182">get_matching()</a>, <a class="el" href="RegistrationTable_8h-source.html#l00107">lock()</a>, <a class="el" href="RegistrationTable_8cc-source.html#l00227">reg_list()</a>, and <a class="el" href="RegistrationTable_8cc-source.html#l00157">update()</a>.</p>

</div>
</div><p>
<a class="anchor" name="7a347619e854aff4f8f480686bf906eb"></a><!-- doxytag: member="dtn::RegistrationTable::reglist_" ref="7a347619e854aff4f8f480686bf906eb" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1RegistrationList.html">RegistrationList</a> <a class="el" href="classdtn_1_1RegistrationTable.html#7a347619e854aff4f8f480686bf906eb">dtn::RegistrationTable::reglist_</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
All registrations are tabled in-memory in a flat list. 
<p>
It's non-obvious what else would be better since we need to do a prefix match on demux strings in matching_registrations. 
<p>Definition at line <a class="el" href="RegistrationTable_8h-source.html#l00120">120</a> of file <a class="el" href="RegistrationTable_8h-source.html">RegistrationTable.h</a>.</p>

<p>Referenced by <a class="el" href="RegistrationTable_8cc-source.html#l00096">add()</a>, <a class="el" href="RegistrationTable_8cc-source.html#l00130">del()</a>, <a class="el" href="RegistrationTable_8cc-source.html#l00211">dump()</a>, <a class="el" href="RegistrationTable_8cc-source.html#l00046">find()</a>, <a class="el" href="RegistrationTable_8cc-source.html#l00079">get()</a>, <a class="el" href="RegistrationTable_8cc-source.html#l00182">get_matching()</a>, <a class="el" href="RegistrationTable_8cc-source.html#l00227">reg_list()</a>, and <a class="el" href="RegistrationTable_8cc-source.html#l00036">~RegistrationTable()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="RegistrationTable_8h-source.html">RegistrationTable.h</a><li><a class="el" href="RegistrationTable_8cc-source.html">RegistrationTable.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>