#include <dtn/RoutedForwarding.h>


Public Types | |
| typedef std::list< BundlePointer > | BundlePointerList |
| A collection of BundlePointers queued up for a Link. | |
|
typedef std::map< const Link *, BundlePointerList > | BundleCache |
| A mapping between Links and their BundlePointer queues. | |
Public Member Functions | |
| RoutedForwarding (Node *owner) | |
| Constructor. | |
| virtual | ~RoutedForwarding () |
| Virtual destructor. | |
| void | cache (BundlePointer &p) |
| Cache information about a newly stored Bundle for faster access. | |
| bool | forward (Bundle *b) |
| Attepmt to forward a Bundle. | |
| Bundle * | forwardOn (const Link &l) |
| Attepmt to forward along a Link that has become available. | |
| virtual void | addRouting (RoutingTable *table) |
| Add a routing table to the forwarding policy. | |
Protected Member Functions | |
| virtual Link & | target (const Bundle &b) |
Find the appropriate route to reach a given destination. | |
| virtual void | protected_set () |
| If the policy object needs to do anything when a BundleStore changes, this should be overridden. | |
It employs simple FIFO scheduling.
Definition at line 46 of file RoutedForwarding.h.
| void RoutedForwarding::cache | ( | BundlePointer & | p | ) | [virtual] |
Cache information about a newly stored Bundle for faster access.
By default, nothing is done. Derived classes may override this.
| p | A reference to a Bundle in the BundleStore |
Reimplemented from DTN::ForwardingPolicy.
Definition at line 44 of file RoutedForwarding.cc.
References DTN::BundlePointerRepr::bundle(), DTN::BundlePointer::repr(), and target().
| bool RoutedForwarding::forward | ( | Bundle * | b | ) | [virtual] |
Attepmt to forward a Bundle.
Concrete derived classes must implement this.
| b | A Bundle to forward |
| true | b was forwarded | |
| false | b was not forwarded and should be considered for local storage |
Implements DTN::ForwardingPolicy.
Definition at line 60 of file RoutedForwarding.cc.
References DTN::Link::available(), DTN::NodePolicy::m_owner, DTN::Node::send(), and target().
Attepmt to forward along a Link that has become available.
Concrete derived classes must implement this.
Implements DTN::ForwardingPolicy.
Definition at line 85 of file RoutedForwarding.cc.
References DTN::BundlePointerRepr::bundle(), DTN::NodePolicy::m_owner, DTN::Node::remove(), DTN::BundlePointer::repr(), and DTN::Node::validate().
| void RoutedForwarding::addRouting | ( | RoutingTable * | table | ) | [virtual] |
Add a routing table to the forwarding policy.
If there is an existing table, it is replaced with the new one. The policy does not take ownership of the table
| table | The new routing table |
Definition at line 113 of file RoutedForwarding.cc.
Referenced by RoutingEntity::generatePolicy().
Find the appropriate route to reach a given destination.
| b | The Bundle is being sent |
Definition at line 120 of file RoutedForwarding.cc.
References DTN::RoutingTable::target().
| void RoutedForwarding::protected_set | ( | ) | [protected, virtual] |
If the policy object needs to do anything when a BundleStore changes, this should be overridden.
Reimplemented from DTN::NodePolicy.
Definition at line 133 of file RoutedForwarding.cc.
1.5.4