<!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::FileConvergenceLayer 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_1FileConvergenceLayer.html">FileConvergenceLayer</a> </div> </div> <div class="contents"> <h1>dtn::FileConvergenceLayer Class Reference</h1><!-- doxytag: class="dtn::FileConvergenceLayer" --><!-- doxytag: inherits="dtn::ConvergenceLayer" --><code>#include <<a class="el" href="FileConvergenceLayer_8h-source.html">FileConvergenceLayer.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for dtn::FileConvergenceLayer:</div> <div class="dynsection"> <p><center><img src="classdtn_1_1FileConvergenceLayer.png" usemap="#dtn::FileConvergenceLayer_map" border="0" alt=""></center> <map name="dtn::FileConvergenceLayer_map"> <area href="classdtn_1_1ConvergenceLayer.html" alt="dtn::ConvergenceLayer" shape="rect" coords="0,0,166,24"> </map> </div> <p> <a href="classdtn_1_1FileConvergenceLayer-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> <p>Definition at line <a class="el" href="FileConvergenceLayer_8h-source.html#l00025">25</a> of file <a class="el" href="FileConvergenceLayer_8h-source.html">FileConvergenceLayer.h</a>.</p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1FileConvergenceLayer.html#fd5ae6a7a99000a59029a2a5b4f7da99">CURRENT_VERSION</a> = 0x1</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Current version of the file cl protocol. <a href="#fd5ae6a7a99000a59029a2a5b4f7da99"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct <br> <a class="el" href="structdtn_1_1FileConvergenceLayer_1_1FileHeader.html">dtn::FileConvergenceLayer::FileHeader</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1FileConvergenceLayer.html#67adbe5740c6c3027f0b4d3ababef243">packed</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Framing header at the beginning of each bundle file. <a href="#67adbe5740c6c3027f0b4d3ababef243"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1FileConvergenceLayer.html#8d9881cfbe25bfb327e2367399f9d0d7">interface_up</a> (<a class="el" href="classdtn_1_1Interface.html">Interface</a> *iface, int argc, const char *argv[])</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Bring up a new interface. <a href="#8d9881cfbe25bfb327e2367399f9d0d7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1FileConvergenceLayer.html#b13b8ef7972ad45e7581299a57573189">interface_down</a> (<a class="el" href="classdtn_1_1Interface.html">Interface</a> *iface)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Bring down the interface. <a href="#b13b8ef7972ad45e7581299a57573189"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1FileConvergenceLayer.html#d0bf3977a6a40400d63c7a1c19805490">open_contact</a> (const <a class="el" href="namespacedtn.html#5f869544c85c75b5a85a14d6e90d7ff7">ContactRef</a> &contact)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Validate that the contact eid specifies a legit directory. <a href="#d0bf3977a6a40400d63c7a1c19805490"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1FileConvergenceLayer.html#eb188fa883a317e65dec1037ea77e495">close_contact</a> (const <a class="el" href="namespacedtn.html#5f869544c85c75b5a85a14d6e90d7ff7">ContactRef</a> &contact)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Close the connnection to the contact. <a href="#eb188fa883a317e65dec1037ea77e495"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1FileConvergenceLayer.html#16e756b8cc2394df24a67cff5c79c6af">send_bundle</a> (const <a class="el" href="namespacedtn.html#5f869544c85c75b5a85a14d6e90d7ff7">ContactRef</a> &contact, <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Try to send the bundles queued up for the given contact. <a href="#16e756b8cc2394df24a67cff5c79c6af"></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_1FileConvergenceLayer.html#aebe7c76dfff8e796631603aa1af2d1a">extract_dir</a> (const char *nexthop, std::string *dirp)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Pull a filesystem directory out of the next hop admin address. <a href="#aebe7c76dfff8e796631603aa1af2d1a"></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_1FileConvergenceLayer.html#5abd1055ec64a0d16ad26554d138bb26">validate_dir</a> (const std::string &dir)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Validate that a given directory exists and that the permissions are correct. <a href="#5abd1055ec64a0d16ad26554d138bb26"></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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1FileConvergenceLayer.html#38bec4f813195bce0ad2b221c3f3bd26">FileConvergenceLayer</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#38bec4f813195bce0ad2b221c3f3bd26"></a><br></td></tr> <tr><td colspan="2"><br><h2>Classes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structdtn_1_1FileConvergenceLayer_1_1FileHeader.html">FileHeader</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Framing header at the beginning of each bundle file. <a href="structdtn_1_1FileConvergenceLayer_1_1FileHeader.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1FileConvergenceLayer_1_1Scanner.html">Scanner</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Helper class (and thread) that periodically scans a directory for new bundle files. <a href="classdtn_1_1FileConvergenceLayer_1_1Scanner.html#_details">More...</a><br></td></tr> </table> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="38bec4f813195bce0ad2b221c3f3bd26"></a><!-- doxytag: member="dtn::FileConvergenceLayer::FileConvergenceLayer" ref="38bec4f813195bce0ad2b221c3f3bd26" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">dtn::FileConvergenceLayer::FileConvergenceLayer </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor. <p> <p>Definition at line <a class="el" href="FileConvergenceLayer_8cc-source.html#l00047">47</a> of file <a class="el" href="FileConvergenceLayer_8cc-source.html">FileConvergenceLayer.cc</a>.</p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="8d9881cfbe25bfb327e2367399f9d0d7"></a><!-- doxytag: member="dtn::FileConvergenceLayer::interface_up" ref="8d9881cfbe25bfb327e2367399f9d0d7" args="(Interface *iface, 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::FileConvergenceLayer::interface_up </td> <td>(</td> <td class="paramtype"><a class="el" href="classdtn_1_1Interface.html">Interface</a> * </td> <td class="paramname"> <em>iface</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>argc</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>argv</em>[]</td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Bring up a new interface. <p> <p>Reimplemented from <a class="el" href="classdtn_1_1ConvergenceLayer.html#0d8005ac771a2200d8b9a1fc46a42c29">dtn::ConvergenceLayer</a>.</p> <p>Definition at line <a class="el" href="FileConvergenceLayer_8cc-source.html#l00118">118</a> of file <a class="el" href="FileConvergenceLayer_8cc-source.html">FileConvergenceLayer.cc</a>.</p> </div> </div><p> <a class="anchor" name="b13b8ef7972ad45e7581299a57573189"></a><!-- doxytag: member="dtn::FileConvergenceLayer::interface_down" ref="b13b8ef7972ad45e7581299a57573189" args="(Interface *iface)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::FileConvergenceLayer::interface_down </td> <td>(</td> <td class="paramtype"><a class="el" href="classdtn_1_1Interface.html">Interface</a> * </td> <td class="paramname"> <em>iface</em> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Bring down the interface. <p> <p>Reimplemented from <a class="el" href="classdtn_1_1ConvergenceLayer.html#1f92c4c8c0fe58e20caa3ed72142f953">dtn::ConvergenceLayer</a>.</p> <p>Definition at line <a class="el" href="FileConvergenceLayer_8cc-source.html#l00156">156</a> of file <a class="el" href="FileConvergenceLayer_8cc-source.html">FileConvergenceLayer.cc</a>.</p> <p>References <a class="el" href="Interface_8h-source.html#l00040">dtn::Interface::cl_info()</a>, and <a class="el" href="FileConvergenceLayer_8cc-source.html#l00441">dtn::FileConvergenceLayer::Scanner::stop()</a>.</p> </div> </div><p> <a class="anchor" name="d0bf3977a6a40400d63c7a1c19805490"></a><!-- doxytag: member="dtn::FileConvergenceLayer::open_contact" ref="d0bf3977a6a40400d63c7a1c19805490" args="(const ContactRef &contact)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::FileConvergenceLayer::open_contact </td> <td>(</td> <td class="paramtype">const <a class="el" href="namespacedtn.html#5f869544c85c75b5a85a14d6e90d7ff7">ContactRef</a> & </td> <td class="paramname"> <em>contact</em> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Validate that the contact eid specifies a legit directory. <p> <p>Implements <a class="el" href="classdtn_1_1ConvergenceLayer.html#0bc4483b3956e082a17f79bd9b488780">dtn::ConvergenceLayer</a>.</p> <p>Definition at line <a class="el" href="FileConvergenceLayer_8cc-source.html#l00173">173</a> of file <a class="el" href="FileConvergenceLayer_8cc-source.html">FileConvergenceLayer.cc</a>.</p> <p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>.</p> </div> </div><p> <a class="anchor" name="eb188fa883a317e65dec1037ea77e495"></a><!-- doxytag: member="dtn::FileConvergenceLayer::close_contact" ref="eb188fa883a317e65dec1037ea77e495" args="(const ContactRef &contact)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::FileConvergenceLayer::close_contact </td> <td>(</td> <td class="paramtype">const <a class="el" href="namespacedtn.html#5f869544c85c75b5a85a14d6e90d7ff7">ContactRef</a> & </td> <td class="paramname"> <em>contact</em> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Close the connnection to the contact. <p> <p>Reimplemented from <a class="el" href="classdtn_1_1ConvergenceLayer.html#0667833468ff83fd60b4f96307c26618">dtn::ConvergenceLayer</a>.</p> <p>Definition at line <a class="el" href="FileConvergenceLayer_8cc-source.html#l00199">199</a> of file <a class="el" href="FileConvergenceLayer_8cc-source.html">FileConvergenceLayer.cc</a>.</p> </div> </div><p> <a class="anchor" name="16e756b8cc2394df24a67cff5c79c6af"></a><!-- doxytag: member="dtn::FileConvergenceLayer::send_bundle" ref="16e756b8cc2394df24a67cff5c79c6af" args="(const ContactRef &contact, Bundle *bundle)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void dtn::FileConvergenceLayer::send_bundle </td> <td>(</td> <td class="paramtype">const <a class="el" href="namespacedtn.html#5f869544c85c75b5a85a14d6e90d7ff7">ContactRef</a> & </td> <td class="paramname"> <em>contact</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classdtn_1_1Bundle.html">Bundle</a> * </td> <td class="paramname"> <em>bundle</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Try to send the bundles queued up for the given contact. <p> <p>Definition at line <a class="el" href="FileConvergenceLayer_8cc-source.html#l00210">210</a> of file <a class="el" href="FileConvergenceLayer_8cc-source.html">FileConvergenceLayer.cc</a>.</p> <p>References <a class="el" href="FileConvergenceLayer_8h-source.html#l00054">dtn::FileConvergenceLayer::FileHeader::bundle_length</a>, <a class="el" href="bundling_2Bundle_8h-source.html#l00324">dtn::Bundle::bundleid_</a>, <a class="el" href="FileConvergenceLayer_8h-source.html#l00045">CURRENT_VERSION</a>, <a class="el" href="IPDiscovery_8cc.html#d65a8842cc674e3ddf69355898c0ecbf">errno</a>, <a class="el" href="FileConvergenceLayer_8cc-source.html#l00056">extract_dir()</a>, <a class="el" href="dtnperf-client_8c-source.html#l00115">fd</a>, <a class="el" href="FileConvergenceLayer_8h-source.html#l00053">dtn::FileConvergenceLayer::FileHeader::header_length</a>, <a class="el" href="BundlePayload_8h-source.html#l00077">dtn::BundlePayload::length()</a>, <a class="el" href="bundling_2Bundle_8h-source.html#l00318">dtn::Bundle::payload_</a>, <a class="el" href="BundleDaemon_8cc-source.html#l00134">dtn::BundleDaemon::post()</a>, and <a class="el" href="FileConvergenceLayer_8h-source.html#l00051">dtn::FileConvergenceLayer::FileHeader::version</a>.</p> </div> </div><p> <a class="anchor" name="aebe7c76dfff8e796631603aa1af2d1a"></a><!-- doxytag: member="dtn::FileConvergenceLayer::extract_dir" ref="aebe7c76dfff8e796631603aa1af2d1a" args="(const char *nexthop, std::string *dirp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::FileConvergenceLayer::extract_dir </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>nexthop</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">std::string * </td> <td class="paramname"> <em>dirp</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Pull a filesystem directory out of the next hop admin address. <p> Pull a filesystem directory out of the next hop ssp. <p>Definition at line <a class="el" href="FileConvergenceLayer_8cc-source.html#l00056">56</a> of file <a class="el" href="FileConvergenceLayer_8cc-source.html">FileConvergenceLayer.cc</a>.</p> <p>Referenced by <a class="el" href="FileConvergenceLayer_8cc-source.html#l00210">send_bundle()</a>.</p> </div> </div><p> <a class="anchor" name="5abd1055ec64a0d16ad26554d138bb26"></a><!-- doxytag: member="dtn::FileConvergenceLayer::validate_dir" ref="5abd1055ec64a0d16ad26554d138bb26" args="(const std::string &dir)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::FileConvergenceLayer::validate_dir </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>dir</em> </td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Validate that a given directory exists and that the permissions are correct. <p> <p>Definition at line <a class="el" href="FileConvergenceLayer_8cc-source.html#l00096">96</a> of file <a class="el" href="FileConvergenceLayer_8cc-source.html">FileConvergenceLayer.cc</a>.</p> <p>References <a class="el" href="IPDiscovery_8cc.html#d65a8842cc674e3ddf69355898c0ecbf">errno</a>.</p> </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="fd5ae6a7a99000a59029a2a5b4f7da99"></a><!-- doxytag: member="dtn::FileConvergenceLayer::CURRENT_VERSION" ref="fd5ae6a7a99000a59029a2a5b4f7da99" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const int <a class="el" href="classdtn_1_1FileConvergenceLayer.html#fd5ae6a7a99000a59029a2a5b4f7da99">dtn::FileConvergenceLayer::CURRENT_VERSION</a> = 0x1<code> [static, protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> Current version of the file cl protocol. <p> <p>Definition at line <a class="el" href="FileConvergenceLayer_8h-source.html#l00045">45</a> of file <a class="el" href="FileConvergenceLayer_8h-source.html">FileConvergenceLayer.h</a>.</p> <p>Referenced by <a class="el" href="FileConvergenceLayer_8cc-source.html#l00210">send_bundle()</a>.</p> </div> </div><p> <a class="anchor" name="67adbe5740c6c3027f0b4d3ababef243"></a><!-- doxytag: member="dtn::FileConvergenceLayer::packed" ref="67adbe5740c6c3027f0b4d3ababef243" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">struct <a class="el" href="structdtn_1_1FileConvergenceLayer_1_1FileHeader.html">dtn::FileConvergenceLayer::FileHeader</a> <a class="el" href="classdtn_1_1FileConvergenceLayer.html#67adbe5740c6c3027f0b4d3ababef243">dtn::FileConvergenceLayer::packed</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> Framing header at the beginning of each bundle file. <p> </div> </div><p> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="FileConvergenceLayer_8h-source.html">FileConvergenceLayer.h</a><li><a class="el" href="FileConvergenceLayer_8cc-source.html">FileConvergenceLayer.cc</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 21 14:09:52 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>