#include <dtn/PrefixRoute.h>


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). | |
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.
| PrefixRoute::PrefixRoute | ( | const ByteString & | p, | |
| Link * | l | |||
| ) |
Constructor.
| p | The routing prefix | |
| l | The outgoing link for this route (passed to Route) |
Definition at line 36 of file PrefixRoute.cc.
| 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.
| b | A bundle to forward |
Implements DTN::Route.
Definition at line 47 of file PrefixRoute.cc.
References DTN::Bundle::destination().
1.5.4