User Manual, Developers Guide and API Documentation

ip::Forwarding Class Reference

IPv4 Handler interface. More...

#include <Forwarding.hpp>

Inheritance diagram for ip::Forwarding:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

void addListeningAddress (wns::service::nl::Address listenerAddress)
 Forwarding (wns::ldk::fun::FUN *fun, const wns::pyconfig::View &_pyco)
 Forwarding functionality takes the component and a pyconfig::View for initialization.
virtual wns::ldk::CompoundPtr getSomethingToSend ()
 Return the PDU that is ready to be sent.
virtual bool hasCapacity () const
 Return true, if the FunctionalUnit is still accepting compounds.
virtual const wns::ldk::CompoundPtr hasSomethingToSend () const
 Return a PDU that is ready to be sent or NULL, if none available.
virtual void onFUNCreated ()
 Resolve inter-FU dependencies.
virtual void processIncoming (const wns::ldk::CompoundPtr &compound)
 Process compounds on uplink.
virtual void processOutgoing (const wns::ldk::CompoundPtr &)
 Process compounds on downlink.
void removeListeningAddress (wns::service::nl::Address listenerAddress)
virtual ~Forwarding ()
 Destructor.

Protected Member Functions

wns::pyconfig::View getConfig ()
 Returns the configuration for this component.

Private Types

typedef wns::service::nl::Address Address
typedef std::list
< wns::service::nl::Address
AddressContainer

Private Member Functions

bool putOnNextHop (const wns::ldk::CompoundPtr &compound)
 Helper function to decide wether the compound can be forwarded to another hop.
bool reachedDestination (const wns::ldk::CompoundPtr &compound)
 Helper function to decide wether the received compound is for this station.

Private Attributes

wns::ldk::CompoundPtr buffer
wns::ldk::CommandReaderInterfaceipHeaderReader
bool isForwarding
 Decide wether incoming data is forwarded to another connected dll if it's not addressed to itself.
AddressContainer listeningAddresses
wns::logger::Logger log
 The logger for this component.
wns::pyconfig::View pyco
 Configuration of this component.
int ttl
 The TTL to use for new compounds.


Detailed Description

Configuration Class:
ip.Component.Forwarding

Definition at line 71 of file Forwarding.hpp.


Member Typedef Documentation

Definition at line 79 of file Forwarding.hpp.

Definition at line 80 of file Forwarding.hpp.


Constructor & Destructor Documentation

Forwarding::Forwarding ( wns::ldk::fun::FUN fun,
const wns::pyconfig::View _pyco 
)

Parameters:
[in] _component The corresponding component
[in] _pyco Configuration for this component.

Definition at line 41 of file Forwarding.cpp.

virtual ip::Forwarding::~Forwarding (  )  [inline, virtual]

Definition at line 95 of file Forwarding.hpp.


Member Function Documentation

void Forwarding::addListeningAddress ( wns::service::nl::Address  listenerAddress  ) 

Definition at line 57 of file Forwarding.cpp.

wns::pyconfig::View ip::Forwarding::getConfig (  )  [protected]

wns::ldk::CompoundPtr Forwarding::getSomethingToSend (  )  [virtual]

This method must never return NULL. This method will only be called after a call to hasSomethingToSend returned a non-null value. The FunctionalUnit must return the same PDU as returned by hasSomethingToSend.

Implements wns::ldk::DelayedInterface.

Definition at line 213 of file Forwarding.cpp.

bool Forwarding::hasCapacity (  )  const [virtual]

While hasCapacity returns false, processIncoming will never be called.

Implements wns::ldk::DelayedInterface.

Definition at line 195 of file Forwarding.cpp.

const wns::ldk::CompoundPtr Forwarding::hasSomethingToSend (  )  const [virtual]

Implements wns::ldk::DelayedInterface.

Definition at line 207 of file Forwarding.cpp.

void Forwarding::onFUNCreated (  )  [virtual]

Often FunctionalUnits require the collaboration with other FunctionalUnits to accomplish their task. For the collaboration between FunctionalUnits we coined the term "friendship".

The onFUNCreated method is a hook being called after the complete FUN has been set up. FunctionalUnits requiring the collaboration with other FunctionalUnits should resolve these dependencies by implementing this hook accordingly.

Finding friends is usually done calling wns::ldk::fun::FUN::findFriend.

When building reconfigurable FUNs, this method may get called multiple times (e.g., after each FUN reconfiguration). Keep that in mind when allocating resources in your onFUNCreated implementation.

Reimplemented from wns::ldk::FunctionalUnit.

Definition at line 80 of file Forwarding.cpp.

void Forwarding::processIncoming ( const wns::ldk::CompoundPtr compound  )  [virtual]

Override this method to handle incoming compounds.

Implements wns::ldk::DelayedInterface.

Definition at line 113 of file Forwarding.cpp.

void Forwarding::processOutgoing ( const wns::ldk::CompoundPtr  )  [virtual]

Override this method to handle outgoing compounds.

Implements wns::ldk::DelayedInterface.

Definition at line 87 of file Forwarding.cpp.

bool Forwarding::putOnNextHop ( const wns::ldk::CompoundPtr compound  )  [private]

Definition at line 249 of file Forwarding.cpp.

bool Forwarding::reachedDestination ( const wns::ldk::CompoundPtr compound  )  [private]

Definition at line 222 of file Forwarding.cpp.

void Forwarding::removeListeningAddress ( wns::service::nl::Address  listenerAddress  ) 

Definition at line 68 of file Forwarding.cpp.


Member Data Documentation

Definition at line 163 of file Forwarding.hpp.

Definition at line 138 of file Forwarding.hpp.

Definition at line 154 of file Forwarding.hpp.

Definition at line 161 of file Forwarding.hpp.

Definition at line 148 of file Forwarding.hpp.

Definition at line 143 of file Forwarding.hpp.

Definition at line 159 of file Forwarding.hpp.


The documentation for this class was generated from the following files:

Generated on Sat May 26 03:32:31 2012 for openWNS by  doxygen 1.5.5