dtn::UDPConvergenceLayer Class Reference

#include <UDPConvergenceLayer.h>

Inheritance diagram for dtn::UDPConvergenceLayer:

dtn::IPConvergenceLayer dtn::ConvergenceLayer oasys::Logger List of all members.

Detailed Description

Definition at line 49 of file UDPConvergenceLayer.h.

Public Member Functions

 UDPConvergenceLayer ()
 Constructor.
bool interface_up (Interface *iface, int argc, const char *argv[])
 Bring up a new interface.
bool interface_down (Interface *iface)
 Bring down the interface.
void dump_interface (Interface *iface, oasys::StringBuffer *buf)
 Dump out CL specific interface information.
bool init_link (Link *link, int argc, const char *argv[])
 Create any CL-specific components of the Link.
void dump_link (Link *link, oasys::StringBuffer *buf)
 Dump out CL specific link information.
bool open_contact (const ContactRef &contact)
 Open the connection to a given contact and send/listen for bundles over this contact.
bool close_contact (const ContactRef &contact)
 Close the connnection to the contact.
void send_bundle (const ContactRef &contact, Bundle *bundle)
 Send the bundle out the link.

Static Public Attributes

static const u_int MAX_BUNDLE_LEN = 65507
 Maximum bundle size.
static Params defaults_
 Default parameters.

Protected Member Functions

bool parse_params (Params *params, int argc, const char **argv, const char **invalidp)

Classes

class  Params
 Tunable parameter structure. More...
class  Receiver
 Helper class (and thread) that listens on a registered interface for incoming data. More...
class  Sender


Constructor & Destructor Documentation

dtn::UDPConvergenceLayer::UDPConvergenceLayer (  ) 

Constructor.

Definition at line 59 of file UDPConvergenceLayer.cc.

References dtn::UDPConvergenceLayer::Params::bucket_depth_, defaults_, INADDR_NONE, dtn::UDPConvergenceLayer::Params::local_addr_, dtn::UDPConvergenceLayer::Params::local_port_, dtn::UDPConvergenceLayer::Params::rate_, dtn::UDPConvergenceLayer::Params::remote_addr_, and dtn::UDPConvergenceLayer::Params::remote_port_.


Member Function Documentation

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

Bring up a new interface.

Reimplemented from dtn::ConvergenceLayer.

Definition at line 94 of file UDPConvergenceLayer.cc.

References oasys::IPSocket::bind(), oasys::IPSocket::connect(), defaults_, INADDR_NONE, log_debug, log_err, oasys::Logger::logpath_, oasys::Logger::logpathf(), dtn::Interface::name(), parse_params(), dtn::Interface::set_cl_info(), and oasys::Thread::start().

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

Bring down the interface.

Reimplemented from dtn::ConvergenceLayer.

Definition at line 147 of file UDPConvergenceLayer.cc.

References dtn::Interface::cl_info(), oasys::IOHandlerBase::interrupt_from_io(), oasys::Thread::is_stopped(), oasys::Thread::set_should_stop(), and oasys::Thread::yield().

void dtn::UDPConvergenceLayer::dump_interface ( Interface iface,
oasys::StringBuffer buf 
) [virtual]

Dump out CL specific interface information.

Reimplemented from dtn::ConvergenceLayer.

Definition at line 167 of file UDPConvergenceLayer.cc.

References oasys::StringBuffer::appendf(), dtn::Interface::cl_info(), INADDR_NONE, intoa, dtn::UDPConvergenceLayer::Params::local_addr_, dtn::UDPConvergenceLayer::Params::local_port_, dtn::UDPConvergenceLayer::Params::remote_addr_, and dtn::UDPConvergenceLayer::Params::remote_port_.

bool dtn::UDPConvergenceLayer::init_link ( Link link,
int  argc,
const char *  argv[] 
) [virtual]

Create any CL-specific components of the Link.

Reimplemented from dtn::ConvergenceLayer.

Definition at line 185 of file UDPConvergenceLayer.cc.

References defaults_, INADDR_NONE, dtn::UDPConvergenceLayer::Params::local_addr_, dtn::UDPConvergenceLayer::Params::local_port_, log_debug, log_err, MAX_BUNDLE_LEN, dtn::Link::nexthop(), dtn::Link::params(), dtn::IPConvergenceLayer::parse_nexthop(), parse_params(), dtn::Link::set_cl_info(), and dtn::Link::type_str().

void dtn::UDPConvergenceLayer::dump_link ( Link link,
oasys::StringBuffer buf 
) [virtual]

Dump out CL specific link information.

Reimplemented from dtn::ConvergenceLayer.

Definition at line 237 of file UDPConvergenceLayer.cc.

References oasys::StringBuffer::appendf(), dtn::Link::cl_info(), intoa, dtn::UDPConvergenceLayer::Params::local_addr_, dtn::UDPConvergenceLayer::Params::local_port_, dtn::UDPConvergenceLayer::Params::remote_addr_, and dtn::UDPConvergenceLayer::Params::remote_port_.

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

Open the connection to a given contact and send/listen for bundles over this contact.

Implements dtn::ConvergenceLayer.

Definition at line 250 of file UDPConvergenceLayer.cc.

References ASSERT, dtn::Link::cl_info(), dtn::Link::contact(), INADDR_NONE, dtn::UDPConvergenceLayer::Sender::init(), log_debug, log_err, dtn::Link::nexthop(), dtn::ContactEvent::NO_INFO, dtn::IPConvergenceLayer::parse_nexthop(), dtn::BundleDaemon::post(), and dtn::Link::UNAVAILABLE.

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

Close the connnection to the contact.

Reimplemented from dtn::ConvergenceLayer.

Definition at line 288 of file UDPConvergenceLayer.cc.

References log_info, and oasys::Ref< _Type >::object().

void dtn::UDPConvergenceLayer::send_bundle ( const ContactRef contact,
Bundle bundle 
) [virtual]

Send the bundle out the link.

Implements dtn::ConvergenceLayer.

Definition at line 304 of file UDPConvergenceLayer.cc.

References ASSERT, dtn::UDPConvergenceLayer::Sender::contact_, log_crit, oasys::Ref< _Type >::object(), dtn::BundleDaemon::post(), and dtn::UDPConvergenceLayer::Sender::send_bundle().

bool dtn::UDPConvergenceLayer::parse_params ( Params params,
int  argc,
const char **  argv,
const char **  invalidp 
) [protected]

Definition at line 72 of file UDPConvergenceLayer.cc.

References oasys::OptParser::addopt(), dtn::UDPConvergenceLayer::Params::bucket_depth_, dtn::UDPConvergenceLayer::Params::local_addr_, dtn::UDPConvergenceLayer::Params::local_port_, oasys::OptParser::parse(), dtn::UDPConvergenceLayer::Params::rate_, dtn::UDPConvergenceLayer::Params::remote_addr_, and dtn::UDPConvergenceLayer::Params::remote_port_.

Referenced by init_link(), and interface_up().


Member Data Documentation

const u_int dtn::UDPConvergenceLayer::MAX_BUNDLE_LEN = 65507 [static]

Maximum bundle size.

Definition at line 54 of file UDPConvergenceLayer.h.

Referenced by init_link(), and dtn::UDPConvergenceLayer::Sender::send_bundle().

Params dtn::UDPConvergenceLayer::defaults_ [static]

Default parameters.

Definition at line 125 of file UDPConvergenceLayer.h.

Referenced by init_link(), interface_up(), and UDPConvergenceLayer().


The documentation for this class was generated from the following files:
Generated on Fri Dec 22 14:48:04 2006 for DTN Reference Implementation by  doxygen 1.5.1