IBR-DTNSuite  0.10
dtn::core::BundleCore Class Reference

#include <BundleCore.h>

Inheritance diagram for dtn::core::BundleCore:
Inheritance graph
Collaboration diagram for dtn::core::BundleCore:
Collaboration graph

Public Member Functions

WallClockgetClock ()
 
virtual void onConfigurationChanged (const dtn::daemon::Configuration &conf) throw ()
 
void setStorage (dtn::storage::BundleStorage *storage)
 
dtn::storage::BundleStoragegetStorage ()
 
void setSeeker (dtn::storage::BundleSeeker *seeker)
 
dtn::storage::BundleSeekergetSeeker ()
 
void setRouter (dtn::routing::BaseRouter *router)
 
dtn::routing::BaseRoutergetRouter () const
 
void transferTo (dtn::net::BundleTransfer &transfer) throw (P2PDialupException)
 
dtn::net::ConnectionManagergetConnectionManager ()
 
void addRoute (const dtn::data::EID &destination, const dtn::data::EID &nexthop, const dtn::data::Timeout timeout=0)
 
void removeRoute (const dtn::data::EID &destination, const dtn::data::EID &nexthop)
 
bool isGloballyConnected () const
 
void raiseEvent (const dtn::core::Event *evt) throw ()
 
virtual void validate (const dtn::data::PrimaryBlock &obj) const throw (RejectedException)
 
virtual void validate (const dtn::data::Block &obj, const dtn::data::Number &) const throw (RejectedException)
 
virtual void validate (const dtn::data::PrimaryBlock &bundle, const dtn::data::Block &obj, const dtn::data::Number &) const throw (RejectedException)
 
virtual void validate (const dtn::data::Bundle &obj) const throw (RejectedException)
 
virtual void validate (const dtn::data::MetaBundle &obj) const throw (RejectedException)
 
virtual const std::string getName () const
 
void setGloballyConnected (bool val)
 
void eventNotify (const ibrcommon::LinkEvent &evt)
 
- Public Member Functions inherited from dtn::daemon::IntegratedComponent
 IntegratedComponent ()
 
virtual ~IntegratedComponent ()
 
virtual void initialize () throw ()
 
virtual void startup () throw ()
 
virtual void terminate () throw ()
 
- Public Member Functions inherited from dtn::daemon::Component
virtual ~Component ()=0
 
- Public Member Functions inherited from dtn::core::EventReceiver
virtual ~EventReceiver ()=0
 
- Public Member Functions inherited from dtn::data::Validator
virtual ~Validator ()
 
- Public Member Functions inherited from ibrcommon::LinkManager::EventCallback
virtual ~EventCallback ()
 

Static Public Member Functions

static BundleCoregetInstance ()
 
static void processBlocks (dtn::data::Bundle &b)
 

Static Public Attributes

static const std::string TAG = "BundleCore"
 
static dtn::data::EID local
 
static dtn::data::Length blocksizelimit = 0
 
static dtn::data::Length foreign_blocksizelimit = 0
 
static dtn::data::Length max_lifetime = 0
 
static dtn::data::Length max_timestamp_future = 0
 
static bool forwarding = true
 
static dtn::data::Size max_bundles_in_transit = 5
 

Protected Member Functions

virtual void componentUp () throw ()
 
virtual void componentDown () throw ()
 

Detailed Description

The BundleCore manage the Bundle Protocol basics

Definition at line 63 of file BundleCore.h.

Member Function Documentation

void dtn::core::BundleCore::addRoute ( const dtn::data::EID destination,
const dtn::data::EID nexthop,
const dtn::data::Timeout  timeout = 0 
)

Add a static route to the static routing module.

Parameters
destination
nexthop
timeout

Definition at line 262 of file BundleCore.cpp.

References dtn::routing::StaticRouteChangeEvent::raiseEvent(), and dtn::routing::StaticRouteChangeEvent::ROUTE_ADD.

Referenced by dtn_dht_handle_lookup_result().

Here is the call graph for this function:

void dtn::core::BundleCore::componentDown ( ) throw ()
protectedvirtual
void dtn::core::BundleCore::componentUp ( ) throw ()
protectedvirtual
void dtn::core::BundleCore::eventNotify ( const ibrcommon::LinkEvent evt)
virtual
WallClock & dtn::core::BundleCore::getClock ( )

Definition at line 237 of file BundleCore.cpp.

BundleCore & dtn::core::BundleCore::getInstance ( )
static

Definition at line 77 of file BundleCore.cpp.

Referenced by dtn::routing::AcknowledgementSet::add(), dtn::daemon::NativeDaemon::addConnection(), dtn::daemon::CapsuleWorker::callbackBundleReceived(), dtn::daemon::NativeDaemon::clearStorage(), dtn::net::WifiP2PManager::componentDown(), dtn::net::FileConvergenceLayer::componentRun(), dtn::core::FragmentManager::componentRun(), dtn::net::DatagramConvergenceLayer::componentRun(), dtn::dht::DHTNameService::componentRun(), dtn::net::WifiP2PManager::componentUp(), dtn::api::NativeSession::delivered(), dtn_dht_handle_lookup_result(), dtn::api::ApiP2PExtensionHandler::finally(), dtn::net::P2PDialupExtension::fireConnected(), dtn::net::P2PDialupExtension::fireDisconnected(), dtn::net::P2PDialupExtension::fireDiscovered(), dtn::api::NativeSession::free(), dtn::routing::NeighborDatabase::get(), dtn::daemon::NativeDaemon::getInfo(), dtn::daemon::NativeDaemon::getNeighbors(), dtn::routing::BaseRouter::getSeeker(), dtn::daemon::NativeDaemon::getStats(), dtn::routing::BaseRouter::getStorage(), dtn::daemon::NativeDaemon::initiateConnection(), dtn::core::Node::isAvailable(), dtn::api::NativeSession::load(), dtn::routing::RetransmissionExtension::notify(), dtn::routing::NeighborRoutingExtension::notify(), dtn::routing::FloodRoutingExtension::notify(), dtn::routing::EpidemicRoutingExtension::notify(), dtn::routing::ProphetRoutingExtension::notify(), dtn::net::P2PDialupExtension::P2PDialupExtension(), dtn::net::UDPConvergenceLayer::queue(), dtn::net::HTTPConvergenceLayer::queue(), dtn::daemon::DTNTPWorker::raiseEvent(), raiseEvent(), dtn::routing::BaseRouter::raiseEvent(), dtn::api::Registration::receive(), dtn::net::DiscoveryAgent::received(), dtn::daemon::NativeDaemon::removeConnection(), dtn::net::LOWPANConnectionSender::run(), dtn::api::ExtendedApiHandler::run(), dtn::net::DatagramConnection::run(), dtn::net::LOWPANConnection::run(), dtn::net::DownloadThread::run(), dtn::net::TCPConnection::run(), dtn::daemon::NativeDaemon::setConfigFile(), dtn::core::FragmentManager::setOffset(), dtn::api::ApiP2PExtensionHandler::setup(), dtn::routing::RoutingExtension::transferTo(), dtn::api::BundleStreamBuf::underflow(), dtn::api::Registration::underflow(), and dtn::net::P2PDialupExtension::~P2PDialupExtension().

const std::string dtn::core::BundleCore::getName ( ) const
virtual
See Also
Component::getName()

Implements dtn::daemon::Component.

Definition at line 565 of file BundleCore.cpp.

dtn::routing::BaseRouter & dtn::core::BundleCore::getRouter ( ) const

Definition at line 209 of file BundleCore.cpp.

dtn::storage::BundleSeeker & dtn::core::BundleCore::getSeeker ( )
bool dtn::core::BundleCore::isGloballyConnected ( ) const

Determine if this daemon is globally connected.

Returns
True, if the daemon is globally connected.

Definition at line 272 of file BundleCore.cpp.

void dtn::core::BundleCore::raiseEvent ( const dtn::core::Event evt) throw ()
virtual

Implements dtn::core::EventReceiver.

Definition at line 277 of file BundleCore.cpp.

References dtn::data::PrimaryBlock::APPDATA_IS_ADMRECORD, dtn::core::BundlePurgeEvent::bundle, dtn::routing::QueueBundleEvent::bundle, dtn::core::BUNDLE_DELETED, dtn::core::BUNDLE_DELIVERED, dtn::data::MetaBundle::destination, dtn::data::StatusReportBlock::DESTINATION_ENDPOINT_ID_UNINTELLIGIBLE, dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, dtn::data::Bundle::find(), dtn::data::BundleID::fragment, dtn::data::MetaBundle::get(), dtn::data::PrimaryBlock::get(), dtn::net::TransferCompletedEvent::getBundle(), dtn::net::TransferAbortedEvent::getBundleID(), getInstance(), dtn::data::EID::getNode(), dtn::net::TransferCompletedEvent::getPeer(), dtn::net::TransferAbortedEvent::getPeer(), getStorage(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, dtn::data::StatusReportBlock::NO_ADDITIONAL_INFORMATION, dtn::data::StatusReportBlock::NO_KNOWN_ROUTE_TO_DESTINATION_FROM_HERE, ibrcommon::LogLevel::notice, dtn::core::TimeAdjustmentEvent::offset, dtn::data::MetaBundle::procflags, dtn::core::BundlePurgeEvent::raise(), dtn::core::BundleEvent::raise(), dtn::data::CustodySignalBlock::read(), dtn::net::TransferAbortedEvent::reason, dtn::net::TransferAbortedEvent::REASON_REFUSED, dtn::storage::BundleStorage::remove(), dtn::utils::Clock::setOffset(), dtn::data::PrimaryBlock::source, dtn::data::BundleID::toString(), and dtn::data::Bundle::toString().

Here is the call graph for this function:

void dtn::core::BundleCore::removeRoute ( const dtn::data::EID destination,
const dtn::data::EID nexthop 
)

Remove a static route from the static routing module.

Parameters
destination
nexthop

Definition at line 267 of file BundleCore.cpp.

References dtn::routing::StaticRouteChangeEvent::raiseEvent(), and dtn::routing::StaticRouteChangeEvent::ROUTE_DEL.

Here is the call graph for this function:

void dtn::core::BundleCore::setGloballyConnected ( bool  val)
void dtn::core::BundleCore::setRouter ( dtn::routing::BaseRouter router)

Definition at line 204 of file BundleCore.cpp.

void dtn::core::BundleCore::setSeeker ( dtn::storage::BundleSeeker seeker)

Definition at line 199 of file BundleCore.cpp.

void dtn::core::BundleCore::setStorage ( dtn::storage::BundleStorage storage)

Definition at line 194 of file BundleCore.cpp.

void dtn::core::BundleCore::validate ( const dtn::data::PrimaryBlock obj) const throw (RejectedException)
virtual
void dtn::core::BundleCore::validate ( const dtn::data::Block obj,
const dtn::data::Number size 
) const throw (RejectedException)
virtual
void dtn::core::BundleCore::validate ( const dtn::data::PrimaryBlock bundle,
const dtn::data::Block obj,
const dtn::data::Number size 
) const throw (RejectedException)
virtual
void dtn::core::BundleCore::validate ( const dtn::data::MetaBundle obj) const throw (RejectedException)
virtual

Member Data Documentation

dtn::data::Length 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 125 of file BundleCore.h.

Referenced by onConfigurationChanged(), and validate().

dtn::data::Length dtn::core::BundleCore::foreign_blocksizelimit = 0
static

Define a global block size limit for foreign bundles (not addressed locally). This is used in the validator to reject bundles while receiving.

Definition at line 131 of file BundleCore.h.

Referenced by onConfigurationChanged(), 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 146 of file BundleCore.h.

Referenced by onConfigurationChanged(), and validate().

dtn::data::EID dtn::core::BundleCore::local
static

Definition at line 68 of file BundleCore.h.

Referenced by dtn::storage::BundleStorage::acceptCustody(), dtn::api::NativeSession::addEndpoint(), dtn::routing::DeliveryPredictabilityMap::age(), dtn::security::SecurityManager::auth(), dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::net::FileConvergenceLayer::componentRun(), dtn::core::FragmentManager::componentRun(), dtn::net::DatagramConvergenceLayer::componentRun(), dtn::net::HTTPConvergenceLayer::componentRun(), dtn::dht::DHTNameService::componentRun(), dtn::security::SecurityManager::decrypt(), dtn::net::ConnectionManager::discovered(), dtn_dht_handle_lookup_result(), dtn::security::SecurityManager::encrypt(), dtn::daemon::NativeDaemon::getLocalUri(), dtn::api::NativeSession::getNodeEID(), dtn::core::AbstractWorker::initialize(), onConfigurationChanged(), dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::routing::ProphetRoutingExtension::processHandshake(), dtn::api::Registration::processIncomingBundle(), dtn::routing::ProphetRoutingExtension::ProphetRoutingExtension(), dtn::net::HTTPConvergenceLayer::queue(), dtn::routing::BaseRouter::raiseEvent(), dtn::dht::DHTNameService::raiseEvent(), dtn::storage::BundleStorage::rejectCustody(), dtn::api::NativeSession::removeEndpoint(), dtn::api::OrderedStreamHandler::run(), dtn::routing::StaticRoutingExtension::run(), dtn::api::BinaryStreamClient::run(), dtn::routing::FloodRoutingExtension::run(), dtn::api::ExtendedApiHandler::run(), dtn::routing::EpidemicRoutingExtension::run(), dtn::net::TCPConnection::run(), dtn::net::IPNDAgent::sendAnnoucement(), dtn::net::DatagramConvergenceLayer::sendAnnoucement(), dtn::net::LOWPANConvergenceLayer::sendAnnoucement(), dtn::api::NativeSession::setEndpoint(), dtn::security::SecurityManager::sign(), dtn::core::FragmentManager::signal(), dtn::routing::DeliveryPredictabilityMap::update(), validate(), and dtn::security::SecurityManager::verifyPIB().

dtn::data::Length dtn::core::BundleCore::max_lifetime = 0
static

Define the maximum lifetime for accepted bundles

Definition at line 136 of file BundleCore.h.

Referenced by onConfigurationChanged(), and validate().

dtn::data::Length dtn::core::BundleCore::max_timestamp_future = 0
static

Define the maximum offset for the timestamp of pre-dated bundles

Definition at line 141 of file BundleCore.h.

Referenced by onConfigurationChanged(), and validate().

const std::string dtn::core::BundleCore::TAG = "BundleCore"
static

Definition at line 66 of file BundleCore.h.

Referenced by onConfigurationChanged().


The documentation for this class was generated from the following files: