User Manual, Developers Guide and API Documentation

ip::iptables::Chain Class Reference

Implementation of IPv4 routing functionality.

#include <iptables/Chain.hpp>

Inheritance diagram for ip::iptables::Chain:

Inheritance graph
[legend]
Collaboration diagram for ip::iptables::Chain:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::list
< ip::iptables::Rule
RuleContainer

Public Member Functions

targets::TargetResult activateChain (IPCommand *, wns::service::tl::ITCPHeader *, wns::service::tl::IUDPHeader *)
virtual bool activateIncoming (const IPCommand &)=0
 Derived Classed need to decide here if the IP packet is to be processed in the incoming path.
virtual bool activateOutgoing (const IPCommand &)=0
 Derived Classed need to decide here if the IP packet is to be processed in the outgoing path.
virtual void addRule (ip::iptables::Rule)
 Implementation of IRuleControl.
 Chain (wns::ldk::fun::FUN *fun, const wns::pyconfig::View &_pyco)
virtual bool doIsAccepting (const wns::ldk::CompoundPtr &) const
virtual void doOnData (const wns::ldk::CompoundPtr &)
virtual void doSendData (const wns::ldk::CompoundPtr &)
virtual void doWakeup ()
virtual ip::iptables::Rule getRule (ip::iptables::Rule::RuleTag ruleTag)
virtual bool hasRules (ip::iptables::Rule::RuleTag ruleTag)
virtual void onFUNCreated ()
 Resolve inter-FU dependencies.
virtual void removeRules (ip::iptables::Rule::RuleTag ruleTag)
 Removes all Rules from the RuleContainer with ruleTag ruleTag.
virtual void showRules ()
virtual ~Chain ()

Protected Attributes

wns::logger::Logger log
 The logger for this component.

Private Attributes

wns::ldk::CommandReaderInterfaceipHeaderReader
RuleContainer rules


Detailed Description

Definition at line 57 of file Chain.hpp.


Member Typedef Documentation

Definition at line 66 of file Chain.hpp.


Constructor & Destructor Documentation

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

Definition at line 35 of file Chain.cpp.

Chain::~Chain (  )  [virtual]

Definition at line 63 of file Chain.cpp.


Member Function Documentation

targets::TargetResult Chain::activateChain ( IPCommand ipHeader,
wns::service::tl::ITCPHeader tcpHeader,
wns::service::tl::IUDPHeader udpHeader 
)

Definition at line 174 of file Chain.cpp.

virtual bool ip::iptables::Chain::activateIncoming ( const IPCommand  )  [pure virtual]

virtual bool ip::iptables::Chain::activateOutgoing ( const IPCommand  )  [pure virtual]

void Chain::addRule ( ip::iptables::Rule  rule  )  [virtual]

Adds Rule to the RuleContainer.

Implements ip::iptables::IRuleControl.

Definition at line 215 of file Chain.cpp.

bool Chain::doIsAccepting ( const wns::ldk::CompoundPtr compound  )  const [virtual]

Definition at line 80 of file Chain.cpp.

void Chain::doOnData ( const wns::ldk::CompoundPtr compound  )  [virtual]

Definition at line 135 of file Chain.cpp.

void Chain::doSendData ( const wns::ldk::CompoundPtr compound  )  [virtual]

Definition at line 86 of file Chain.cpp.

void Chain::doWakeup (  )  [virtual]

Definition at line 129 of file Chain.cpp.

ip::iptables::Rule Chain::getRule ( ip::iptables::Rule::RuleTag  ruleTag  )  [virtual]

Definition at line 289 of file Chain.cpp.

bool Chain::hasRules ( ip::iptables::Rule::RuleTag  ruleTag  )  [virtual]

Implements ip::iptables::IRuleControl.

Definition at line 255 of file Chain.cpp.

void Chain::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.

Reimplemented in ip::iptables::PreroutingChain.

Definition at line 73 of file Chain.cpp.

void Chain::removeRules ( ip::iptables::Rule::RuleTag  ruleTag  )  [virtual]

Implements ip::iptables::IRuleControl.

Definition at line 225 of file Chain.cpp.

void Chain::showRules (  )  [virtual]

Definition at line 304 of file Chain.cpp.


Member Data Documentation

Definition at line 138 of file Chain.hpp.

Reimplemented in ip::iptables::PreroutingChain.

Definition at line 135 of file Chain.hpp.

Definition at line 139 of file Chain.hpp.


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

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