dtn::FileConvergenceLayer Class Reference

#include <FileConvergenceLayer.h>

Inheritance diagram for dtn::FileConvergenceLayer:
dtn::ConvergenceLayer

List of all members.

Classes

struct  FileHeader
 Framing header at the beginning of each bundle file. More...
class  Scanner
 Helper class (and thread) that periodically scans a directory for new bundle files. More...

Public Member Functions

 FileConvergenceLayer ()
 Constructor.



static const int CURRENT_VERSION = 0x1
 Current version of the file cl protocol.
struct
dtn::FileConvergenceLayer::FileHeader 
packed
 Framing header at the beginning of each bundle file.
virtual bool interface_up (Interface *iface, int argc, const char *argv[])
 Bring up a new interface.
virtual bool interface_down (Interface *iface)
 Bring down the interface.
virtual bool open_contact (const ContactRef &contact)
 Validate that the contact eid specifies a legit directory.
virtual bool close_contact (const ContactRef &contact)
 Close the connnection to the contact.
virtual void send_bundle (const ContactRef &contact, Bundle *bundle)
 Try to send the bundles queued up for the given contact.
bool extract_dir (const char *nexthop, std::string *dirp)
 Pull a filesystem directory out of the next hop admin address.
bool validate_dir (const std::string &dir)
 Validate that a given directory exists and that the permissions are correct.

Detailed Description

Definition at line 25 of file FileConvergenceLayer.h.


Constructor & Destructor Documentation

dtn::FileConvergenceLayer::FileConvergenceLayer (  ) 

Constructor.

Definition at line 47 of file FileConvergenceLayer.cc.


Member Function Documentation

bool dtn::FileConvergenceLayer::close_contact ( const ContactRef contact  )  [virtual]

Close the connnection to the contact.

Reimplemented from dtn::ConvergenceLayer.

Definition at line 199 of file FileConvergenceLayer.cc.

bool dtn::FileConvergenceLayer::extract_dir ( const char *  nexthop,
std::string *  dirp 
) [protected]

Pull a filesystem directory out of the next hop admin address.

Pull a filesystem directory out of the next hop ssp.

Definition at line 56 of file FileConvergenceLayer.cc.

Referenced by send_bundle().

bool dtn::FileConvergenceLayer::interface_down ( Interface iface  )  [virtual]

Bring down the interface.

Reimplemented from dtn::ConvergenceLayer.

Definition at line 156 of file FileConvergenceLayer.cc.

References dtn::Interface::cl_info(), and dtn::FileConvergenceLayer::Scanner::stop().

bool dtn::FileConvergenceLayer::interface_up ( Interface iface,
int  argc,
const char *  argv[] 
) [virtual]

Bring up a new interface.

Reimplemented from dtn::ConvergenceLayer.

Definition at line 118 of file FileConvergenceLayer.cc.

bool dtn::FileConvergenceLayer::open_contact ( const ContactRef contact  )  [virtual]

Validate that the contact eid specifies a legit directory.

Implements dtn::ConvergenceLayer.

Definition at line 173 of file FileConvergenceLayer.cc.

References ASSERT.

void dtn::FileConvergenceLayer::send_bundle ( const ContactRef contact,
Bundle bundle 
) [virtual]
bool dtn::FileConvergenceLayer::validate_dir ( const std::string &  dir  )  [protected]

Validate that a given directory exists and that the permissions are correct.

Definition at line 96 of file FileConvergenceLayer.cc.

References errno.


Member Data Documentation

const int dtn::FileConvergenceLayer::CURRENT_VERSION = 0x1 [static, protected]

Current version of the file cl protocol.

Definition at line 45 of file FileConvergenceLayer.h.

Referenced by send_bundle().

Framing header at the beginning of each bundle file.


The documentation for this class was generated from the following files:
Generated on Sun Nov 21 13:21:17 2010 for DTN Reference Implementation by  doxygen 1.6.3