#include <dtnaodv/AODVForwardingPolicy.h>


Public Member Functions | |
| AODVForwardingPolicy (DTN::Node *owner, uint16_t prefix) | |
| Constructor. | |
| virtual | ~AODVForwardingPolicy () |
| Virtual destructor. | |
| void | cache (DTN::BundlePointer &p) |
| Cache information about a newly stored Bundle for faster access. | |
| 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. | |
| void | handleMessage (const DTN::Bundle &b) |
| Pass a protocol message encapsulated in a DTN::Bundle to AODV. | |
| unsigned int | traversalTime () const |
| |
| void | addLink (DTN::Link *l) |
| We do not take ownership of this link. | |
| void | notify () |
| Notify the policy that a new AODV route has been established. | |
| const aodv_state_t & | state () const |
| |
Definition at line 43 of file AODVForwardingPolicy.h.
| AODVForwardingPolicy::AODVForwardingPolicy | ( | DTN::Node * | owner, | |
| uint16_t | prefix | |||
| ) |
Constructor.
| owner | The node for which this class determines bundle forwarding | |
| prefix | The prefix length (in the AODV sense) for the subnet handled by this node |
Definition at line 44 of file AODVForwardingPolicy.cc.
References DTN::Node::addr(), and fill_addr().
| void AODVForwardingPolicy::cache | ( | DTN::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 65 of file AODVForwardingPolicy.cc.
| bool AODVForwardingPolicy::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 70 of file AODVForwardingPolicy.cc.
References AODV_GR_NOROUTE, DTN::Link::available(), DTN::Bundle::destination(), fill_addr(), DTN::Bundle::kBcast, DTN::NodePolicy::m_owner, DTN::Bundle::source(), and DTN::Bundle::type().
| DTN::Bundle * AODVForwardingPolicy::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 118 of file AODVForwardingPolicy.cc.
References DTN::Bundle::destination(), fill_addr(), DTN::BundlePointer::isNull(), DTN::NodePolicy::m_owner, DTN::BundlePointer::next(), DTN::BundlePointer::repr(), and DTN::Bundle::source().
| void AODVForwardingPolicy::handleMessage | ( | const DTN::Bundle & | b | ) |
Pass a protocol message encapsulated in a DTN::Bundle to AODV.
| b | A bundle containing an AODV protocol message |
Definition at line 149 of file AODVForwardingPolicy.cc.
References aodv_msghdr::addr, aodv_handle_message(), aodv_addr::data, aodv_chunk::data, fill_addr(), aodv_msghdr::interface, aodv_chunk::length, DTN::NodePolicy::m_owner, aodv_chunk::next, DTN::Bundle::payload(), DTN::Bundle::source(), and aodv_msghdr::ttl.
Referenced by AODVApp::process().
| void AODVForwardingPolicy::notify | ( | ) |
Notify the policy that a new AODV route has been established.
This will look for a queued DTN::Bundle that can now be sent, assuming the link is available.
Definition at line 187 of file AODVForwardingPolicy.cc.
References DTN::Link::available(), and DTN::NodePolicy::m_owner.
Referenced by AODVApp::notify().
1.5.4