IBR-DTNSuite
0.10
|
Routing extension for PRoPHET routing. More...
#include <ProphetRoutingExtension.h>
Classes | |
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... | |
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, dtn::data::Timestamp 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) throw () |
virtual void | componentUp () throw () |
virtual void | componentDown () throw () |
ibrcommon::ThreadsafeReference < DeliveryPredictabilityMap > | getDeliveryPredictabilityMap () |
ibrcommon::ThreadsafeReference < const DeliveryPredictabilityMap > | getDeliveryPredictabilityMap () const |
ibrcommon::ThreadsafeReference < const AcknowledgementSet > | getAcknowledgementSet () const |
![]() | |
RoutingExtension () | |
virtual | ~RoutingExtension ()=0 |
void | transferTo (const dtn::data::EID &destination, const dtn::data::MetaBundle &meta) |
![]() | |
virtual | ~JoinableThread ()=0 |
void | join (void) throw (ThreadException) |
bool | isRunning (void) |
void | start (int priority=0) throw (ThreadException) |
void | stop () throw () |
Protected Member Functions | |
virtual void | run () throw () |
void | __cancellation () throw () |
![]() | |
BaseRouter & | operator* () |
![]() | |
JoinableThread (size_t size=DEFAULT_STACKSIZE) | |
![]() | |
virtual | ~Thread ()=0 |
void | reset () throw (ThreadException) |
virtual void | setup (void) throw () |
virtual void | finally (void) throw () |
bool | isFinalized () throw () |
bool | operator== (const ibrcommon::Thread &other) |
Thread (size_t stack=DEFAULT_STACKSIZE) | |
int | kill (int sig) |
void | cancel () throw () |
Friends | |
class | ForwardingStrategy |
Additional Inherited Members | |
![]() | |
enum | CALLBACK_ACTION { ROUTE_CALLBACK_FORWARDED = 0, ROUTE_CALLBACK_ABORTED = 1, ROUTE_CALLBACK_REJECTED = 2, ROUTE_CALLBACK_DELETED = 3 } |
![]() | |
static bool | isRouting (const dtn::data::EID &eid) |
![]() | |
static size_t | getNumberOfProcessors () |
static void | yield (void) |
static void | sleep (time_t timeout) |
static void | concurrency (int level) |
static bool | equal (pthread_t thread1, pthread_t thread2) |
static void * | __execute__ (void *obj) throw () |
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 51 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, | ||
dtn::data::Timestamp | next_exchange_timeout | ||
) |
Definition at line 53 of file ProphetRoutingExtension.cpp.
References dtn::utils::Clock::getUnixTimestamp(), IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::LogLevel::info, dtn::core::BundleCore::local, dtn::routing::DeliveryPredictabilityMap::set(), and dtn::routing::ForwardingStrategy::setProphetRouter().
|
virtual |
Definition at line 74 of file ProphetRoutingExtension.cpp.
References ibrcommon::JoinableThread::join(), and ibrcommon::JoinableThread::stop().
|
protectedvirtual |
Implements ibrcommon::Thread.
Definition at line 552 of file ProphetRoutingExtension.cpp.
References ibrcommon::Queue< T >::abort().
|
virtual |
Implements dtn::routing::RoutingExtension.
Definition at line 350 of file ProphetRoutingExtension.cpp.
References ibrcommon::LogLevel::error, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::JoinableThread::join(), ibrcommon::JoinableThread::stop(), and ibrcommon::Exception::what().
|
virtual |
Implements dtn::routing::RoutingExtension.
Definition at line 336 of file ProphetRoutingExtension.cpp.
References ibrcommon::LogLevel::error, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::Queue< T >::reset(), ibrcommon::JoinableThread::start(), and ibrcommon::Exception::what().
ibrcommon::ThreadsafeReference< const 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 375 of file ProphetRoutingExtension.cpp.
ibrcommon::ThreadsafeReference< 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 361 of file ProphetRoutingExtension.cpp.
ibrcommon::ThreadsafeReference< const 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 370 of file ProphetRoutingExtension.cpp.
|
virtual |
Implements dtn::routing::RoutingExtension.
Definition at line 214 of file ProphetRoutingExtension.cpp.
References dtn::routing::ProphetRoutingExtension::GTMX_Strategy::addForward(), dtn::net::ConnectionEvent::CONNECTION_UP, dtn::data::MetaBundle::destination, dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, dtn::core::NodeEvent::getAction(), dtn::net::TransferCompletedEvent::getBundle(), dtn::core::BundleCore::getConnectionManager(), dtn::core::Node::getEID(), dtn::core::BundleCore::getInstance(), dtn::net::ConnectionManager::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::core::NODE_AVAILABLE, dtn::core::NODE_DATA_ADDED, dtn::routing::QueueBundleEvent::origin, dtn::routing::NodeHandshakeEvent::peer, dtn::net::ConnectionEvent::peer, dtn::data::MetaBundle::procflags, dtn::routing::NodeHandshakeEvent::state, and dtn::net::ConnectionEvent::state.
|
virtual |
Reimplemented from dtn::routing::RoutingExtension.
Definition at line 106 of file ProphetRoutingExtension.cpp.
References dtn::routing::AcknowledgementSet::begin(), dtn::core::BUNDLE_DELETED, dtn::routing::NeighborDatabase::create(), dtn::data::MetaBundle::destination, dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, dtn::routing::AcknowledgementSet::end(), dtn::data::MetaBundle::get(), dtn::storage::BundleStorage::get(), dtn::routing::NodeHandshake::get(), dtn::data::EID::getNode(), dtn::data::EID::getString(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, dtn::core::BundleCore::local, dtn::routing::AcknowledgementSet::merge(), dtn::data::StatusReportBlock::NO_ADDITIONAL_INFORMATION, dtn::routing::NeighborDatabase::NeighborEntry::putDataset(), dtn::core::BundlePurgeEvent::raise(), dtn::core::BundleEvent::raise(), dtn::data::BundleID::toString(), dtn::routing::DeliveryPredictabilityMap::update(), and ibrcommon::LogLevel::warning.
|
virtual |
Reimplemented from dtn::routing::RoutingExtension.
Definition at line 81 of file ProphetRoutingExtension.cpp.
References dtn::routing::NodeHandshake::addRequest(), dtn::routing::DeliveryPredictabilityMap::identifier, dtn::routing::AcknowledgementSet::identifier, and dtn::routing::BloomFilterSummaryVector::identifier.
|
virtual |
Reimplemented from dtn::routing::RoutingExtension.
Definition at line 90 of file ProphetRoutingExtension.cpp.
References dtn::routing::NodeHandshake::addItem(), dtn::data::EID::getNode(), dtn::routing::NodeHandshake::hasRequest(), dtn::routing::DeliveryPredictabilityMap::identifier, and dtn::routing::AcknowledgementSet::identifier.
|
protectedvirtual |
Abstract interface for thread context run method.
Implements ibrcommon::Thread.
|
friend |
Definition at line 53 of file ProphetRoutingExtension.h.