IBR-DTNSuite  0.10
dtn::routing::RoutingExtension Class Referenceabstract

#include <RoutingExtension.h>

Inheritance diagram for dtn::routing::RoutingExtension:
Inheritance graph
Collaboration diagram for dtn::routing::RoutingExtension:
Collaboration graph

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 notify (const dtn::core::Event *evt)=0 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)
 

Static Public Member Functions

static bool isRouting (const dtn::data::EID &eid)
 

Protected Member Functions

BaseRouteroperator* ()
 

Friends

class BaseRouter
 

Detailed Description

Definition at line 37 of file RoutingExtension.h.

Member Enumeration Documentation

Enumerator
ROUTE_CALLBACK_FORWARDED 
ROUTE_CALLBACK_ABORTED 
ROUTE_CALLBACK_REJECTED 
ROUTE_CALLBACK_DELETED 

Definition at line 49 of file RoutingExtension.h.

Constructor & Destructor Documentation

dtn::routing::RoutingExtension::RoutingExtension ( )

base implementation of the Extension class

Definition at line 37 of file RoutingExtension.cpp.

dtn::routing::RoutingExtension::~RoutingExtension ( )
pure virtual

Definition at line 40 of file RoutingExtension.cpp.

Member Function Documentation

bool dtn::routing::RoutingExtension::isRouting ( const dtn::data::EID eid)
static

Returns true, if the bundle contains routing data.

Parameters
meta
Returns

Definition at line 90 of file RoutingExtension.cpp.

References dtn::data::EID::CBHE_SCHEME, dtn::data::EID::getApplication(), and dtn::data::EID::getScheme().

Referenced by dtn::routing::StaticRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), and dtn::routing::EpidemicRoutingExtension::run().

Here is the call graph for this function:

BaseRouter & dtn::routing::RoutingExtension::operator* ( )
protected

Definition at line 43 of file RoutingExtension.cpp.

virtual void dtn::routing::RoutingExtension::processHandshake ( const dtn::data::EID ,
NodeHandshake  
)
inlinevirtual

After a handshake has been completed every module can process the handshake response.

Parameters
TheEID of the other node.
Thereceived handshake object.

Reimplemented in dtn::routing::ProphetRoutingExtension, and dtn::routing::NodeHandshakeExtension.

Definition at line 79 of file RoutingExtension.h.

Referenced by dtn::routing::BaseRouter::processHandshake().

virtual void dtn::routing::RoutingExtension::requestHandshake ( const dtn::data::EID ,
NodeHandshake  
) const
inlinevirtual

If some data of another node is required. These method is called to collect all necessary identifier of data items.

Parameters
TheEID of the other node.
Theobject to put the requested identifier into.

Reimplemented in dtn::routing::ProphetRoutingExtension, dtn::routing::EpidemicRoutingExtension, and dtn::routing::NodeHandshakeExtension.

Definition at line 63 of file RoutingExtension.h.

Referenced by dtn::routing::BaseRouter::requestHandshake().

virtual void dtn::routing::RoutingExtension::responseHandshake ( const dtn::data::EID ,
const NodeHandshake ,
NodeHandshake  
)
inlinevirtual

If a handshake message is received, this method is called to collect the different data items generated by the router extensions.

Parameters
TheEID of the other node.
Thereceived handshake object.
Theresponse for the received handshake.

Reimplemented in dtn::routing::ProphetRoutingExtension, and dtn::routing::NodeHandshakeExtension.

Definition at line 72 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.

Exceptions
BundleNotFoundExceptionif the bundle do not exist.
Parameters
destinationThe EID of the other node.
idThe ID of the bundle to transfer. This bundle must be stored in the storage.

Transfer one bundle to another node.

Parameters
destinationThe EID of the other node.
idThe ID of the bundle to transfer. This bundle must be stored in the storage.

Definition at line 53 of file RoutingExtension.cpp.

References dtn::routing::NeighborDatabase::NeighborEntry::acquireTransfer(), dtn::routing::NeighborDatabase::get(), dtn::core::BundleCore::getInstance(), dtn::routing::BaseRouter::getNeighborDB(), dtn::data::EID::getString(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, dtn::routing::NeighborDatabase::NeighborEntry::releaseTransfer(), dtn::data::BundleID::toString(), and dtn::core::BundleCore::transferTo().

Referenced by dtn::routing::StaticRoutingExtension::run(), dtn::routing::NeighborRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), and dtn::routing::EpidemicRoutingExtension::run().

Here is the call graph for this function:

Friends And Related Function Documentation

friend class BaseRouter
friend

Definition at line 100 of file RoutingExtension.h.


The documentation for this class was generated from the following files: