![]() |
User Manual, Developers Guide and API Documentation |
![]() |
#include <iptables/Chain.hpp>


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::CommandReaderInterface * | ipHeaderReader |
| RuleContainer | rules |
Definition at line 57 of file Chain.hpp.
| typedef std::list<ip::iptables::Rule> ip::iptables::Chain::RuleContainer |
| Chain::Chain | ( | wns::ldk::fun::FUN * | fun, | |
| const wns::pyconfig::View & | _pyco | |||
| ) |
| targets::TargetResult Chain::activateChain | ( | IPCommand * | ipHeader, | |
| wns::service::tl::ITCPHeader * | tcpHeader, | |||
| wns::service::tl::IUDPHeader * | udpHeader | |||
| ) |
| void Chain::addRule | ( | ip::iptables::Rule | rule | ) | [virtual] |
Adds Rule to the RuleContainer.
Implements ip::iptables::IRuleControl.
| bool Chain::doIsAccepting | ( | const wns::ldk::CompoundPtr & | compound | ) | const [virtual] |
| void Chain::doOnData | ( | const wns::ldk::CompoundPtr & | compound | ) | [virtual] |
| void Chain::doSendData | ( | const wns::ldk::CompoundPtr & | compound | ) | [virtual] |
| ip::iptables::Rule Chain::getRule | ( | ip::iptables::Rule::RuleTag | ruleTag | ) | [virtual] |
| bool Chain::hasRules | ( | ip::iptables::Rule::RuleTag | ruleTag | ) | [virtual] |
| 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.
| void Chain::removeRules | ( | ip::iptables::Rule::RuleTag | ruleTag | ) | [virtual] |
wns::logger::Logger ip::iptables::Chain::log [protected] |
RuleContainer ip::iptables::Chain::rules [private] |
1.5.5