Sophie

Sophie

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

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

<p>
<a href="classdtn_1_1InterfaceTable-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_1InterfaceTable.html#7e25241c33b23cfdb9f89d08a8c95d59">InterfaceTable</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#7e25241c33b23cfdb9f89d08a8c95d59"></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_1InterfaceTable.html#7f12f79af5bab5d6c3c63cd55e494a82">~InterfaceTable</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#7f12f79af5bab5d6c3c63cd55e494a82"></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_1InterfaceTable.html#98e3f88c67062ccf02f8fb52c1a5d70d">add</a> (const std::string &amp;name, <a class="el" href="classdtn_1_1ConvergenceLayer.html">ConvergenceLayer</a> *cl, const char *proto, int argc, const char *argv[])</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a new interface to the table.  <a href="#98e3f88c67062ccf02f8fb52c1a5d70d"></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_1InterfaceTable.html#16a1079a0de9a8bf7101d9416dc50542">del</a> (const std::string &amp;name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove the specified interface.  <a href="#16a1079a0de9a8bf7101d9416dc50542"></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_1InterfaceTable.html#129d7bde09a2db027b3a082c6a2b88ff">list</a> (oasys::StringBuffer *<a class="el" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">List the current interfaces.  <a href="#129d7bde09a2db027b3a082c6a2b88ff"></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_1InterfaceTable.html">InterfaceTable</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1InterfaceTable.html#aea0d0db7bdfd03bc889f4ce77a0b700">instance</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Singleton instance accessor.  <a href="#aea0d0db7bdfd03bc889f4ce77a0b700"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1InterfaceTable.html#445e931e9cf7ff8ba96f2c7572f8467d">init</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Boot time initializer that takes as a parameter the actual storage instance to use.  <a href="#445e931e9cf7ff8ba96f2c7572f8467d"></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_1InterfaceTable.html#7a25701997d76b8325ea8f0f2d72dfaa">find</a> (const std::string &amp;name, InterfaceList::iterator *iter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal method to find the location of the given interface in the list.  <a href="#7a25701997d76b8325ea8f0f2d72dfaa"></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="namespacedtn.html#95638ebbfcd7aea52f0b74c861417219">InterfaceList</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1InterfaceTable.html#ae6cb65182e415b91cf9ff7f770ce1c1">iflist_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">All interfaces are tabled in-memory in a flat list.  <a href="#ae6cb65182e415b91cf9ff7f770ce1c1"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classdtn_1_1InterfaceTable.html">InterfaceTable</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1InterfaceTable.html#8b25363add8b0219adfcb95ec6ee6bda">instance_</a> = NULL</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Class for the in-memory interface table. 
<p>Definition at line <a class="el" href="InterfaceTable_8h-source.html#l00038">38</a> of file <a class="el" href="InterfaceTable_8h-source.html">InterfaceTable.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="7e25241c33b23cfdb9f89d08a8c95d59"></a><!-- doxytag: member="dtn::InterfaceTable::InterfaceTable" ref="7e25241c33b23cfdb9f89d08a8c95d59" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dtn::InterfaceTable::InterfaceTable           </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="InterfaceTable_8cc-source.html#l00029">29</a> of file <a class="el" href="InterfaceTable_8cc-source.html">InterfaceTable.cc</a>.</p>

<p>Referenced by <a class="el" href="InterfaceTable_8h-source.html#l00054">init()</a>.</p>

</div>
</div><p>
<a class="anchor" name="7f12f79af5bab5d6c3c63cd55e494a82"></a><!-- doxytag: member="dtn::InterfaceTable::~InterfaceTable" ref="7f12f79af5bab5d6c3c63cd55e494a82" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dtn::InterfaceTable::~InterfaceTable           </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="InterfaceTable_8cc-source.html#l00034">34</a> of file <a class="el" href="InterfaceTable_8cc-source.html">InterfaceTable.cc</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="98e3f88c67062ccf02f8fb52c1a5d70d"></a><!-- doxytag: member="dtn::InterfaceTable::add" ref="98e3f88c67062ccf02f8fb52c1a5d70d" args="(const std::string &amp;name, ConvergenceLayer *cl, const char *proto, int argc, const char *argv[])" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::InterfaceTable::add           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1ConvergenceLayer.html">ConvergenceLayer</a> *&nbsp;</td>
          <td class="paramname"> <em>cl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>proto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>argv</em>[]</td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a new interface to the table. 
<p>
Create and add a new interface to the table.<p>
Returns true if the interface is successfully added, false if the interface specification is invalid (or it already exists).<p>
Returns true if the interface is successfully added, false if the interface specification is invalid. 
<p>Definition at line <a class="el" href="InterfaceTable_8cc-source.html#l00065">65</a> of file <a class="el" href="InterfaceTable_8cc-source.html">InterfaceTable.cc</a>.</p>

<p>References <a class="el" href="InterfaceTable_8cc-source.html#l00044">find()</a>, <a class="el" href="InterfaceTable_8h-source.html#l00097">iflist_</a>, and <a class="el" href="ConvergenceLayer_8cc-source.html#l00144">dtn::ConvergenceLayer::interface_up()</a>.</p>

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

<p>
Remove the specified interface. 
<p>

<p>Definition at line <a class="el" href="InterfaceTable_8cc-source.html#l00095">95</a> of file <a class="el" href="InterfaceTable_8cc-source.html">InterfaceTable.cc</a>.</p>

<p>References <a class="el" href="Interface_8h-source.html#l00039">dtn::Interface::clayer()</a>, <a class="el" href="InterfaceTable_8cc-source.html#l00044">find()</a>, <a class="el" href="InterfaceTable_8h-source.html#l00097">iflist_</a>, and <a class="el" href="ConvergenceLayer_8cc-source.html#l00156">dtn::ConvergenceLayer::interface_down()</a>.</p>

</div>
</div><p>
<a class="anchor" name="7a25701997d76b8325ea8f0f2d72dfaa"></a><!-- doxytag: member="dtn::InterfaceTable::find" ref="7a25701997d76b8325ea8f0f2d72dfaa" args="(const std::string &amp;name, InterfaceList::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::InterfaceTable::find           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">InterfaceList::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 interface in the list. 
<p>
Internal method to find the location of the given interface in the list. 
<p>Definition at line <a class="el" href="InterfaceTable_8cc-source.html#l00044">44</a> of file <a class="el" href="InterfaceTable_8cc-source.html">InterfaceTable.cc</a>.</p>

<p>References <a class="el" href="InterfaceTable_8h-source.html#l00097">iflist_</a>, and <a class="el" href="Interface_8h-source.html#l00037">dtn::Interface::name()</a>.</p>

<p>Referenced by <a class="el" href="InterfaceTable_8cc-source.html#l00065">add()</a>, and <a class="el" href="InterfaceTable_8cc-source.html#l00095">del()</a>.</p>

</div>
</div><p>
<a class="anchor" name="445e931e9cf7ff8ba96f2c7572f8467d"></a><!-- doxytag: member="dtn::InterfaceTable::init" ref="445e931e9cf7ff8ba96f2c7572f8467d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void dtn::InterfaceTable::init           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Boot time initializer that takes as a parameter the actual storage instance to use. 
<p>

<p>Definition at line <a class="el" href="InterfaceTable_8h-source.html#l00054">54</a> of file <a class="el" href="InterfaceTable_8h-source.html">InterfaceTable.h</a>.</p>

<p>References <a class="el" href="InterfaceTable_8h-source.html#l00090">instance_</a>, and <a class="el" href="InterfaceTable_8cc-source.html#l00029">InterfaceTable()</a>.</p>

</div>
</div><p>
<a class="anchor" name="aea0d0db7bdfd03bc889f4ce77a0b700"></a><!-- doxytag: member="dtn::InterfaceTable::instance" ref="aea0d0db7bdfd03bc889f4ce77a0b700" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classdtn_1_1InterfaceTable.html">InterfaceTable</a>* dtn::InterfaceTable::instance           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Singleton instance accessor. 
<p>

<p>Definition at line <a class="el" href="InterfaceTable_8h-source.html#l00043">43</a> of file <a class="el" href="InterfaceTable_8h-source.html">InterfaceTable.h</a>.</p>

<p>References <a class="el" href="InterfaceTable_8h-source.html#l00090">instance_</a>.</p>

<p>Referenced by <a class="el" href="InterfaceCommand_8cc-source.html#l00040">dtn::InterfaceCommand::exec()</a>.</p>

</div>
</div><p>
<a class="anchor" name="129d7bde09a2db027b3a082c6a2b88ff"></a><!-- doxytag: member="dtn::InterfaceTable::list" ref="129d7bde09a2db027b3a082c6a2b88ff" args="(oasys::StringBuffer *buf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dtn::InterfaceTable::list           </td>
          <td>(</td>
          <td class="paramtype">oasys::StringBuffer *&nbsp;</td>
          <td class="paramname"> <em>buf</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
List the current interfaces. 
<p>
Dumps the interface table into a string. 
<p>Definition at line <a class="el" href="InterfaceTable_8cc-source.html#l00128">128</a> of file <a class="el" href="InterfaceTable_8cc-source.html">InterfaceTable.cc</a>.</p>

<p>References <a class="el" href="Interface_8h-source.html#l00039">dtn::Interface::clayer()</a>, <a class="el" href="ConvergenceLayer_8cc-source.html#l00165">dtn::ConvergenceLayer::dump_interface()</a>, <a class="el" href="InterfaceTable_8h-source.html#l00097">iflist_</a>, <a class="el" href="Interface_8h-source.html#l00037">dtn::Interface::name()</a>, and <a class="el" href="Interface_8h-source.html#l00038">dtn::Interface::proto()</a>.</p>

<p>Referenced by <a class="el" href="InterfaceCommand_8cc-source.html#l00040">dtn::InterfaceCommand::exec()</a>.</p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="ae6cb65182e415b91cf9ff7f770ce1c1"></a><!-- doxytag: member="dtn::InterfaceTable::iflist_" ref="ae6cb65182e415b91cf9ff7f770ce1c1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacedtn.html#95638ebbfcd7aea52f0b74c861417219">InterfaceList</a> <a class="el" href="classdtn_1_1InterfaceTable.html#ae6cb65182e415b91cf9ff7f770ce1c1">dtn::InterfaceTable::iflist_</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
All interfaces 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_interfaces. 
<p>Definition at line <a class="el" href="InterfaceTable_8h-source.html#l00097">97</a> of file <a class="el" href="InterfaceTable_8h-source.html">InterfaceTable.h</a>.</p>

<p>Referenced by <a class="el" href="InterfaceTable_8cc-source.html#l00065">add()</a>, <a class="el" href="InterfaceTable_8cc-source.html#l00095">del()</a>, <a class="el" href="InterfaceTable_8cc-source.html#l00044">find()</a>, and <a class="el" href="InterfaceTable_8cc-source.html#l00128">list()</a>.</p>

</div>
</div><p>
<a class="anchor" name="8b25363add8b0219adfcb95ec6ee6bda"></a><!-- doxytag: member="dtn::InterfaceTable::instance_" ref="8b25363add8b0219adfcb95ec6ee6bda" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdtn_1_1InterfaceTable.html">InterfaceTable</a> * <a class="el" href="classdtn_1_1InterfaceTable.html#8b25363add8b0219adfcb95ec6ee6bda">dtn::InterfaceTable::instance_</a> = NULL<code> [static, protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="InterfaceTable_8h-source.html#l00090">90</a> of file <a class="el" href="InterfaceTable_8h-source.html">InterfaceTable.h</a>.</p>

<p>Referenced by <a class="el" href="InterfaceTable_8h-source.html#l00054">init()</a>, and <a class="el" href="InterfaceTable_8h-source.html#l00043">instance()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="InterfaceTable_8h-source.html">InterfaceTable.h</a><li><a class="el" href="InterfaceTable_8cc-source.html">InterfaceTable.cc</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 30 09:27:03 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>