IBR-DTNSuite  0.10
dtn::routing::BaseRouter Class Reference

#include <BaseRouter.h>

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

Classes

class  NoNeighbourFoundException
 
class  NoRouteFoundException
 
class  RoutingException
 

Public Types

typedef std::set
< RoutingExtension * > 
extension_list
 

Public Member Functions

 BaseRouter ()
 
 ~BaseRouter ()
 
void add (RoutingExtension *extension)
 
void remove (RoutingExtension *extension)
 
const extension_listgetExtensions () const
 
ibrcommon::RWMutexgetExtensionMutex () throw ()
 
void clearExtensions ()
 
void raiseEvent (const dtn::core::Event *evt) throw ()
 
dtn::storage::BundleStoragegetStorage ()
 
dtn::storage::BundleSeekergetSeeker ()
 
void doHandshake (const dtn::data::EID &eid)
 
bool isKnown (const dtn::data::BundleID &id)
 
bool filterKnown (const dtn::data::MetaBundle &meta)
 
void setKnown (const dtn::data::MetaBundle &meta)
 
const dtn::data::BundleSet getKnownBundles ()
 
const dtn::data::BundleSet getPurgedBundles ()
 
void setPurged (const dtn::data::MetaBundle &meta)
 
bool isPurged (const dtn::data::BundleID &id)
 
virtual const std::string getName () const
 
NeighborDatabasegetNeighborDB ()
 
void extensionsUp () throw ()
 
void extensionsDown () throw ()
 
void processHandshake (const dtn::data::EID &source, NodeHandshake &answer)
 
void responseHandshake (const dtn::data::EID &, const NodeHandshake &, NodeHandshake &)
 
void requestHandshake (const dtn::data::EID &destination, NodeHandshake &request)
 
- Public Member Functions inherited from dtn::core::EventReceiver
virtual ~EventReceiver ()=0
 
- Public Member Functions inherited from dtn::daemon::IntegratedComponent
 IntegratedComponent ()
 
virtual ~IntegratedComponent ()
 
virtual void initialize () throw ()
 
virtual void startup () throw ()
 
virtual void terminate () throw ()
 
- Public Member Functions inherited from dtn::daemon::Component
virtual ~Component ()=0
 

Protected Member Functions

virtual void componentUp () throw ()
 
virtual void componentDown () throw ()
 

Detailed Description

Definition at line 51 of file BaseRouter.h.

Member Typedef Documentation

Definition at line 86 of file BaseRouter.h.

Constructor & Destructor Documentation

dtn::routing::BaseRouter::BaseRouter ( )

implementation of the BaseRouter class

Definition at line 65 of file BaseRouter.cpp.

dtn::routing::BaseRouter::~BaseRouter ( )

Definition at line 72 of file BaseRouter.cpp.

References clearExtensions().

Here is the call graph for this function:

Member Function Documentation

void dtn::routing::BaseRouter::add ( RoutingExtension extension)

Add a routing extension to the routing core.

Parameters
extension

Definition at line 82 of file BaseRouter.cpp.

References ibrcommon::RWMutex::LOCK_READWRITE.

void dtn::routing::BaseRouter::clearExtensions ( )

Delete all extensions

Definition at line 104 of file BaseRouter.cpp.

References ibrcommon::RWMutex::LOCK_READWRITE.

Referenced by ~BaseRouter().

void dtn::routing::BaseRouter::componentDown ( ) throw ()
protectedvirtual

Implements dtn::daemon::IntegratedComponent.

Definition at line 228 of file BaseRouter.cpp.

References dtn::core::EventDispatcher< E >::remove().

Here is the call graph for this function:

void dtn::routing::BaseRouter::componentUp ( ) throw ()
protectedvirtual

Implements dtn::daemon::IntegratedComponent.

Definition at line 210 of file BaseRouter.cpp.

References dtn::core::EventDispatcher< E >::add().

Here is the call graph for this function:

void dtn::routing::BaseRouter::doHandshake ( const dtn::data::EID eid)

Request a neighbor handshake

Parameters
eid

Definition at line 502 of file BaseRouter.cpp.

References dtn::routing::NodeHandshakeExtension::doHandshake().

Here is the call graph for this function:

void dtn::routing::BaseRouter::extensionsDown ( ) throw ()
void dtn::routing::BaseRouter::extensionsUp ( ) throw ()
bool dtn::routing::BaseRouter::filterKnown ( const dtn::data::MetaBundle meta)

check if a bundle is known if the bundle is unkown add it to the known list and return false

Parameters
id
Returns

Definition at line 533 of file BaseRouter.cpp.

References dtn::data::BundleSet::add(), and dtn::data::BundleSet::has().

Here is the call graph for this function:

ibrcommon::RWMutex & dtn::routing::BaseRouter::getExtensionMutex ( ) throw ()

Give access to the mutex for the extension list

Definition at line 94 of file BaseRouter.cpp.

Referenced by processHandshake(), requestHandshake(), and responseHandshake().

const BaseRouter::extension_list & dtn::routing::BaseRouter::getExtensions ( ) const

Returns a reference to all extensions.

Returns

Definition at line 99 of file BaseRouter.cpp.

Referenced by processHandshake(), requestHandshake(), and responseHandshake().

const dtn::data::BundleSet dtn::routing::BaseRouter::getKnownBundles ( )

Get a vector (bloomfilter) of all known bundles.

Returns

Definition at line 542 of file BaseRouter.cpp.

const std::string dtn::routing::BaseRouter::getName ( ) const
virtual
See Also
Component::getName()

Implements dtn::daemon::Component.

Definition at line 567 of file BaseRouter.cpp.

NeighborDatabase & dtn::routing::BaseRouter::getNeighborDB ( )

Access to the neighbor database. Where several data about the neighbors is stored.

Returns

Definition at line 572 of file BaseRouter.cpp.

Referenced by dtn::routing::RoutingExtension::transferTo().

const dtn::data::BundleSet dtn::routing::BaseRouter::getPurgedBundles ( )

Get a vector (bloomfilter) of all purged bundles.

Returns

Definition at line 561 of file BaseRouter.cpp.

dtn::storage::BundleSeeker & dtn::routing::BaseRouter::getSeeker ( )

provides direct access to the bundle seeker

Definition at line 512 of file BaseRouter.cpp.

References dtn::core::BundleCore::getInstance(), and dtn::core::BundleCore::getSeeker().

Here is the call graph for this function:

dtn::storage::BundleStorage & dtn::routing::BaseRouter::getStorage ( )

provides direct access to the bundle storage

Definition at line 507 of file BaseRouter.cpp.

References dtn::core::BundleCore::getInstance(), and dtn::core::BundleCore::getStorage().

Here is the call graph for this function:

bool dtn::routing::BaseRouter::isKnown ( const dtn::data::BundleID id)

This method returns true, if the given BundleID is known.

Parameters
id
Returns

Definition at line 524 of file BaseRouter.cpp.

References dtn::data::BundleSet::has().

Here is the call graph for this function:

bool dtn::routing::BaseRouter::isPurged ( const dtn::data::BundleID id)

This method returns true, if the given BundleID is purged.

Parameters
id
Returns

Definition at line 549 of file BaseRouter.cpp.

References dtn::data::BundleSet::has().

Here is the call graph for this function:

void dtn::routing::BaseRouter::processHandshake ( const dtn::data::EID source,
NodeHandshake answer 
)

Process a completed handshake This method will iterate through all extensions and give each of them a chance to process the completed handshake

Definition at line 150 of file BaseRouter.cpp.

References getExtensionMutex(), getExtensions(), ibrcommon::RWMutex::LOCK_READONLY, dtn::routing::NodeHandshakeExtension::processHandshake(), and dtn::routing::RoutingExtension::processHandshake().

Here is the call graph for this function:

void dtn::routing::BaseRouter::raiseEvent ( const dtn::core::Event evt) throw ()
virtual
void dtn::routing::BaseRouter::remove ( RoutingExtension extension)

Remove a routing extension from the routing core

Definition at line 88 of file BaseRouter.cpp.

References ibrcommon::RWMutex::LOCK_READWRITE.

void dtn::routing::BaseRouter::requestHandshake ( const dtn::data::EID destination,
NodeHandshake request 
)

Request to a received handshake request This method will iterate through all extensions and ask each of them if they are interested in some sort of routing data of the other peer

Definition at line 190 of file BaseRouter.cpp.

References getExtensionMutex(), getExtensions(), ibrcommon::RWMutex::LOCK_READONLY, dtn::routing::NodeHandshakeExtension::requestHandshake(), and dtn::routing::RoutingExtension::requestHandshake().

Here is the call graph for this function:

void dtn::routing::BaseRouter::responseHandshake ( const dtn::data::EID source,
const NodeHandshake request,
NodeHandshake answer 
)

Respond to a received handshake request This method will iterate through all extensions and give each of them a chance to respond to a received handshake request

Definition at line 170 of file BaseRouter.cpp.

References getExtensionMutex(), getExtensions(), ibrcommon::RWMutex::LOCK_READONLY, dtn::routing::NodeHandshakeExtension::responseHandshake(), and dtn::routing::RoutingExtension::responseHandshake().

Here is the call graph for this function:

void dtn::routing::BaseRouter::setKnown ( const dtn::data::MetaBundle meta)

This method add a BundleID to the set of known bundles

Parameters
id

Definition at line 517 of file BaseRouter.cpp.

References dtn::data::BundleSet::add().

Here is the call graph for this function:

void dtn::routing::BaseRouter::setPurged ( const dtn::data::MetaBundle meta)

Add a bundle to the purge vector of this daemon.

Parameters
metaThe bundle to purge.

Definition at line 555 of file BaseRouter.cpp.

References dtn::data::BundleSet::add().

Here is the call graph for this function:


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