DTN::PrefixRoutingTable Class Reference

Longest-prefix routing. More...

#include <dtn/PrefixRoutingTable.h>

Inheritance diagram for DTN::PrefixRoutingTable:

Inheritance graph
[legend]
Collaboration diagram for DTN::PrefixRoutingTable:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::map< ByteString,
PrefixRoute * > 
RouteMap
 Data structure to hold routing table entries.

Public Member Functions

 PrefixRoutingTable ()
 Default constructor.
virtual ~PrefixRoutingTable ()
 Virtual destructor.
Linktarget (const Bundle &b) const
 Find the next hop for a Bundle.
virtual void addRoute (PrefixRoute *r)
 Add a prefix route to the routing table.
void delRoute (const ByteString &pfix)
 Delete a Route from the internal list.


Detailed Description

Longest-prefix routing.

Definition at line 45 of file PrefixRoutingTable.h.


Member Function Documentation

Link & PrefixRoutingTable::target ( const Bundle b  )  const [virtual]

Find the next hop for a Bundle.

Subclasses must define this appropriately. Different types of routing tables will have different matching criteria.

Parameters:
b A bundle to be forwarded
Returns:
the link through which b should be forwarded

Implements DTN::RoutingTable.

Definition at line 57 of file PrefixRoutingTable.cc.

References DTN::Bundle::destination().

void PrefixRoutingTable::addRoute ( PrefixRoute r  )  [virtual]

Add a prefix route to the routing table.

Parameters:
r A prefix route; this class takes ownership of the memory

Definition at line 83 of file PrefixRoutingTable.cc.

References DTN::PrefixRoute::prefix().

Referenced by PrefixRoutingEntity::configure().

void PrefixRoutingTable::delRoute ( const ByteString &  pfix  ) 

Delete a Route from the internal list.

Parameters:
pfix A prefix for a routing table entry

Definition at line 92 of file PrefixRoutingTable.cc.


The documentation for this class was generated from the following files:
Generated on Mon Mar 24 11:15:48 2008 for Pydtn Simulator by  doxygen 1.5.4