IBR-DTN  1.0.0
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::RWMutex & getExtensionMutex () throw ()
 
void clearExtensions ()
 
void raiseEvent (const dtn::net::TransferAbortedEvent &evt) throw ()
 
void raiseEvent (const dtn::net::TransferCompletedEvent &evt) throw ()
 
void raiseEvent (const dtn::net::BundleReceivedEvent &evt) throw ()
 
void raiseEvent (const dtn::routing::QueueBundleEvent &evt) throw ()
 
void raiseEvent (const dtn::core::NodeEvent &evt) throw ()
 
void raiseEvent (const dtn::core::TimeEvent &evt) throw ()
 
void raiseEvent (const dtn::net::ConnectionEvent &evt) throw ()
 
void raiseEvent (const dtn::core::BundlePurgeEvent &evt) throw ()
 
dtn::storage::BundleStoragegetStorage ()
 
dtn::storage::BundleSeekergetSeeker ()
 
void doHandshake (const dtn::data::EID &eid)
 
void pushHandshakeUpdated (const NodeHandshakeItem::IDENTIFIER id)
 
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::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
 
- Public Member Functions inherited from dtn::core::EventReceiver< dtn::net::TransferAbortedEvent >
virtual ~EventReceiver ()
 
- Public Member Functions inherited from dtn::core::EventReceiver< dtn::net::TransferCompletedEvent >
virtual ~EventReceiver ()
 
- Public Member Functions inherited from dtn::core::EventReceiver< dtn::net::BundleReceivedEvent >
virtual ~EventReceiver ()
 
- Public Member Functions inherited from dtn::core::EventReceiver< dtn::routing::QueueBundleEvent >
virtual ~EventReceiver ()
 
- Public Member Functions inherited from dtn::core::EventReceiver< dtn::core::NodeEvent >
virtual ~EventReceiver ()
 
- Public Member Functions inherited from dtn::core::EventReceiver< dtn::core::TimeEvent >
virtual ~EventReceiver ()
 
- Public Member Functions inherited from dtn::core::EventReceiver< dtn::net::ConnectionEvent >
virtual ~EventReceiver ()
 
- Public Member Functions inherited from dtn::core::EventReceiver< dtn::core::BundlePurgeEvent >
virtual ~EventReceiver ()
 

Protected Member Functions

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

Detailed Description

Definition at line 61 of file BaseRouter.h.

Member Typedef Documentation

Definition at line 104 of file BaseRouter.h.

Constructor & Destructor Documentation

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

implementation of the BaseRouter class

Definition at line 53 of file BaseRouter.cpp.

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

Here is the call graph for this function:

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

Definition at line 60 of file BaseRouter.cpp.

References clearExtensions(), dtn::core::BundleCore::getInstance(), and dtn::core::BundleCore::setRouter().

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 73 of file BaseRouter.cpp.

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

Delete all extensions

Definition at line 95 of file BaseRouter.cpp.

Referenced by ~BaseRouter().

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

Implements dtn::daemon::IntegratedComponent.

Definition at line 225 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 212 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 543 of file BaseRouter.cpp.

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

Here is the call graph for this function:

void dtn::routing::BaseRouter::extensionsDown ( )
throw (
)

disable all extensions

Definition at line 135 of file BaseRouter.cpp.

References dtn::routing::NodeHandshakeExtension::componentDown(), dtn::routing::RoutingExtension::componentDown(), and dtn::routing::RetransmissionExtension::componentDown().

Here is the call graph for this function:

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 579 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 85 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 90 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 588 of file BaseRouter.cpp.

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

Implements dtn::daemon::Component.

Definition at line 613 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 618 of file BaseRouter.cpp.

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

Get a vector (bloomfilter) of all purged bundles.

Returns

Definition at line 607 of file BaseRouter.cpp.

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

provides direct access to the bundle seeker

Definition at line 558 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 553 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 570 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 595 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 152 of file BaseRouter.cpp.

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

Here is the call graph for this function:

void dtn::routing::BaseRouter::pushHandshakeUpdated ( const NodeHandshakeItem::IDENTIFIER  id)

Signals that some important data of the handshake has been updated

Definition at line 548 of file BaseRouter.cpp.

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

Here is the call graph for this function:

void dtn::routing::BaseRouter::raiseEvent ( const dtn::net::TransferAbortedEvent evt)
throw (
)
virtual
void dtn::routing::BaseRouter::raiseEvent ( const dtn::net::TransferCompletedEvent event)
throw (
)
virtual

method to receive new events from the EventSwitch

Implements dtn::core::EventReceiver< dtn::net::TransferCompletedEvent >.

Definition at line 241 of file BaseRouter.cpp.

References dtn::routing::NeighborDatabase::NeighborEntry::add(), and dtn::routing::NeighborDatabase::NeighborEntry::releaseTransfer().

Here is the call graph for this function:

void dtn::routing::BaseRouter::raiseEvent ( const dtn::routing::QueueBundleEvent evt)
throw (
)
virtual
void dtn::routing::BaseRouter::raiseEvent ( const dtn::core::TimeEvent evt)
throw (
)
virtual
void dtn::routing::BaseRouter::raiseEvent ( const dtn::net::ConnectionEvent evt)
throw (
)
virtual
void dtn::routing::BaseRouter::raiseEvent ( const dtn::core::BundlePurgeEvent evt)
throw (
)
virtual
void dtn::routing::BaseRouter::remove ( RoutingExtension extension)

Remove a routing extension from the routing core

Definition at line 79 of file BaseRouter.cpp.

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 192 of file BaseRouter.cpp.

References getExtensionMutex(), getExtensions(), 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 172 of file BaseRouter.cpp.

References getExtensionMutex(), getExtensions(), 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 563 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 601 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: