IBR-DTNSuite  0.12
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
 
dtn::net::ConnectionManagergetConnectionManager ()
 
dtn::net::DiscoveryAgentgetDiscoveryAgent ()
 
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 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 64 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 261 of file BundleCore.cpp.

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

Referenced by dtn::net::ConnectionManager::add(), and 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 246 of file BundleCore.cpp.

dtn::net::ConnectionManager & dtn::core::BundleCore::getConnectionManager ( )

Make the connection manager available to other modules.

Returns
The connection manager reference

Definition at line 251 of file BundleCore.cpp.

Referenced by dtn::daemon::NativeDaemon::addConnection(), dtn::net::WifiP2PManager::componentDown(), dtn::dht::DHTNameService::componentRun(), dtn::net::WifiP2PManager::componentUp(), dtn_dht_handle_lookup_result(), dtn::routing::NeighborRoutingExtension::eventBundleQueued(), dtn::routing::FloodRoutingExtension::eventBundleQueued(), dtn::routing::EpidemicRoutingExtension::eventBundleQueued(), dtn::routing::ProphetRoutingExtension::eventBundleQueued(), dtn::api::ApiP2PExtensionHandler::finally(), dtn::net::P2PDialupExtension::fireConnected(), dtn::net::P2PDialupExtension::fireDisconnected(), dtn::net::P2PDialupExtension::fireDiscovered(), dtn::daemon::NativeDaemon::getInfo(), dtn::daemon::NativeDaemon::getNeighbors(), dtn::daemon::NativeDaemon::getStats(), dtn::daemon::NativeDaemon::initiateConnection(), dtn::net::DiscoveryAgent::onBeaconReceived(), dtn::net::P2PDialupExtension::P2PDialupExtension(), dtn::routing::RetransmissionExtension::raiseEvent(), dtn::daemon::DTNTPWorker::raiseEvent(), dtn::routing::BaseRouter::raiseEvent(), dtn::daemon::NativeDaemon::removeConnection(), dtn::api::ExtendedApiHandler::run(), dtn::routing::FloodRoutingExtension::run(), dtn::routing::EpidemicRoutingExtension::run(), dtn::api::ApiP2PExtensionHandler::setup(), dtn::routing::RoutingExtension::transferTo(), and dtn::net::P2PDialupExtension::~P2PDialupExtension().

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

Definition at line 76 of file BundleCore.cpp.

Referenced by dtn::routing::AcknowledgementSet::add(), dtn::net::ConnectionManager::add(), dtn::daemon::NativeDaemon::addConnection(), dtn::routing::BaseRouter::BaseRouter(), dtn::daemon::CapsuleWorker::callbackBundleReceived(), dtn::daemon::NativeDaemon::clearStorage(), dtn::net::WifiP2PManager::componentDown(), dtn::net::IPNDAgent::componentDown(), dtn::net::UDPConvergenceLayer::componentDown(), dtn::net::LOWPANConvergenceLayer::componentDown(), dtn::net::DatagramConvergenceLayer::componentDown(), dtn::net::EMailConvergenceLayer::componentDown(), dtn::dht::DHTNameService::componentDown(), dtn::net::FileConvergenceLayer::componentRun(), dtn::net::IPNDAgent::componentRun(), dtn::core::FragmentManager::componentRun(), dtn::net::LOWPANConvergenceLayer::componentRun(), dtn::net::DatagramConvergenceLayer::componentRun(), dtn::dht::DHTNameService::componentRun(), dtn::net::WifiP2PManager::componentUp(), dtn::net::IPNDAgent::componentUp(), dtn::net::UDPConvergenceLayer::componentUp(), dtn::net::LOWPANConvergenceLayer::componentUp(), dtn::net::DatagramConvergenceLayer::componentUp(), dtn::net::EMailConvergenceLayer::componentUp(), dtn::dht::DHTNameService::componentUp(), dtn::api::NativeSession::delivered(), dtn_dht_handle_lookup_result(), dtn::daemon::DTNTPWorker::DTNTPWorker(), dtn::routing::NeighborRoutingExtension::eventBundleQueued(), dtn::routing::FloodRoutingExtension::eventBundleQueued(), dtn::routing::EpidemicRoutingExtension::eventBundleQueued(), dtn::routing::ProphetRoutingExtension::eventBundleQueued(), dtn::net::TCPConnection::eventConnectionUp(), 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::net::DiscoveryAgent::onBeaconReceived(), dtn::routing::RoutingExtension::operator*(), dtn::net::P2PDialupExtension::P2PDialupExtension(), dtn::net::UDPConvergenceLayer::queue(), dtn::net::HTTPConvergenceLayer::queue(), dtn::routing::RetransmissionExtension::raiseEvent(), dtn::daemon::DTNTPWorker::raiseEvent(), dtn::net::IPNDAgent::raiseEvent(), dtn::net::TCPConvergenceLayer::raiseEvent(), raiseEvent(), dtn::routing::BaseRouter::raiseEvent(), dtn::net::DatagramConvergenceLayer::receive(), dtn::api::Registration::receive(), dtn::daemon::NativeDaemon::removeConnection(), dtn::net::LOWPANConnectionSender::run(), dtn::api::ExtendedApiHandler::run(), dtn::routing::FloodRoutingExtension::run(), dtn::net::DatagramConnection::run(), dtn::routing::EpidemicRoutingExtension::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(), dtn::routing::BaseRouter::~BaseRouter(), dtn::daemon::DTNTPWorker::~DTNTPWorker(), dtn::net::P2PDialupExtension::~P2PDialupExtension(), and dtn::net::TCPConvergenceLayer::~TCPConvergenceLayer().

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 218 of file BundleCore.cpp.

Referenced by dtn::routing::RoutingExtension::operator*().

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 271 of file BundleCore.cpp.

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 266 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)
void dtn::core::BundleCore::setSeeker ( dtn::storage::BundleSeeker seeker)

Definition at line 208 of file BundleCore.cpp.

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

Definition at line 203 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 129 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 135 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 150 of file BundleCore.h.

Referenced by onConfigurationChanged(), and validate().

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

Definition at line 69 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::core::FragmentManager::componentRun(), dtn::net::HTTPConvergenceLayer::componentRun(), dtn::net::LOWPANConvergenceLayer::componentRun(), dtn::dht::DHTNameService::componentRun(), dtn::security::SecurityManager::decrypt(), dtn::net::ConnectionManager::discovered(), dtn_dht_handle_lookup_result(), dtn::security::SecurityManager::encrypt(), dtn::net::TCPConnection::eventConnectionUp(), dtn::daemon::NativeDaemon::getLocalUri(), dtn::api::NativeSession::getNodeEID(), dtn::net::DiscoveryAgent::obtainBeacon(), dtn::net::DiscoveryAgent::onBeaconReceived(), 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::net::DatagramConvergenceLayer::receive(), dtn::storage::BundleStorage::rejectCustody(), dtn::api::NativeSession::removeEndpoint(), dtn::api::BinaryStreamClient::run(), dtn::api::ExtendedApiHandler::run(), dtn::routing::FloodRoutingExtension::run(), dtn::routing::StaticRoutingExtension::run(), dtn::routing::EpidemicRoutingExtension::run(), dtn::net::TCPConnection::run(), 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 140 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 145 of file BundleCore.h.

Referenced by onConfigurationChanged(), and validate().


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