DTN::PrefixRoute Class Reference

A prefix-match routing table entry. More...

#include <dtn/PrefixRoute.h>

Inheritance diagram for DTN::PrefixRoute:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PrefixRoute (const ByteString &p, Link *l)
 Constructor.
virtual ~PrefixRoute ()
 Virtual destructor.
bool matches (const Bundle &b) const
 Test the appropriateness of this route for a Bundle.
unsigned int length () const
 Length of the routing prefix.
const ByteString & prefix () const
 The routing prefix.

Protected Member Functions

 PrefixRoute ()
 Default constructor (disabled).


Detailed Description

A prefix-match routing table entry.

Note that a PrefixRoute with a prefix that is as long as a fully specified address is essentially an ExplicitRoute. Such routes will not be uncommon.

Definition at line 46 of file PrefixRoute.h.


Constructor & Destructor Documentation

PrefixRoute::PrefixRoute ( const ByteString &  p,
Link l 
)

Constructor.

Parameters:
p The routing prefix
l The outgoing link for this route (passed to Route)

Definition at line 36 of file PrefixRoute.cc.


Member Function Documentation

bool PrefixRoute::matches ( const Bundle b  )  const [virtual]

Test the appropriateness of this route for a Bundle.

In general, this will depend on the specific subtype of Route. For example, a prefix routing algorithm will look at the Bundle's destination and see if the route is configured with a prefix of that destination.

Parameters:
b A bundle to forward
Returns:
whether this route is appropriate for b

Implements DTN::Route.

Definition at line 47 of file PrefixRoute.cc.

References DTN::Bundle::destination().


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