MobileForwarding::Forwarding Class Reference
[libmobileforwarding]

Forwarding policy for mobile forwarding protocols. More...

#include <mobileforwarding/Forwarding.h>

Inheritance diagram for MobileForwarding::Forwarding:

Inheritance graph
[legend]
Collaboration diagram for MobileForwarding::Forwarding:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Forwarding (DTN::Node *owner, DTN::Link *link, Protocol *prot)
 Constructor.
virtual ~Forwarding ()
 Virtual destructor.
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.


Detailed Description

Forwarding policy for mobile forwarding protocols.

Definition at line 46 of file Forwarding.h.


Constructor & Destructor Documentation

Forwarding::Forwarding ( DTN::Node owner,
DTN::Link link,
Protocol prot 
)

Constructor.

Parameters:
owner The node at which this policy resides
link The physical link for the owner
prot The mobile forwarding protocol

Definition at line 39 of file Forwarding.cc.


Member Function Documentation

bool Forwarding::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 51 of file Forwarding.cc.

References DTN::Link::available(), MobileForwarding::Protocol::getLink(), DTN::Bundle::kBcast, DTN::NodePolicy::m_owner, DTN::Bundle::recv(), MobileForwarding::Protocol::tweak(), DTN::Bundle::type(), and MobileForwarding::Protocol::visible().

DTN::Bundle * Forwarding::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 89 of file Forwarding.cc.

References MobileForwarding::Protocol::getLink(), DTN::NoRouteDrop::inst, DTN::BundlePointer::isNull(), DTN::Bundle::kBcast, DTN::NodePolicy::m_owner, DTN::BundlePointer::next(), DTN::Bundle::recv(), DTN::BundlePointer::repr(), DTN::Bundle::type(), and MobileForwarding::Protocol::visible().


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