IBR-DTNSuite
0.8
|
#include <BaseRouter.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 | |
Extension () | |
virtual | ~Extension ()=0 |
virtual void | notify (const dtn::core::Event *evt)=0 |
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::BundleID &id) |
void | transferTo (NeighborDatabase::NeighborEntry &entry, const dtn::data::BundleID &id) |
Static Public Member Functions | |
static bool | isRouting (const dtn::data::EID &eid) |
Protected Member Functions | |
BaseRouter & | operator* () |
Friends | |
class | BaseRouter |
Definition at line 65 of file BaseRouter.h.
ROUTE_CALLBACK_FORWARDED | |
ROUTE_CALLBACK_ABORTED | |
ROUTE_CALLBACK_REJECTED | |
ROUTE_CALLBACK_DELETED |
Definition at line 73 of file BaseRouter.h.
base implementation of the Extension class
Definition at line 61 of file BaseRouter.cpp.
dtn::routing::BaseRouter::Extension::~Extension | ( | ) | [pure virtual] |
Definition at line 64 of file BaseRouter.cpp.
bool dtn::routing::BaseRouter::Extension::isRouting | ( | const dtn::data::EID & | eid | ) | [static] |
Returns true, if the bundle contains routing data.
meta |
Definition at line 98 of file BaseRouter.cpp.
References dtn::data::EID::CBHE_SCHEME, dtn::data::EID::getApplication(), and dtn::data::EID::getScheme().
Referenced by dtn::routing::FloodRoutingExtension::run(), dtn::routing::StaticRoutingExtension::run(), and dtn::routing::EpidemicRoutingExtension::run().
virtual void dtn::routing::BaseRouter::Extension::notify | ( | const dtn::core::Event * | evt | ) | [pure virtual] |
Implemented in dtn::routing::ProphetRoutingExtension, dtn::routing::BaseRouter::ThreadedExtension, dtn::routing::EpidemicRoutingExtension, dtn::routing::FloodRoutingExtension, dtn::routing::NeighborRoutingExtension, dtn::routing::NodeHandshakeExtension, dtn::routing::RetransmissionExtension, and dtn::routing::StaticRoutingExtension.
BaseRouter & dtn::routing::BaseRouter::Extension::operator* | ( | ) | [protected] |
Definition at line 67 of file BaseRouter.cpp.
virtual void dtn::routing::BaseRouter::Extension::processHandshake | ( | const dtn::data::EID & | , |
NodeHandshake & | |||
) | [inline, virtual] |
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 103 of file BaseRouter.h.
Referenced by dtn::routing::NodeHandshakeExtension::processHandshake().
virtual void dtn::routing::BaseRouter::Extension::requestHandshake | ( | const dtn::data::EID & | , |
NodeHandshake & | |||
) | const [inline, virtual] |
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::ProphetRoutingExtension, dtn::routing::EpidemicRoutingExtension, and dtn::routing::NodeHandshakeExtension.
Definition at line 87 of file BaseRouter.h.
virtual void dtn::routing::BaseRouter::Extension::responseHandshake | ( | const dtn::data::EID & | , |
const NodeHandshake & | , | ||
NodeHandshake & | |||
) | [inline, virtual] |
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 96 of file BaseRouter.h.
Referenced by dtn::routing::NodeHandshakeExtension::processHandshake().
void dtn::routing::BaseRouter::Extension::transferTo | ( | const dtn::data::EID & | destination, |
const dtn::data::BundleID & | id | ||
) |
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 77 of file BaseRouter.cpp.
Referenced by dtn::routing::NeighborRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), dtn::routing::StaticRoutingExtension::run(), and dtn::routing::EpidemicRoutingExtension::run().
void dtn::routing::BaseRouter::Extension::transferTo | ( | NeighborDatabase::NeighborEntry & | entry, |
const dtn::data::BundleID & | id | ||
) |
Definition at line 89 of file BaseRouter.cpp.
References dtn::routing::NeighborDatabase::NeighborEntry::acquireTransfer(), dtn::routing::NeighborDatabase::NeighborEntry::eid, dtn::core::BundleCore::getInstance(), and dtn::core::BundleCore::transferTo().
friend class BaseRouter [friend] |
Definition at line 125 of file BaseRouter.h.