#include <epidemic/EpidemicForwarding.h>


Public Member Functions | |
| EpidemicForwarding (DTN::Node *owner, DTN::Link *link, EpidemicApp *app) | |
| Constructor. | |
| virtual | ~EpidemicForwarding () |
| Virtual destructor. | |
| bool | forward (DTN::Bundle *b) |
| Attepmt to forward a Bundle. | |
| DTN::Bundle * | forwardOn (const DTN::Link &l) |
| Attepmt to forward along a Link that has become available. | |
Definition at line 46 of file EpidemicForwarding.h.
| EpidemicForwarding::EpidemicForwarding | ( | DTN::Node * | owner, | |
| DTN::Link * | link, | |||
| EpidemicApp * | app | |||
| ) |
Constructor.
| owner | The node at which this policy resides | |
| link | The physical link for the owner | |
| app | The epidemic protocol manager |
Definition at line 39 of file EpidemicForwarding.cc.
| bool EpidemicForwarding::forward | ( | DTN::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 53 of file EpidemicForwarding.cc.
References DTN::Link::available(), Epidemic::EpidemicApp::getLink(), DTN::Bundle::kBcast, DTN::NodePolicy::m_owner, DTN::Bundle::recv(), and DTN::Bundle::type().
| DTN::Bundle * EpidemicForwarding::forwardOn | ( | const DTN::Link & | l | ) | [virtual] |
Attepmt to forward along a Link that has become available.
Concrete derived classes must implement this.
| l | A Link capable of transmitting a new Bundle |
Implements DTN::ForwardingPolicy.
Definition at line 85 of file EpidemicForwarding.cc.
References Epidemic::EpidemicApp::getLink(), DTN::NoRouteDrop::inst, DTN::BundlePointer::isNull(), DTN::Bundle::kBcast, DTN::NodePolicy::m_owner, DTN::BundlePointer::next(), DTN::Bundle::recv(), DTN::BundlePointer::repr(), and DTN::Bundle::type().
1.5.4