AODVForwardingPolicy Class Reference
[libdtnaodv]

DTN hook into AODV routing. More...

#include <dtnaodv/AODVForwardingPolicy.h>

Inheritance diagram for AODVForwardingPolicy:

Inheritance graph
[legend]
Collaboration diagram for AODVForwardingPolicy:

Collaboration graph
[legend]

List of all members.

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::BundleforwardOn (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
 
Returns:
the configured estimate of the network traversal time (in milliseconds), used for setting AODV bundle lifetimes

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_tstate () const
 
Returns:
the internal AODV state


Detailed Description

DTN hook into AODV routing.

Definition at line 43 of file AODVForwardingPolicy.h.


Constructor & Destructor Documentation

AODVForwardingPolicy::AODVForwardingPolicy ( DTN::Node owner,
uint16_t  prefix 
)

Constructor.

Parameters:
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().


Member Function Documentation

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.

Parameters:
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.

Parameters:
b A Bundle to forward
Return values:
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.

Parameters:
l A Link capable of transmitting a new Bundle
Returns:
a Bundle to forward

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.

Parameters:
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().


The documentation for this class was generated from the following files:
Generated on Mon Mar 24 11:15:47 2008 for Pydtn Simulator by  doxygen 1.5.4