IBR-DTN
1.0.0
|
#include <BaseRouter.h>
Classes | |
class | NoNeighbourFoundException |
class | NoRouteFoundException |
class | RoutingException |
Public Types | |
typedef std::set < RoutingExtension * > | extension_list |
Protected Member Functions | |
virtual void | componentUp () throw () |
virtual void | componentDown () throw () |
Definition at line 61 of file BaseRouter.h.
typedef std::set<RoutingExtension*> dtn::routing::BaseRouter::extension_list |
Definition at line 104 of file BaseRouter.h.
dtn::routing::BaseRouter::BaseRouter | ( | ) |
implementation of the BaseRouter class
Definition at line 53 of file BaseRouter.cpp.
References dtn::core::BundleCore::getInstance(), and dtn::core::BundleCore::setRouter().
dtn::routing::BaseRouter::~BaseRouter | ( | ) |
Definition at line 60 of file BaseRouter.cpp.
References clearExtensions(), dtn::core::BundleCore::getInstance(), and dtn::core::BundleCore::setRouter().
void dtn::routing::BaseRouter::add | ( | RoutingExtension * | extension | ) |
Add a routing extension to the routing core.
extension |
Definition at line 73 of file BaseRouter.cpp.
void dtn::routing::BaseRouter::clearExtensions | ( | ) |
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 225 of file BaseRouter.cpp.
References dtn::core::EventDispatcher< E >::remove().
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 212 of file BaseRouter.cpp.
References dtn::core::EventDispatcher< E >::add().
void dtn::routing::BaseRouter::doHandshake | ( | const dtn::data::EID & | eid | ) |
Request a neighbor handshake
eid |
Definition at line 543 of file BaseRouter.cpp.
References dtn::routing::NodeHandshakeExtension::doHandshake().
void dtn::routing::BaseRouter::extensionsDown | ( | ) | ||
throw | ( | |||
) |
disable all extensions
Definition at line 135 of file BaseRouter.cpp.
References dtn::routing::NodeHandshakeExtension::componentDown(), dtn::routing::RoutingExtension::componentDown(), and dtn::routing::RetransmissionExtension::componentDown().
void dtn::routing::BaseRouter::extensionsUp | ( | ) | ||
throw | ( | |||
) |
enable all extensions
Definition at line 108 of file BaseRouter.cpp.
References dtn::routing::NodeHandshakeExtension::componentUp(), dtn::routing::RoutingExtension::componentUp(), dtn::routing::RetransmissionExtension::componentUp(), dtn::core::BundleCore::getConnectionManager(), dtn::core::Node::getEID(), dtn::core::BundleCore::getInstance(), and dtn::net::ConnectionManager::getNeighbors().
bool dtn::routing::BaseRouter::filterKnown | ( | const dtn::data::MetaBundle & | meta | ) |
check if a bundle is known if the bundle is unkown add it to the known list and return false
id |
Definition at line 579 of file BaseRouter.cpp.
References dtn::data::BundleSet::add(), and dtn::data::BundleSet::has().
ibrcommon::RWMutex & dtn::routing::BaseRouter::getExtensionMutex | ( | ) | ||
throw | ( | |||
) |
Give access to the mutex for the extension list
Definition at line 85 of file BaseRouter.cpp.
Referenced by processHandshake(), requestHandshake(), and responseHandshake().
const BaseRouter::extension_list & dtn::routing::BaseRouter::getExtensions | ( | ) | const |
Returns a reference to all extensions.
Definition at line 90 of file BaseRouter.cpp.
Referenced by processHandshake(), requestHandshake(), and responseHandshake().
const dtn::data::BundleSet dtn::routing::BaseRouter::getKnownBundles | ( | ) |
Get a vector (bloomfilter) of all known bundles.
Definition at line 588 of file BaseRouter.cpp.
|
virtual |
Implements dtn::daemon::Component.
Definition at line 613 of file BaseRouter.cpp.
NeighborDatabase & dtn::routing::BaseRouter::getNeighborDB | ( | ) |
Access to the neighbor database. Where several data about the neighbors is stored.
Definition at line 618 of file BaseRouter.cpp.
const dtn::data::BundleSet dtn::routing::BaseRouter::getPurgedBundles | ( | ) |
Get a vector (bloomfilter) of all purged bundles.
Definition at line 607 of file BaseRouter.cpp.
dtn::storage::BundleSeeker & dtn::routing::BaseRouter::getSeeker | ( | ) |
provides direct access to the bundle seeker
Definition at line 558 of file BaseRouter.cpp.
References dtn::core::BundleCore::getInstance(), and dtn::core::BundleCore::getSeeker().
dtn::storage::BundleStorage & dtn::routing::BaseRouter::getStorage | ( | ) |
provides direct access to the bundle storage
Definition at line 553 of file BaseRouter.cpp.
References dtn::core::BundleCore::getInstance(), and dtn::core::BundleCore::getStorage().
bool dtn::routing::BaseRouter::isKnown | ( | const dtn::data::BundleID & | id | ) |
This method returns true, if the given BundleID is known.
id |
Definition at line 570 of file BaseRouter.cpp.
References dtn::data::BundleSet::has().
bool dtn::routing::BaseRouter::isPurged | ( | const dtn::data::BundleID & | id | ) |
This method returns true, if the given BundleID is purged.
id |
Definition at line 595 of file BaseRouter.cpp.
References dtn::data::BundleSet::has().
void dtn::routing::BaseRouter::processHandshake | ( | const dtn::data::EID & | source, |
NodeHandshake & | answer | ||
) |
Process a completed handshake This method will iterate through all extensions and give each of them a chance to process the completed handshake
Definition at line 152 of file BaseRouter.cpp.
References getExtensionMutex(), getExtensions(), dtn::routing::NodeHandshakeExtension::processHandshake(), and dtn::routing::RoutingExtension::processHandshake().
void dtn::routing::BaseRouter::pushHandshakeUpdated | ( | const NodeHandshakeItem::IDENTIFIER | id | ) |
Signals that some important data of the handshake has been updated
Definition at line 548 of file BaseRouter.cpp.
References dtn::routing::NodeHandshakeExtension::pushHandshakeUpdated().
|
virtual |
method to receive new events from the EventSwitch
Implements dtn::core::EventReceiver< dtn::net::TransferAbortedEvent >.
Definition at line 356 of file BaseRouter.cpp.
References dtn::routing::NeighborDatabase::NeighborEntry::add(), dtn::net::TransferAbortedEvent::REASON_REFUSED, dtn::net::TransferAbortedEvent::REASON_REFUSED_BY_FILTER, and dtn::routing::NeighborDatabase::NeighborEntry::releaseTransfer().
|
virtual |
method to receive new events from the EventSwitch
Implements dtn::core::EventReceiver< dtn::net::TransferCompletedEvent >.
Definition at line 241 of file BaseRouter.cpp.
References dtn::routing::NeighborDatabase::NeighborEntry::add(), and dtn::routing::NeighborDatabase::NeighborEntry::releaseTransfer().
|
virtual |
Implements dtn::core::EventReceiver< dtn::net::BundleReceivedEvent >.
Definition at line 278 of file BaseRouter.cpp.
References dtn::data::TrackingBlock::append(), dtn::core::BUNDLE_DELETED, dtn::core::BUNDLE_RECEIVED, dtn::data::MetaBundle::create(), dtn::data::StatusReportBlock::DEPLETED_STORAGE, dtn::data::Bundle::find(), dtn::data::ScopeControlHopLimitBlock::increment(), dtn::core::BundleCore::local, dtn::routing::QueueBundleEvent::raise(), and dtn::core::BundleEvent::raise().
|
virtual |
Implements dtn::core::EventReceiver< dtn::routing::QueueBundleEvent >.
Definition at line 261 of file BaseRouter.cpp.
References dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, and dtn::core::BundleCore::local.
|
virtual |
Implements dtn::core::EventReceiver< dtn::core::NodeEvent >.
Definition at line 386 of file BaseRouter.cpp.
References dtn::core::BundleCore::getConnectionManager(), dtn::core::Node::getEID(), dtn::core::BundleCore::getInstance(), dtn::net::ConnectionManager::getNeighbors(), dtn::core::NODE_AVAILABLE, dtn::core::NODE_DATA_ADDED, and dtn::core::NODE_UNAVAILABLE.
|
virtual |
Implements dtn::core::EventReceiver< dtn::core::TimeEvent >.
Definition at line 450 of file BaseRouter.cpp.
References dtn::core::BundleCore::getConnectionManager(), dtn::core::BundleCore::getInstance(), and dtn::net::ConnectionManager::getNeighbors().
|
virtual |
Implements dtn::core::EventReceiver< dtn::net::ConnectionEvent >.
Definition at line 425 of file BaseRouter.cpp.
References dtn::net::ConnectionEvent::CONNECTION_UP.
|
virtual |
Implements dtn::core::EventReceiver< dtn::core::BundlePurgeEvent >.
Definition at line 440 of file BaseRouter.cpp.
References dtn::core::BundlePurgeEvent::ACK_RECIEVED, and dtn::core::BundlePurgeEvent::DELIVERED.
void dtn::routing::BaseRouter::remove | ( | RoutingExtension * | extension | ) |
Remove a routing extension from the routing core
Definition at line 79 of file BaseRouter.cpp.
void dtn::routing::BaseRouter::requestHandshake | ( | const dtn::data::EID & | destination, |
NodeHandshake & | request | ||
) |
Request to a received handshake request This method will iterate through all extensions and ask each of them if they are interested in some sort of routing data of the other peer
Definition at line 192 of file BaseRouter.cpp.
References getExtensionMutex(), getExtensions(), dtn::routing::NodeHandshakeExtension::requestHandshake(), and dtn::routing::RoutingExtension::requestHandshake().
void dtn::routing::BaseRouter::responseHandshake | ( | const dtn::data::EID & | source, |
const NodeHandshake & | request, | ||
NodeHandshake & | answer | ||
) |
Respond to a received handshake request This method will iterate through all extensions and give each of them a chance to respond to a received handshake request
Definition at line 172 of file BaseRouter.cpp.
References getExtensionMutex(), getExtensions(), dtn::routing::NodeHandshakeExtension::responseHandshake(), and dtn::routing::RoutingExtension::responseHandshake().
void dtn::routing::BaseRouter::setKnown | ( | const dtn::data::MetaBundle & | meta | ) |
This method add a BundleID to the set of known bundles
id |
Definition at line 563 of file BaseRouter.cpp.
References dtn::data::BundleSet::add().
void dtn::routing::BaseRouter::setPurged | ( | const dtn::data::MetaBundle & | meta | ) |
Add a bundle to the purge vector of this daemon.
meta | The bundle to purge. |
Definition at line 601 of file BaseRouter.cpp.
References dtn::data::BundleSet::add().