#include <UDPConvergenceLayer.h>
Definition at line 28 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 (const LinkRef &link, int argc, const char *argv[]) |
Create any CL-specific components of the Link. | |
void | delete_link (const LinkRef &link) |
Delete any CL-specific components of the Link. | |
void | dump_link (const LinkRef &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 | bundle_queued (const LinkRef &link, const BundleRef &bundle) |
Send the bundle out the link. | |
Static Public Attributes | |
static const u_int | MAX_BUNDLE_LEN = 65507 |
Maximum bundle size. | |
static const u_int16_t | UDPCL_DEFAULT_PORT = 4556 |
Default port used by the udp cl. | |
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 |
dtn::UDPConvergenceLayer::UDPConvergenceLayer | ( | ) |
Constructor.
Definition at line 52 of file UDPConvergenceLayer.cc.
References dtn::UDPConvergenceLayer::Params::bucket_depth_, defaults_, dtn::UDPConvergenceLayer::Params::local_addr_, dtn::UDPConvergenceLayer::Params::local_port_, dtn::UDPConvergenceLayer::Params::rate_, dtn::UDPConvergenceLayer::Params::remote_addr_, dtn::UDPConvergenceLayer::Params::remote_port_, and UDPCL_DEFAULT_PORT.
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 87 of file UDPConvergenceLayer.cc.
References defaults_, dtn::Interface::name(), parse_params(), and dtn::Interface::set_cl_info().
Bring down the interface.
Reimplemented from dtn::ConvergenceLayer.
Definition at line 140 of file UDPConvergenceLayer.cc.
References dtn::Interface::cl_info().
void dtn::UDPConvergenceLayer::dump_interface | ( | Interface * | iface, | |
oasys::StringBuffer * | buf | |||
) | [virtual] |
Dump out CL specific interface information.
Reimplemented from dtn::ConvergenceLayer.
Definition at line 160 of file UDPConvergenceLayer.cc.
References dtn::Interface::cl_info(), 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 | ( | const LinkRef & | link, | |
int | argc, | |||
const char * | argv[] | |||
) | [virtual] |
Create any CL-specific components of the Link.
Reimplemented from dtn::ConvergenceLayer.
Definition at line 178 of file UDPConvergenceLayer.cc.
References ASSERT, defaults_, MAX_BUNDLE_LEN, dtn::IPConvergenceLayer::parse_nexthop(), and parse_params().
void dtn::UDPConvergenceLayer::delete_link | ( | const LinkRef & | link | ) | [virtual] |
Delete any CL-specific components of the Link.
Reimplemented from dtn::ConvergenceLayer.
Definition at line 221 of file UDPConvergenceLayer.cc.
References ASSERT.
void dtn::UDPConvergenceLayer::dump_link | ( | const LinkRef & | link, | |
oasys::StringBuffer * | buf | |||
) | [virtual] |
Dump out CL specific link information.
Reimplemented from dtn::ConvergenceLayer.
Definition at line 236 of file UDPConvergenceLayer.cc.
References ASSERT.
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 253 of file UDPConvergenceLayer.cc.
References ASSERT, dtn::UDPConvergenceLayer::Sender::init(), dtn::ContactEvent::NO_INFO, dtn::IPConvergenceLayer::parse_nexthop(), dtn::BundleDaemon::post(), UDPCL_DEFAULT_PORT, 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 309 of file UDPConvergenceLayer.cc.
void dtn::UDPConvergenceLayer::bundle_queued | ( | const LinkRef & | link, | |
const BundleRef & | bundle | |||
) | [virtual] |
Send the bundle out the link.
Implements dtn::ConvergenceLayer.
Definition at line 325 of file UDPConvergenceLayer.cc.
References ASSERT, dtn::UDPConvergenceLayer::Sender::contact_, len, 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 65 of file UDPConvergenceLayer.cc.
References dtn::UDPConvergenceLayer::Params::bucket_depth_, 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_.
Referenced by init_link(), and interface_up().
const u_int dtn::UDPConvergenceLayer::MAX_BUNDLE_LEN = 65507 [static] |
Maximum bundle size.
Definition at line 33 of file UDPConvergenceLayer.h.
Referenced by init_link(), and dtn::UDPConvergenceLayer::Sender::send_bundle().
const u_int16_t dtn::UDPConvergenceLayer::UDPCL_DEFAULT_PORT = 4556 [static] |
Default port used by the udp cl.
Definition at line 38 of file UDPConvergenceLayer.h.
Referenced by open_contact(), and UDPConvergenceLayer().
Default parameters.
Definition at line 119 of file UDPConvergenceLayer.h.
Referenced by init_link(), interface_up(), and UDPConvergenceLayer().