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

#include <NeighborDatabase.h>

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

Classes

class  AlreadyInTransitException
 
class  BloomfilterNotAvailableException
 
class  DatasetNotAvailableException
 
class  NeighborEntry
 
class  NeighborNotAvailableException
 
class  NoMoreTransfersAvailable
 
class  NoRouteKnownException
 

Public Member Functions

 NeighborDatabase ()
 
virtual ~NeighborDatabase ()
 
NeighborDatabase::NeighborEntryget (const dtn::data::EID &eid) throw (NeighborNotAvailableException)
 
NeighborDatabase::NeighborEntrycreate (const dtn::data::EID &eid) throw ()
 
void remove (const dtn::data::EID &eid)
 
void expire (const dtn::data::Timestamp &timestamp)
 
- Public Member Functions inherited from ibrcommon::Mutex
 Mutex (MUTEX_TYPE type=MUTEX_NORMAL)
 
virtual ~Mutex ()
 
virtual void trylock () throw (MutexException)
 
virtual void enter () throw (MutexException)
 
virtual void leave () throw (MutexException)
 
- Public Member Functions inherited from ibrcommon::MutexInterface
virtual ~MutexInterface ()=0
 

Additional Inherited Members

- Public Types inherited from ibrcommon::Mutex
enum  MUTEX_TYPE { MUTEX_NORMAL = PTHREAD_MUTEX_NORMAL, MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE, MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK }
 
- Static Public Member Functions inherited from ibrcommon::Mutex
static MutexInterfacedummy ()
 
- Protected Attributes inherited from ibrcommon::Mutex
pthread_mutex_t m_mutex
 
pthread_mutexattr_t m_attr
 

Detailed Description

The neighbor database contains collected information about neighbors. This includes the last timestamp on which a neighbor was seen, the bundles this neighbors has received (bloomfilter with age).

Definition at line 45 of file NeighborDatabase.h.

Constructor & Destructor Documentation

dtn::routing::NeighborDatabase::NeighborDatabase ( )

Definition at line 190 of file NeighborDatabase.cpp.

dtn::routing::NeighborDatabase::~NeighborDatabase ( )
virtual

Definition at line 194 of file NeighborDatabase.cpp.

Member Function Documentation

NeighborDatabase::NeighborEntry & dtn::routing::NeighborDatabase::create ( const dtn::data::EID eid) throw ()

Query a neighbor entry of the database. If the entry does not exists, a new entry is created and returned.

Parameters
eidThe EID of the neighbor.
Returns
The neighbor entry reference.

Definition at line 205 of file NeighborDatabase.cpp.

Referenced by dtn::routing::NodeHandshakeExtension::processHandshake(), and dtn::routing::ProphetRoutingExtension::processHandshake().

void dtn::routing::NeighborDatabase::expire ( const dtn::data::Timestamp timestamp)

trigger expire mechanisms for bloomfilter and bundle summary

Parameters
timestamp

Definition at line 127 of file NeighborDatabase.cpp.

References dtn::routing::NeighborDatabase::NeighborEntry::expire(), and dtn::routing::NeighborDatabase::NeighborEntry::isExpired().

Here is the call graph for this function:

NeighborDatabase::NeighborEntry & dtn::routing::NeighborDatabase::get ( const dtn::data::EID eid) throw (NeighborNotAvailableException)

Query a neighbor entry of the database. It throws an exception if the neighbor is not available.

Parameters
eidThe EID of the neighbor
Returns
The neighbor entry reference.

Definition at line 221 of file NeighborDatabase.cpp.

References dtn::core::BundleCore::getInstance().

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

Here is the call graph for this function:

void dtn::routing::NeighborDatabase::remove ( const dtn::data::EID eid)

Remove an entry of the database.

Parameters
eidThe EID of the neighbor to remove.

Definition at line 238 of file NeighborDatabase.cpp.


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