#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 (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 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 57 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_, 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 92 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().
Bring down the interface.
Reimplemented from dtn::ConvergenceLayer.
Definition at line 145 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 165 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_.
Create any CL-specific components of the Link.
Reimplemented from dtn::ConvergenceLayer.
Definition at line 183 of file UDPConvergenceLayer.cc.
References defaults_, INADDR_NONE, 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 221 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 234 of file UDPConvergenceLayer.cc.
References 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 284 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 300 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 70 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().
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 UDPConvergenceLayer().
Default parameters.
Definition at line 114 of file UDPConvergenceLayer.h.
Referenced by init_link(), interface_up(), and UDPConvergenceLayer().
1.5.3