<!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::RouteTable Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.html"><span>Main 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 List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespacedtn.html">dtn</a>::<a class="el" href="classdtn_1_1RouteTable.html">RouteTable</a> </div> </div> <div class="contents"> <h1>dtn::RouteTable Class Reference</h1><!-- doxytag: class="dtn::RouteTable" --><code>#include <<a class="el" href="RouteTable_8h-source.html">RouteTable.h</a>></code> <p> <p> <a href="classdtn_1_1RouteTable-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> Class that implements the routing table, implemented with an stl vector. <p>Definition at line <a class="el" href="RouteTable_8h-source.html#l00034">34</a> of file <a class="el" href="RouteTable_8h-source.html">RouteTable.h</a>.</p> <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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#bfe323c89a1d44bc552c8a37fee578ac">RouteTable</a> (const std::string &router_name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#bfe323c89a1d44bc552c8a37fee578ac"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#6dae4138a767df9fb3bb94e752a1ab5d">~RouteTable</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#6dae4138a767df9fb3bb94e752a1ab5d"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#f4563da3a4e78c4784a72e790a831469">add_entry</a> (<a class="el" href="classdtn_1_1RouteEntry.html">RouteEntry</a> *entry)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Add a route entry. <a href="#f4563da3a4e78c4784a72e790a831469"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#6116a1b3c21e46d1689e3ce010ecfe8e">del_entry</a> (const <a class="el" href="classdtn_1_1EndpointIDPattern.html">EndpointIDPattern</a> &dest, const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> &next_hop)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a route entry. <a href="#6116a1b3c21e46d1689e3ce010ecfe8e"></a><br></td></tr> <tr><td class="memTemplParams" nowrap colspan="2">template<typename Predicate> </td></tr> <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">size_t </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#737932d31320acd50d7c58f61128baaa">del_matching_entries</a> (Predicate test)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove entries that match the given predicate. <a href="#737932d31320acd50d7c58f61128baaa"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#f58eb380fc5a9cd31745d353d3f8baea">del_entries</a> (const <a class="el" href="classdtn_1_1EndpointIDPattern.html">EndpointIDPattern</a> &dest)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove all entries to the given endpoint id pattern. <a href="#f58eb380fc5a9cd31745d353d3f8baea"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#db642a8b6ce784847ba7fa7e633e9cc9">del_entries_for_nexthop</a> (const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> &next_hop)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove all entries that rely on the given next_hop link. <a href="#db642a8b6ce784847ba7fa7e633e9cc9"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#bec0465af4dbd62a1b8878e3437f7350">clear</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Clear the whole route table. <a href="#bec0465af4dbd62a1b8878e3437f7350"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#dceb882f843c17db3afd73521bc78c6d">get_matching</a> (const <a class="el" href="classdtn_1_1EndpointID.html">EndpointID</a> &eid, const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> &next_hop, <a class="el" href="classdtn_1_1RouteEntryVec.html">RouteEntryVec</a> *entry_vec) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Fill in the entry_vec with the list of all entries whose patterns match the given eid and next hop. <a href="#dceb882f843c17db3afd73521bc78c6d"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#af2c1c26503c7b62e489ffc579b3565f">get_matching</a> (const <a class="el" href="classdtn_1_1EndpointID.html">EndpointID</a> &eid, <a class="el" href="classdtn_1_1RouteEntryVec.html">RouteEntryVec</a> *entry_vec) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Syntactic sugar to call get_matching for all links. <a href="#af2c1c26503c7b62e489ffc579b3565f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#410e143edbfa9e818b64e005b1aa5169">dump</a> (oasys::StringBuffer *<a class="el" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Dump a string representation of the routing table. <a href="#410e143edbfa9e818b64e005b1aa5169"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#0ea24556a080751daef79301ab04c906">size</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the size of the table. <a href="#0ea24556a080751daef79301ab04c906"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classdtn_1_1RouteEntryVec.html">RouteEntryVec</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#581c0578208d828885d211e0ab8381fd">route_table</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the routing table. <a href="#581c0578208d828885d211e0ab8381fd"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">oasys::Lock * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#af649a3531d46d38066fefa3ec9fdc14">lock</a> ()</td></tr> <tr><td class="mdescLeft"> </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="#af649a3531d46d38066fefa3ec9fdc14"></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">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#e537332547b15d6675f877b0658cc6ec">get_matching_helper</a> (const <a class="el" href="classdtn_1_1EndpointID.html">EndpointID</a> &eid, const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> &next_hop, <a class="el" href="classdtn_1_1RouteEntryVec.html">RouteEntryVec</a> *entry_vec, <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> *loop, int level) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Helper function for get_matching. <a href="#e537332547b15d6675f877b0658cc6ec"></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_1RouteEntryVec.html">RouteEntryVec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#c6d778ec7a30cfcdf2047fde6a4de87b">route_table_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The routing table itself. <a href="#c6d778ec7a30cfcdf2047fde6a4de87b"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">oasys::SpinLock </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1RouteTable.html#6ce91b3d9a32bd3f60910d942129c84c">lock_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Lock to protect internal data structures. <a href="#6ce91b3d9a32bd3f60910d942129c84c"></a><br></td></tr> </table> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="bfe323c89a1d44bc552c8a37fee578ac"></a><!-- doxytag: member="dtn::RouteTable::RouteTable" ref="bfe323c89a1d44bc552c8a37fee578ac" args="(const std::string &router_name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">dtn::RouteTable::RouteTable </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>router_name</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor. <p> <p>Definition at line <a class="el" href="RouteTable_8cc-source.html#l00027">27</a> of file <a class="el" href="RouteTable_8cc-source.html">RouteTable.cc</a>.</p> </div> </div><p> <a class="anchor" name="6dae4138a767df9fb3bb94e752a1ab5d"></a><!-- doxytag: member="dtn::RouteTable::~RouteTable" ref="6dae4138a767df9fb3bb94e752a1ab5d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">dtn::RouteTable::~RouteTable </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Destructor. <p> <p>Definition at line <a class="el" href="RouteTable_8cc-source.html#l00033">33</a> of file <a class="el" href="RouteTable_8cc-source.html">RouteTable.cc</a>.</p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="f4563da3a4e78c4784a72e790a831469"></a><!-- doxytag: member="dtn::RouteTable::add_entry" ref="f4563da3a4e78c4784a72e790a831469" args="(RouteEntry *entry)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::RouteTable::add_entry </td> <td>(</td> <td class="paramtype"><a class="el" href="classdtn_1_1RouteEntry.html">RouteEntry</a> * </td> <td class="paramname"> <em>entry</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Add a route entry. <p> <p>Definition at line <a class="el" href="RouteTable_8cc-source.html#l00039">39</a> of file <a class="el" href="RouteTable_8cc-source.html">RouteTable.cc</a>.</p> <p>References <a class="el" href="RouteTable_8h-source.html#l00138">lock_</a>, and <a class="el" href="RouteTable_8h-source.html#l00133">route_table_</a>.</p> <p>Referenced by <a class="el" href="TableBasedRouter_8cc-source.html#l00052">dtn::TableBasedRouter::add_route()</a>, <a class="el" href="TableBasedRouter_8cc-source.html#l01295">dtn::TableBasedRouter::add_subscriber()</a>, <a class="el" href="TcaRouter_8cc-source.html#l00882">dtn::TcaRouter::create_route()</a>, and <a class="el" href="DTLSRRouter_8cc-source.html#l00524">dtn::DTLSRRouter::recompute_routes()</a>.</p> </div> </div><p> <a class="anchor" name="6116a1b3c21e46d1689e3ce010ecfe8e"></a><!-- doxytag: member="dtn::RouteTable::del_entry" ref="6116a1b3c21e46d1689e3ce010ecfe8e" args="(const EndpointIDPattern &dest, const LinkRef &next_hop)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::RouteTable::del_entry </td> <td>(</td> <td class="paramtype">const <a class="el" href="classdtn_1_1EndpointIDPattern.html">EndpointIDPattern</a> & </td> <td class="paramname"> <em>dest</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> & </td> <td class="paramname"> <em>next_hop</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Remove a route entry. <p> <p>Definition at line <a class="el" href="RouteTable_8cc-source.html#l00052">52</a> of file <a class="el" href="RouteTable_8cc-source.html">RouteTable.cc</a>.</p> <p>References <a class="el" href="EndpointID_8h-source.html#l00264">dtn::EndpointID::c_str()</a>, <a class="el" href="RouteEntry_8h-source.html#l00117">dtn::RouteEntry::dest_pattern()</a>, <a class="el" href="EndpointID_8h-source.html#l00126">dtn::EndpointID::equals()</a>, <a class="el" href="RouteEntry_8h-source.html#l00119">dtn::RouteEntry::link()</a>, <a class="el" href="RouteTable_8h-source.html#l00138">lock_</a>, and <a class="el" href="RouteTable_8h-source.html#l00133">route_table_</a>.</p> </div> </div><p> <a class="anchor" name="737932d31320acd50d7c58f61128baaa"></a><!-- doxytag: member="dtn::RouteTable::del_matching_entries" ref="737932d31320acd50d7c58f61128baaa" args="(Predicate test)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Predicate> </div> <table class="memname"> <tr> <td class="memname">size_t dtn::RouteTable::del_matching_entries </td> <td>(</td> <td class="paramtype">Predicate </td> <td class="paramname"> <em>test</em> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Remove entries that match the given predicate. <p> <p>Definition at line <a class="el" href="RouteTable_8h-source.html#l00144">144</a> of file <a class="el" href="RouteTable_8h-source.html">RouteTable.h</a>.</p> <p>References <a class="el" href="RouteTable_8h-source.html#l00138">lock_</a>, and <a class="el" href="RouteTable_8h-source.html#l00133">route_table_</a>.</p> <p>Referenced by <a class="el" href="RouteTable_8cc-source.html#l00078">del_entries()</a>, <a class="el" href="RouteTable_8cc-source.html#l00086">del_entries_for_nexthop()</a>, and <a class="el" href="DTLSRRouter_8cc-source.html#l00524">dtn::DTLSRRouter::recompute_routes()</a>.</p> </div> </div><p> <a class="anchor" name="f58eb380fc5a9cd31745d353d3f8baea"></a><!-- doxytag: member="dtn::RouteTable::del_entries" ref="f58eb380fc5a9cd31745d353d3f8baea" args="(const EndpointIDPattern &dest)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t dtn::RouteTable::del_entries </td> <td>(</td> <td class="paramtype">const <a class="el" href="classdtn_1_1EndpointIDPattern.html">EndpointIDPattern</a> & </td> <td class="paramname"> <em>dest</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Remove all entries to the given endpoint id pattern. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the number of entries removed </dd></dl> <p>Definition at line <a class="el" href="RouteTable_8cc-source.html#l00078">78</a> of file <a class="el" href="RouteTable_8cc-source.html">RouteTable.cc</a>.</p> <p>References <a class="el" href="RouteTable_8h-source.html#l00144">del_matching_entries()</a>, and <a class="el" href="RouteTable_8h-source.html#l00138">lock_</a>.</p> <p>Referenced by <a class="el" href="TableBasedRouter_8cc-source.html#l00060">dtn::TableBasedRouter::del_route()</a>, and <a class="el" href="TcaRouter_8cc-source.html#l00705">dtn::TcaRouter::handle_del_route()</a>.</p> </div> </div><p> <a class="anchor" name="db642a8b6ce784847ba7fa7e633e9cc9"></a><!-- doxytag: member="dtn::RouteTable::del_entries_for_nexthop" ref="db642a8b6ce784847ba7fa7e633e9cc9" args="(const LinkRef &next_hop)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t dtn::RouteTable::del_entries_for_nexthop </td> <td>(</td> <td class="paramtype">const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> & </td> <td class="paramname"> <em>next_hop</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Remove all entries that rely on the given next_hop link. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the number of entries removed </dd></dl> <p>Definition at line <a class="el" href="RouteTable_8cc-source.html#l00086">86</a> of file <a class="el" href="RouteTable_8cc-source.html">RouteTable.cc</a>.</p> <p>References <a class="el" href="RouteTable_8h-source.html#l00144">del_matching_entries()</a>, and <a class="el" href="RouteTable_8h-source.html#l00138">lock_</a>.</p> <p>Referenced by <a class="el" href="TableBasedRouter_8cc-source.html#l00590">dtn::TableBasedRouter::handle_link_deleted()</a>.</p> </div> </div><p> <a class="anchor" name="bec0465af4dbd62a1b8878e3437f7350"></a><!-- doxytag: member="dtn::RouteTable::clear" ref="bec0465af4dbd62a1b8878e3437f7350" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void dtn::RouteTable::clear </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Clear the whole route table. <p> <p>Definition at line <a class="el" href="RouteTable_8cc-source.html#l00094">94</a> of file <a class="el" href="RouteTable_8cc-source.html">RouteTable.cc</a>.</p> <p>References <a class="el" href="RouteTable_8h-source.html#l00138">lock_</a>, and <a class="el" href="RouteTable_8h-source.html#l00133">route_table_</a>.</p> </div> </div><p> <a class="anchor" name="dceb882f843c17db3afd73521bc78c6d"></a><!-- doxytag: member="dtn::RouteTable::get_matching" ref="dceb882f843c17db3afd73521bc78c6d" args="(const EndpointID &eid, const LinkRef &next_hop, RouteEntryVec *entry_vec) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t dtn::RouteTable::get_matching </td> <td>(</td> <td class="paramtype">const <a class="el" href="classdtn_1_1EndpointID.html">EndpointID</a> & </td> <td class="paramname"> <em>eid</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> & </td> <td class="paramname"> <em>next_hop</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classdtn_1_1RouteEntryVec.html">RouteEntryVec</a> * </td> <td class="paramname"> <em>entry_vec</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const</td> </tr> </table> </div> <div class="memdoc"> <p> Fill in the entry_vec with the list of all entries whose patterns match the given eid and next hop. <p> If the next hop is NULL, it is ignored.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the count of matching entries </dd></dl> <p>Definition at line <a class="el" href="RouteTable_8cc-source.html#l00107">107</a> of file <a class="el" href="RouteTable_8cc-source.html">RouteTable.cc</a>.</p> <p>References <a class="el" href="EndpointID_8h-source.html#l00264">dtn::EndpointID::c_str()</a>, <a class="el" href="RouteTable_8cc-source.html#l00126">get_matching_helper()</a>, and <a class="el" href="RouteTable_8h-source.html#l00138">lock_</a>.</p> <p>Referenced by <a class="el" href="TableBasedRouter_8cc-source.html#l00394">dtn::TableBasedRouter::add_nexthop_route()</a>, <a class="el" href="TableBasedRouter_8cc-source.html#l01227">dtn::TableBasedRouter::find_session_upstream()</a>, <a class="el" href="TcaRouter_8cc-source.html#l00303">dtn::TcaRouter::fwd_to_all()</a>, <a class="el" href="TcaRouter_8cc-source.html#l00346">dtn::TcaRouter::fwd_to_matching_r()</a>, <a class="el" href="RouteTable_8h-source.html#l00096">get_matching()</a>, <a class="el" href="TcaRouter_8cc-source.html#l00657">dtn::TcaRouter::handle_get_routes()</a>, and <a class="el" href="TableBasedRouter_8cc-source.html#l00728">dtn::TableBasedRouter::route_bundle()</a>.</p> </div> </div><p> <a class="anchor" name="af2c1c26503c7b62e489ffc579b3565f"></a><!-- doxytag: member="dtn::RouteTable::get_matching" ref="af2c1c26503c7b62e489ffc579b3565f" args="(const EndpointID &eid, RouteEntryVec *entry_vec) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t dtn::RouteTable::get_matching </td> <td>(</td> <td class="paramtype">const <a class="el" href="classdtn_1_1EndpointID.html">EndpointID</a> & </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_1RouteEntryVec.html">RouteEntryVec</a> * </td> <td class="paramname"> <em>entry_vec</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Syntactic sugar to call get_matching for all links. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the count of matching entries </dd></dl> <p>Definition at line <a class="el" href="RouteTable_8h-source.html#l00096">96</a> of file <a class="el" href="RouteTable_8h-source.html">RouteTable.h</a>.</p> <p>References <a class="el" href="RouteTable_8cc-source.html#l00107">get_matching()</a>.</p> </div> </div><p> <a class="anchor" name="410e143edbfa9e818b64e005b1aa5169"></a><!-- doxytag: member="dtn::RouteTable::dump" ref="410e143edbfa9e818b64e005b1aa5169" args="(oasys::StringBuffer *buf) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void dtn::RouteTable::dump </td> <td>(</td> <td class="paramtype">oasys::StringBuffer * </td> <td class="paramname"> <em>buf</em> </td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> Dump a string representation of the routing table. <p> <p>Definition at line <a class="el" href="RouteTable_8cc-source.html#l00176">176</a> of file <a class="el" href="RouteTable_8cc-source.html">RouteTable.cc</a>.</p> <p>References <a class="el" href="RouteEntry_8h-source.html#l00117">dtn::RouteEntry::dest_pattern()</a>, <a class="el" href="RouteEntry_8cc-source.html#l00136">dtn::RouteEntry::dump_header()</a>, <a class="el" href="EndpointID_8h-source.html#l00266">dtn::EndpointID::length()</a>, <a class="el" href="RouteEntry_8h-source.html#l00119">dtn::RouteEntry::link()</a>, <a class="el" href="RouteTable_8h-source.html#l00138">lock_</a>, <a class="el" href="RouteTable_8h-source.html#l00133">route_table_</a>, <a class="el" href="RouteEntry_8h-source.html#l00120">dtn::RouteEntry::route_to()</a>, and <a class="el" href="RouteEntry_8h-source.html#l00118">dtn::RouteEntry::source_pattern()</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="0ea24556a080751daef79301ab04c906"></a><!-- doxytag: member="dtn::RouteTable::size" ref="0ea24556a080751daef79301ab04c906" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::RouteTable::size </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Return the size of the table. <p> <p>Definition at line <a class="el" href="RouteTable_8h-source.html#l00111">111</a> of file <a class="el" href="RouteTable_8h-source.html">RouteTable.h</a>.</p> <p>References <a class="el" href="RouteTable_8h-source.html#l00133">route_table_</a>.</p> </div> </div><p> <a class="anchor" name="581c0578208d828885d211e0ab8381fd"></a><!-- doxytag: member="dtn::RouteTable::route_table" ref="581c0578208d828885d211e0ab8381fd" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classdtn_1_1RouteEntryVec.html">RouteEntryVec</a> * dtn::RouteTable::route_table </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Return the routing table. <p> Asserts that the <a class="el" href="classdtn_1_1RouteTable.html" title="Class that implements the routing table, implemented with an stl vector.">RouteTable</a> spin lock is held by the caller. <p>Definition at line <a class="el" href="RouteTable_8cc-source.html#l00225">225</a> of file <a class="el" href="RouteTable_8cc-source.html">RouteTable.cc</a>.</p> <p>References <a class="el" href="RouteTable_8h-source.html#l00138">lock_</a>, and <a class="el" href="RouteTable_8h-source.html#l00133">route_table_</a>.</p> <p>Referenced by <a class="el" href="TableBasedRouter_8cc-source.html#l00650">dtn::TableBasedRouter::tcl_dump_state()</a>.</p> </div> </div><p> <a class="anchor" name="af649a3531d46d38066fefa3ec9fdc14"></a><!-- doxytag: member="dtn::RouteTable::lock" ref="af649a3531d46d38066fefa3ec9fdc14" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">oasys::Lock* dtn::RouteTable::lock </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><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="RouteTable_8h-source.html#l00122">122</a> of file <a class="el" href="RouteTable_8h-source.html">RouteTable.h</a>.</p> <p>References <a class="el" href="RouteTable_8h-source.html#l00138">lock_</a>.</p> <p>Referenced by <a class="el" href="TableBasedRouter_8cc-source.html#l00650">dtn::TableBasedRouter::tcl_dump_state()</a>.</p> </div> </div><p> <a class="anchor" name="e537332547b15d6675f877b0658cc6ec"></a><!-- doxytag: member="dtn::RouteTable::get_matching_helper" ref="e537332547b15d6675f877b0658cc6ec" args="(const EndpointID &eid, const LinkRef &next_hop, RouteEntryVec *entry_vec, bool *loop, int level) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t dtn::RouteTable::get_matching_helper </td> <td>(</td> <td class="paramtype">const <a class="el" href="classdtn_1_1EndpointID.html">EndpointID</a> & </td> <td class="paramname"> <em>eid</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> & </td> <td class="paramname"> <em>next_hop</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classdtn_1_1RouteEntryVec.html">RouteEntryVec</a> * </td> <td class="paramname"> <em>entry_vec</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> * </td> <td class="paramname"> <em>loop</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>level</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Helper function for get_matching. <p> <p>Definition at line <a class="el" href="RouteTable_8cc-source.html#l00126">126</a> of file <a class="el" href="RouteTable_8cc-source.html">RouteTable.cc</a>.</p> <p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="EndpointID_8h-source.html#l00264">dtn::EndpointID::c_str()</a>, <a class="el" href="BundleRouter_8cc-source.html#l00049">dtn::BundleRouter::config_</a>, <a class="el" href="dtnping_8c-source.html#l00045">count</a>, <a class="el" href="RouteEntry_8h-source.html#l00117">dtn::RouteEntry::dest_pattern()</a>, <a class="el" href="EndpointID_8h-source.html#l00266">dtn::EndpointID::length()</a>, <a class="el" href="RouteEntry_8h-source.html#l00119">dtn::RouteEntry::link()</a>, <a class="el" href="EndpointID_8cc-source.html#l00197">dtn::EndpointIDPattern::match()</a>, <a class="el" href="RouteTable_8h-source.html#l00133">route_table_</a>, and <a class="el" href="RouteEntry_8h-source.html#l00120">dtn::RouteEntry::route_to()</a>.</p> <p>Referenced by <a class="el" href="RouteTable_8cc-source.html#l00107">get_matching()</a>.</p> </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="c6d778ec7a30cfcdf2047fde6a4de87b"></a><!-- doxytag: member="dtn::RouteTable::route_table_" ref="c6d778ec7a30cfcdf2047fde6a4de87b" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classdtn_1_1RouteEntryVec.html">RouteEntryVec</a> <a class="el" href="classdtn_1_1RouteTable.html#c6d778ec7a30cfcdf2047fde6a4de87b">dtn::RouteTable::route_table_</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> The routing table itself. <p> <p>Definition at line <a class="el" href="RouteTable_8h-source.html#l00133">133</a> of file <a class="el" href="RouteTable_8h-source.html">RouteTable.h</a>.</p> <p>Referenced by <a class="el" href="RouteTable_8cc-source.html#l00039">add_entry()</a>, <a class="el" href="RouteTable_8cc-source.html#l00094">clear()</a>, <a class="el" href="RouteTable_8cc-source.html#l00052">del_entry()</a>, <a class="el" href="RouteTable_8h-source.html#l00144">del_matching_entries()</a>, <a class="el" href="RouteTable_8cc-source.html#l00176">dump()</a>, <a class="el" href="RouteTable_8cc-source.html#l00126">get_matching_helper()</a>, <a class="el" href="RouteTable_8cc-source.html#l00225">route_table()</a>, and <a class="el" href="RouteTable_8h-source.html#l00111">size()</a>.</p> </div> </div><p> <a class="anchor" name="6ce91b3d9a32bd3f60910d942129c84c"></a><!-- doxytag: member="dtn::RouteTable::lock_" ref="6ce91b3d9a32bd3f60910d942129c84c" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">oasys::SpinLock <a class="el" href="classdtn_1_1RouteTable.html#6ce91b3d9a32bd3f60910d942129c84c">dtn::RouteTable::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="RouteTable_8h-source.html#l00138">138</a> of file <a class="el" href="RouteTable_8h-source.html">RouteTable.h</a>.</p> <p>Referenced by <a class="el" href="RouteTable_8cc-source.html#l00039">add_entry()</a>, <a class="el" href="RouteTable_8cc-source.html#l00094">clear()</a>, <a class="el" href="RouteTable_8cc-source.html#l00078">del_entries()</a>, <a class="el" href="RouteTable_8cc-source.html#l00086">del_entries_for_nexthop()</a>, <a class="el" href="RouteTable_8cc-source.html#l00052">del_entry()</a>, <a class="el" href="RouteTable_8h-source.html#l00144">del_matching_entries()</a>, <a class="el" href="RouteTable_8cc-source.html#l00176">dump()</a>, <a class="el" href="RouteTable_8cc-source.html#l00107">get_matching()</a>, <a class="el" href="RouteTable_8h-source.html#l00122">lock()</a>, and <a class="el" href="RouteTable_8cc-source.html#l00225">route_table()</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="RouteTable_8h-source.html">RouteTable.h</a><li><a class="el" href="RouteTable_8cc-source.html">RouteTable.cc</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 21 14:09:55 2008 for DTN Reference Implementation by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>