IBR-DTNSuite
0.8
|
Routing extension for PRoPHET routing. More...
#include <ProphetRoutingExtension.h>
Classes | |
class | Acknowledgement |
Represents an Acknowledgement, i.e. the bundleID that is acknowledged and the lifetime of the acknowledgement. More... | |
class | AcknowledgementSet |
Set of Acknowledgements, that can be serialized in node handshakes. More... | |
class | DeliveryPredictabilityMap |
This class keeps track of the predictablities to see a specific EID. More... | |
class | ForwardingStrategy |
This class is a abstract base class for all prophet forwarding strategies. More... | |
class | GRTR_Strategy |
The GRTR forwarding strategy. Using this strategy, packets are forwarding, if the neighbor has a higher predictability then the destination. More... | |
class | GTMX_Strategy |
The GTMX forwarding strategy. Using this strategy, packets are forwarding, if the neighbor has a higher predictability then the destination, but at most NF_max times. More... | |
class | NextExchangeTask |
class | SearchNextBundleTask |
class | Task |
Public Member Functions | |
ProphetRoutingExtension (ForwardingStrategy *strategy, float p_encounter_max, float p_encounter_first, float p_first_threshold, float beta, float gamma, float delta, size_t time_unit, size_t i_typ, size_t next_exchange_timeout) | |
virtual | ~ProphetRoutingExtension () |
virtual void | requestHandshake (const dtn::data::EID &, NodeHandshake &) const |
virtual void | responseHandshake (const dtn::data::EID &, const NodeHandshake &, NodeHandshake &) |
virtual void | processHandshake (const dtn::data::EID &, NodeHandshake &) |
virtual void | notify (const dtn::core::Event *evt) |
ibrcommon::ThreadsafeReference < DeliveryPredictabilityMap > | getDeliveryPredictabilityMap () |
ibrcommon::ThreadsafeReference < const DeliveryPredictabilityMap > | getDeliveryPredictabilityMap () const |
ibrcommon::ThreadsafeReference < const AcknowledgementSet > | getAcknowledgementSet () const |
Protected Member Functions | |
virtual void | run () |
void | __cancellation () |
Routing extension for PRoPHET routing.
PRoPHET keeps track of predictabilities to see specific other nodes. i.e. Nodes that are seen often will have a high predictabilites attached and forwarding decisions can be made based on these predictabilites. In addition, these predictabilites are updated transitively by exchanging predictabilityMaps with neighbors. For a detailed description of the protocol, see draft-irtf-dtnrg-prophet-09
Definition at line 28 of file ProphetRoutingExtension.h.
dtn::routing::ProphetRoutingExtension::ProphetRoutingExtension | ( | ForwardingStrategy * | strategy, |
float | p_encounter_max, | ||
float | p_encounter_first, | ||
float | p_first_threshold, | ||
float | beta, | ||
float | gamma, | ||
float | delta, | ||
size_t | time_unit, | ||
size_t | i_typ, | ||
size_t | next_exchange_timeout | ||
) |
Definition at line 27 of file ProphetRoutingExtension.cpp.
References IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, dtn::core::BundleCore::local, and dtn::routing::ProphetRoutingExtension::ForwardingStrategy::setProphetRouter().
Definition at line 41 of file ProphetRoutingExtension.cpp.
References ibrcommon::JoinableThread::join(), and ibrcommon::JoinableThread::stop().
void dtn::routing::ProphetRoutingExtension::__cancellation | ( | ) | [protected, virtual] |
Implements ibrcommon::Thread.
Definition at line 494 of file ProphetRoutingExtension.cpp.
References ibrcommon::Queue< T >::abort().
ibrcommon::ThreadsafeReference< const ProphetRoutingExtension::AcknowledgementSet > dtn::routing::ProphetRoutingExtension::getAcknowledgementSet | ( | ) | const |
Returns a threadsafe reference to the AcknowledgementSet. I.e. the corresponding Mutex is locked while this object exists.
Definition at line 318 of file ProphetRoutingExtension.cpp.
ibrcommon::ThreadsafeReference< ProphetRoutingExtension::DeliveryPredictabilityMap > dtn::routing::ProphetRoutingExtension::getDeliveryPredictabilityMap | ( | ) |
Returns a threadsafe reference to the DeliveryPredictabilityMap. I.e. the corresponding Mutex is locked while this object exists. In addition, the map is aged before it is returned.
Definition at line 304 of file ProphetRoutingExtension.cpp.
ibrcommon::ThreadsafeReference< const ProphetRoutingExtension::DeliveryPredictabilityMap > dtn::routing::ProphetRoutingExtension::getDeliveryPredictabilityMap | ( | ) | const |
Returns a threadsafe reference to the DeliveryPredictabilityMap. I.e. the corresponding Mutex is locked while this object exists. This const version does not age the map.
Definition at line 313 of file ProphetRoutingExtension.cpp.
void dtn::routing::ProphetRoutingExtension::notify | ( | const dtn::core::Event * | evt | ) | [virtual] |
Implements dtn::routing::BaseRouter::ThreadedExtension.
Definition at line 187 of file ProphetRoutingExtension.cpp.
References dtn::routing::ProphetRoutingExtension::GTMX_Strategy::addForward(), dtn::data::MetaBundle::destination, dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, dtn::data::MetaBundle::expiretime, dtn::core::NodeEvent::getAction(), dtn::net::TransferCompletedEvent::getBundle(), dtn::core::Node::getEID(), dtn::core::BundleCore::getInstance(), dtn::core::BundleCore::getNeighbors(), dtn::core::NodeEvent::getNode(), dtn::data::EID::getNode(), dtn::net::TransferCompletedEvent::getPeer(), dtn::net::TransferAbortedEvent::getPeer(), dtn::core::TimeEvent::getUnixTimestamp(), dtn::routing::NodeHandshakeEvent::HANDSHAKE_COMPLETED, dtn::routing::NodeHandshakeEvent::HANDSHAKE_UPDATED, dtn::routing::ProphetRoutingExtension::AcknowledgementSet::insert(), dtn::core::NODE_AVAILABLE, dtn::core::NODE_UNAVAILABLE, dtn::routing::NodeHandshakeEvent::peer, dtn::data::MetaBundle::procflags, dtn::routing::ProphetRoutingExtension::AcknowledgementSet::purge(), ibrcommon::Queue< T >::push(), and dtn::routing::NodeHandshakeEvent::state.
void dtn::routing::ProphetRoutingExtension::processHandshake | ( | const dtn::data::EID & | neighbor, |
NodeHandshake & | response | ||
) | [virtual] |
Reimplemented from dtn::routing::BaseRouter::Extension.
Definition at line 95 of file ProphetRoutingExtension.cpp.
References dtn::core::BUNDLE_DELETED, dtn::data::MetaBundle::custodian, dtn::data::StatusReportBlock::DEPLETED_STORAGE, dtn::data::MetaBundle::destination, dtn::storage::BundleStorage::get(), dtn::routing::NodeHandshake::get(), dtn::data::EID::getNode(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, dtn::core::BundleCore::local, dtn::routing::ProphetRoutingExtension::AcknowledgementSet::merge(), dtn::core::BundlePurgeEvent::raise(), dtn::core::BundleEvent::raise(), and dtn::data::BundleID::toString().
void dtn::routing::ProphetRoutingExtension::requestHandshake | ( | const dtn::data::EID & | , |
NodeHandshake & | handshake | ||
) | const [virtual] |
Reimplemented from dtn::routing::BaseRouter::Extension.
Definition at line 48 of file ProphetRoutingExtension.cpp.
References dtn::routing::NodeHandshake::addRequest(), dtn::routing::ProphetRoutingExtension::DeliveryPredictabilityMap::identifier, dtn::routing::BloomFilterSummaryVector::identifier, and dtn::routing::ProphetRoutingExtension::AcknowledgementSet::identifier.
void dtn::routing::ProphetRoutingExtension::responseHandshake | ( | const dtn::data::EID & | neighbor, |
const NodeHandshake & | request, | ||
NodeHandshake & | response | ||
) | [virtual] |
Reimplemented from dtn::routing::BaseRouter::Extension.
Definition at line 57 of file ProphetRoutingExtension.cpp.
References dtn::routing::NodeHandshake::addItem(), dtn::data::EID::getNode(), dtn::routing::NodeHandshake::hasRequest(), dtn::routing::ProphetRoutingExtension::DeliveryPredictabilityMap::identifier, dtn::routing::ProphetRoutingExtension::AcknowledgementSet::identifier, and dtn::routing::ProphetRoutingExtension::AcknowledgementSet::purge().
virtual void dtn::routing::ProphetRoutingExtension::run | ( | ) | [protected, virtual] |
Abstract interface for thread context run method.
Implements ibrcommon::Thread.