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

#include <BundleCore.h>

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

List of all members.

Public Member Functions

WallClockgetClock ()
void setStorage (dtn::storage::BundleStorage *storage)
dtn::storage::BundleStoragegetStorage ()
void setRouter (dtn::routing::BaseRouter *router)
dtn::routing::BaseRoutergetRouter () const
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)
void removeConnection (const dtn::core::Node &n)
void addRoute (const dtn::data::EID &destination, const dtn::data::EID &nexthop, size_t timeout=0)
void removeRoute (const dtn::data::EID &destination, const dtn::data::EID &nexthop)
const std::set< dtn::core::NodegetNeighbors ()
bool isNeighbor (const dtn::core::Node &node)
const dtn::core::Node getNeighbor (const dtn::data::EID &eid)
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 BundleCoregetInstance ()
static void processBlocks (dtn::data::Bundle &b)

Static Public Attributes

static dtn::data::EID local
static size_t blocksizelimit = 0
static size_t max_lifetime = 0
static size_t max_timestamp_future = 0
static bool forwarding = true

Protected Member Functions

virtual void componentUp ()
virtual void componentDown ()

Detailed Description

The BundleCore manage the Bundle Protocol basics

Definition at line 32 of file BundleCore.h.


Member Function Documentation

Definition at line 148 of file BundleCore.cpp.

References dtn::net::ConnectionManager::addConnection().

Referenced by __daemon_run(), and dtn_dht_handle_lookup_result().

Here is the call graph for this function:

Definition at line 143 of file BundleCore.cpp.

References dtn::net::ConnectionManager::addConvergenceLayer().

Referenced by createConvergenceLayers().

Here is the call graph for this function:

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

Add a static route to the static routing module.

Parameters:
destination
nexthop
timeout

Definition at line 158 of file BundleCore.cpp.

References 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 ( ) [protected, virtual]

Implements dtn::daemon::IntegratedComponent.

Definition at line 88 of file BundleCore.cpp.

References dtn::daemon::IntegratedComponent::terminate().

Here is the call graph for this function:

void dtn::core::BundleCore::componentUp ( ) [protected, virtual]

Implements dtn::daemon::IntegratedComponent.

Definition at line 79 of file BundleCore.cpp.

References dtn::daemon::IntegratedComponent::initialize(), and dtn::daemon::IntegratedComponent::startup().

Here is the call graph for this function:

Definition at line 123 of file BundleCore.cpp.

const std::string dtn::core::BundleCore::getName ( ) const [virtual]
See also:
Component::getName()

Implements dtn::daemon::Component.

Definition at line 369 of file BundleCore.cpp.

Get the neighbor with the given EID.

Exceptions:
dtn::net::NeighborNotAvailableExceptionif the neighbor is not available.
Parameters:
eidThe EID of the neighbor.
Returns:
A node object with all neighbor data.

Definition at line 178 of file BundleCore.cpp.

References dtn::net::ConnectionManager::getNeighbor().

Here is the call graph for this function:

Checks if a node is already known as neighbor.

Parameters:
@return

Definition at line 173 of file BundleCore.cpp.

References dtn::net::ConnectionManager::isNeighbor().

Referenced by dtn_dht_handle_lookup_result().

Here is the call graph for this function:

Definition at line 153 of file BundleCore.cpp.

References dtn::net::ConnectionManager::removeConnection().

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

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

Here is the call graph for this function:

Definition at line 99 of file BundleCore.cpp.

Referenced by __daemon_run().

Definition at line 94 of file BundleCore.cpp.

Referenced by createBundleStorage().

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

References blocksizelimit, IBRCOMMON_LOGGER, and IBRCOMMON_LOGGER_ENDL.


Member Data Documentation

Define a global block size limit. This is used in the validator to reject bundles while receiving.

Definition at line 99 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 114 of file BundleCore.h.

Referenced by validate().

Definition at line 35 of file BundleCore.h.

Referenced by dtn::storage::BundleStorage::acceptCustody(), dtn::security::SecurityManager::auth(), dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::core::FragmentManager::componentRun(), dtn::net::FileConvergenceLayer::componentRun(), dtn::net::HTTPConvergenceLayer::componentRun(), dtn::dht::DHTNameService::componentRun(), dtn::net::TCPConvergenceLayer::componentRun(), dtn::dht::DHTNameService::componentUp(), dtn::security::SecurityManager::decrypt(), dtn::net::ConnectionManager::discovered(), dtn_dht_handle_lookup_result(), dtn::security::SecurityManager::encrypt(), dtn::core::AbstractWorker::initialize(), dtn::net::TCPConvergenceLayer::open(), dtn::routing::ProphetRoutingExtension::processHandshake(), dtn::routing::ProphetRoutingExtension::ProphetRoutingExtension(), dtn::net::HTTPConvergenceLayer::queue(), dtn::net::TCPConvergenceLayer::queue(), dtn::daemon::DTNTPWorker::raiseEvent(), raiseEvent(), dtn::dht::DHTNameService::raiseEvent(), dtn::routing::BaseRouter::raiseEvent(), dtn::storage::BundleStorage::rejectCustody(), dtn::api::OrderedStreamHandler::run(), dtn::routing::NeighborRoutingExtension::run(), dtn::api::ExtendedApiHandler::run(), dtn::routing::FloodRoutingExtension::run(), dtn::routing::StaticRoutingExtension::run(), dtn::api::BinaryStreamClient::run(), dtn::routing::EpidemicRoutingExtension::run(), dtn::net::IPNDAgent::sendAnnoucement(), dtn::net::LOWPANConvergenceLayer::sendAnnoucement(), dtn::net::DatagramConvergenceLayer::sendAnnoucement(), setGlobalVars(), dtn::security::SecurityManager::sign(), dtn::core::FragmentManager::signal(), validate(), and dtn::security::SecurityManager::verifyPIB().

Define the maximum lifetime for accepted bundles

Definition at line 104 of file BundleCore.h.

Referenced by setGlobalVars(), and validate().

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

Definition at line 109 of file BundleCore.h.

Referenced by setGlobalVars(), and validate().


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