IBR-DTNSuite
0.12
|
#include <RoutingExtension.h>
Public Types | |
enum | CALLBACK_ACTION { ROUTE_CALLBACK_FORWARDED = 0, ROUTE_CALLBACK_ABORTED = 1, ROUTE_CALLBACK_REJECTED = 2, ROUTE_CALLBACK_DELETED = 3 } |
Public Member Functions | |
RoutingExtension () | |
virtual | ~RoutingExtension ()=0 |
virtual void | eventDataChanged (const dtn::data::EID &peer) throw () |
virtual void | eventTransferCompleted (const dtn::data::EID &peer, const dtn::data::MetaBundle &meta) throw () |
virtual void | eventBundleQueued (const dtn::data::EID &peer, const dtn::data::MetaBundle &meta) throw () |
virtual void | componentUp ()=0 throw () |
virtual void | componentDown ()=0 throw () |
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 &) |
void | transferTo (const dtn::data::EID &destination, const dtn::data::MetaBundle &meta) |
Protected Member Functions | |
BaseRouter & | operator* () |
Definition at line 37 of file RoutingExtension.h.
Enumerator | |
---|---|
ROUTE_CALLBACK_FORWARDED | |
ROUTE_CALLBACK_ABORTED | |
ROUTE_CALLBACK_REJECTED | |
ROUTE_CALLBACK_DELETED |
Definition at line 65 of file RoutingExtension.h.
dtn::routing::RoutingExtension::RoutingExtension | ( | ) |
base implementation of the Extension class
Definition at line 36 of file RoutingExtension.cpp.
|
pure virtual |
Definition at line 39 of file RoutingExtension.cpp.
|
pure virtual |
Implemented in dtn::routing::ProphetRoutingExtension, dtn::routing::EpidemicRoutingExtension, dtn::routing::StaticRoutingExtension, dtn::routing::FloodRoutingExtension, dtn::routing::NeighborRoutingExtension, dtn::routing::RetransmissionExtension, and dtn::routing::NodeHandshakeExtension.
Referenced by dtn::routing::BaseRouter::extensionsDown().
|
pure virtual |
Implemented in dtn::routing::ProphetRoutingExtension, dtn::routing::EpidemicRoutingExtension, dtn::routing::StaticRoutingExtension, dtn::routing::FloodRoutingExtension, dtn::routing::NeighborRoutingExtension, dtn::routing::RetransmissionExtension, and dtn::routing::NodeHandshakeExtension.
Referenced by dtn::routing::BaseRouter::extensionsUp().
|
inlinevirtual |
This method is called every time a bundle was queued
Reimplemented in dtn::routing::ProphetRoutingExtension, dtn::routing::EpidemicRoutingExtension, dtn::routing::FloodRoutingExtension, dtn::routing::StaticRoutingExtension, and dtn::routing::NeighborRoutingExtension.
Definition at line 59 of file RoutingExtension.h.
|
inlinevirtual |
This method is called every time something has changed. The module should search again for bundles to transfer to the given peer.
Reimplemented in dtn::routing::ProphetRoutingExtension, dtn::routing::EpidemicRoutingExtension, dtn::routing::FloodRoutingExtension, dtn::routing::NeighborRoutingExtension, and dtn::routing::StaticRoutingExtension.
Definition at line 49 of file RoutingExtension.h.
|
inlinevirtual |
This method is called every time a bundle has been completed successfully
Reimplemented in dtn::routing::ProphetRoutingExtension, and dtn::routing::RetransmissionExtension.
Definition at line 54 of file RoutingExtension.h.
|
protected |
Definition at line 42 of file RoutingExtension.cpp.
References dtn::core::BundleCore::getInstance(), and dtn::core::BundleCore::getRouter().
|
inlinevirtual |
After a handshake has been completed every module can process the handshake response.
The | EID of the other node. |
The | received handshake object. |
Reimplemented in dtn::routing::ProphetRoutingExtension, and dtn::routing::NodeHandshakeExtension.
Definition at line 95 of file RoutingExtension.h.
Referenced by dtn::routing::BaseRouter::processHandshake().
|
inlinevirtual |
If some data of another node is required. These method is called to collect all necessary identifier of data items.
The | EID of the other node. |
The | object to put the requested identifier into. |
Reimplemented in dtn::routing::EpidemicRoutingExtension, dtn::routing::ProphetRoutingExtension, and dtn::routing::NodeHandshakeExtension.
Definition at line 79 of file RoutingExtension.h.
Referenced by dtn::routing::BaseRouter::requestHandshake().
|
inlinevirtual |
If a handshake message is received, this method is called to collect the different data items generated by the router extensions.
The | EID of the other node. |
The | received handshake object. |
The | response for the received handshake. |
Reimplemented in dtn::routing::ProphetRoutingExtension, and dtn::routing::NodeHandshakeExtension.
Definition at line 88 of file RoutingExtension.h.
Referenced by dtn::routing::BaseRouter::responseHandshake().
void dtn::routing::RoutingExtension::transferTo | ( | const dtn::data::EID & | destination, |
const dtn::data::MetaBundle & | meta | ||
) |
Transfer one bundle to another node.
BundleNotFoundException | if the bundle do not exist. |
destination | The EID of the other node. |
id | The ID of the bundle to transfer. This bundle must be stored in the storage. |
Transfer one bundle to another node.
destination | The EID of the other node. |
id | The ID of the bundle to transfer. This bundle must be stored in the storage. |
Definition at line 52 of file RoutingExtension.cpp.
References dtn::routing::NeighborDatabase::NeighborEntry::acquireTransfer(), dtn::core::BundleCore::getConnectionManager(), dtn::core::BundleCore::getInstance(), dtn::data::EID::getString(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, dtn::net::ConnectionManager::queue(), and dtn::data::BundleID::toString().
Referenced by dtn::routing::NeighborRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), dtn::routing::StaticRoutingExtension::run(), and dtn::routing::EpidemicRoutingExtension::run().