|
IBR-DTNSuite 0.6
|
#include <BundleCore.h>


Public Member Functions | |
| WallClock & | getClock () |
| void | setStorage (dtn::core::BundleStorage *storage) |
| dtn::core::BundleStorage & | getStorage () |
| void | transferTo (const dtn::data::EID &destination, const dtn::data::BundleID &bundle) |
| void | addConvergenceLayer (dtn::net::ConvergenceLayer *cl) |
| void | addConnection (const dtn::core::Node &n) |
| const std::set< dtn::core::Node > | getNeighbors () |
| void | raiseEvent (const dtn::core::Event *evt) |
| virtual void | validate (const dtn::data::PrimaryBlock &obj) const throw (RejectedException) |
| virtual void | validate (const dtn::data::Block &obj, const size_t length) const throw (RejectedException) |
| virtual void | validate (const dtn::data::Bundle &obj) const throw (RejectedException) |
| virtual const std::string | getName () const |
Static Public Member Functions | |
| static BundleCore & | getInstance () |
| static void | processBlocks (dtn::data::Bundle &b) |
Static Public Attributes | |
| static dtn::data::EID | local |
| static size_t | blocksizelimit = 0 |
| static bool | forwarding = true |
Protected Member Functions | |
| virtual void | componentUp () |
| virtual void | componentDown () |
The BundleCore manage the Bundle Protocol basics
Definition at line 31 of file BundleCore.h.
| void dtn::core::BundleCore::addConnection | ( | const dtn::core::Node & | n | ) |
Definition at line 124 of file BundleCore.cpp.
References dtn::net::ConnectionManager::addConnection().
Referenced by __daemon_run().

| void dtn::core::BundleCore::addConvergenceLayer | ( | dtn::net::ConvergenceLayer * | cl | ) |
Definition at line 119 of file BundleCore.cpp.
References dtn::net::ConnectionManager::addConvergenceLayer().
Referenced by createConvergenceLayers().

| void dtn::core::BundleCore::componentDown | ( | ) | [protected, virtual] |
Implements dtn::daemon::IntegratedComponent.
Definition at line 79 of file BundleCore.cpp.
References dtn::daemon::IntegratedComponent::terminate().

| void dtn::core::BundleCore::componentUp | ( | ) | [protected, virtual] |
Implements dtn::daemon::IntegratedComponent.
Definition at line 70 of file BundleCore.cpp.
References dtn::daemon::IntegratedComponent::initialize(), and dtn::daemon::IntegratedComponent::startup().

| WallClock & dtn::core::BundleCore::getClock | ( | ) |
Definition at line 99 of file BundleCore.cpp.
| BundleCore & dtn::core::BundleCore::getInstance | ( | ) | [static] |
Definition at line 41 of file BundleCore.cpp.
Referenced by __daemon_run(), dtn::routing::RetransmissionExtension::notify(), dtn::routing::EpidemicRoutingExtension::notify(), dtn::net::UDPConvergenceLayer::operator>>(), dtn::net::operator>>(), dtn::net::LOWPANConvergenceLayer::operator>>(), dtn::api::operator>>(), processBlocks(), dtn::net::UDPConvergenceLayer::queue(), dtn::net::LOWPANConvergenceLayer::queue(), dtn::net::HTTPConvergenceLayer::queue(), dtn::routing::NeighborRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), and dtn::routing::BaseRouter::Extension::transferTo().
| const std::string dtn::core::BundleCore::getName | ( | ) | const [virtual] |
Implements dtn::daemon::Component.
Definition at line 276 of file BundleCore.cpp.
| const std::set< dtn::core::Node > dtn::core::BundleCore::getNeighbors | ( | ) |
Definition at line 129 of file BundleCore.cpp.
References dtn::net::ConnectionManager::getNeighbors().

| dtn::core::BundleStorage & dtn::core::BundleCore::getStorage | ( | ) |
Definition at line 90 of file BundleCore.cpp.
Referenced by __daemon_run(), and raiseEvent().
| void dtn::core::BundleCore::processBlocks | ( | dtn::data::Bundle & | b | ) | [static] |
Definition at line 281 of file BundleCore.cpp.
References dtn::data::CompressedPayloadBlock::BLOCK_TYPE, dtn::security::PayloadConfidentialBlock::BLOCK_TYPE, dtn::data::CompressedPayloadBlock::extract(), dtn::data::Bundle::getBlocks(), getInstance(), dtn::data::Block::getType(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, and ibrcommon::Exception::what().

| void dtn::core::BundleCore::raiseEvent | ( | const dtn::core::Event * | evt | ) | [virtual] |
Implements dtn::core::EventReceiver.
Definition at line 134 of file BundleCore.cpp.
References dtn::data::CustodySignalBlock::_bundle_sequence, dtn::data::CustodySignalBlock::_bundle_timestamp, dtn::data::CustodySignalBlock::_fragment_length, dtn::data::CustodySignalBlock::_fragment_offset, dtn::data::PrimaryBlock::_source, dtn::data::CustodySignalBlock::_source, dtn::routing::QueueBundleEvent::bundle, dtn::core::BUNDLE_DELETED, dtn::core::BUNDLE_DELIVERED, dtn::data::MetaBundle::destination, dtn::data::StatusReportBlock::DESTINATION_ENDPOINT_ID_UNINTELLIGIBLE, dtn::core::BundleStorage::get(), dtn::data::Bundle::getBlock(), getStorage(), dtn::data::SDNV::getValue(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, local, dtn::core::BundleEvent::raise(), dtn::core::BundleStorage::releaseCustody(), dtn::core::BundleStorage::remove(), and dtn::data::Bundle::toString().

| void dtn::core::BundleCore::setStorage | ( | dtn::core::BundleStorage * | storage | ) |
Definition at line 85 of file BundleCore.cpp.
Referenced by createBundleStorage().
| void dtn::core::BundleCore::transferTo | ( | const dtn::data::EID & | destination, |
| const dtn::data::BundleID & | bundle | ||
| ) |
Definition at line 104 of file BundleCore.cpp.
References dtn::net::ConnectionManager::queue(), and dtn::routing::RequeueBundleEvent::raise().

| void dtn::core::BundleCore::validate | ( | const dtn::data::PrimaryBlock & | obj | ) | const throw (RejectedException) [virtual] |
Implements dtn::data::Validator.
Definition at line 180 of file BundleCore.cpp.
References forwarding, IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, and local.
| void dtn::core::BundleCore::validate | ( | const dtn::data::Bundle & | obj | ) | const throw (RejectedException) [virtual] |
Implements dtn::data::Validator.
Definition at line 224 of file BundleCore.cpp.
References dtn::data::StatusReportBlock::BLOCK_UNINTELLIGIBLE, dtn::core::BUNDLE_RECEIVED, dtn::data::Block::DELETE_BUNDLE_IF_NOT_PROCESSED, dtn::data::Block::get(), dtn::security::SecurityManager::getInstance(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, dtn::utils::Clock::isExpired(), dtn::core::BundleEvent::raise(), and dtn::data::Block::TRANSMIT_STATUSREPORT_IF_NOT_PROCESSED.

| void dtn::core::BundleCore::validate | ( | const dtn::data::Block & | obj, |
| const size_t | length | ||
| ) | const throw (RejectedException) [virtual] |
Implements dtn::data::Validator.
Definition at line 205 of file BundleCore.cpp.
References blocksizelimit, IBRCOMMON_LOGGER, and IBRCOMMON_LOGGER_ENDL.
size_t dtn::core::BundleCore::blocksizelimit = 0 [static] |
Define a global block size limit. This is used in the validator to reject bundles while receiving.
Definition at line 60 of file BundleCore.h.
Referenced by setGlobalVars(), and validate().
bool dtn::core::BundleCore::forwarding = true [static] |
Define if forwarding is allowed. If set to false, this daemon only accepts bundles for local applications.
Definition at line 65 of file BundleCore.h.
Referenced by __daemon_run(), and validate().
Definition at line 34 of file BundleCore.h.
Referenced by dtn::core::BundleStorage::acceptCustody(), dtn::security::SecurityManager::auth(), dtn::net::TCPConvergenceLayer::componentRun(), dtn::net::HTTPConvergenceLayer::componentRun(), dtn::security::SecurityManager::decrypt(), dtn::net::ConnectionManager::discovered(), dtn::security::SecurityManager::encrypt(), dtn::core::AbstractWorker::initialize(), dtn::net::TCPConvergenceLayer::open(), dtn::net::TCPConvergenceLayer::queue(), dtn::net::HTTPConvergenceLayer::queue(), dtn::routing::BaseRouter::raiseEvent(), raiseEvent(), dtn::core::BundleStorage::rejectCustody(), dtn::routing::EpidemicRoutingExtension::run(), dtn::api::ClientHandler::run(), dtn::net::IPNDAgent::sendAnnoucement(), setGlobalVars(), dtn::security::SecurityManager::sign(), dtn::core::SQLiteBundleStorage::store(), validate(), and dtn::security::SecurityManager::verifyPIB().