softwarecontainer
0.18.0-739e8d7 2017-05-04
|
A rules entry for the treatment of packets. More...
#include <iptableentry.h>
Data Structures | |
struct | portFilter |
container for port filtering options. More... | |
struct | Rule |
Definition of a 'Rule' used to handle network traffic. More... | |
Public Types | |
enum | Target { INVALID_TARGET, ACCEPT, DROP, REJECT } |
Targets for Rules. More... | |
Public Member Functions | |
bool | applyRules () |
Applies all rules to iptables. More... | |
std::string | interpretRule (Rule rule) |
Interprets a rule to iptables applicable string. More... | |
std::string | interpretRuleWithProtocol (Rule rule, const std::string &protocol) |
Interprets a rule with protocol information to iptables applicable string. More... | |
std::string | interpretPolicy (void) |
This function Interprets defaultTarget rule to iptables applicable policy string. More... | |
std::string | toString () |
Creates a string with information about the entry. More... | |
Data Fields | |
std::string | m_type |
std::vector< Rule > | m_rules |
Target | m_defaultTarget |
A rules entry for the treatment of packets.
Definition at line 29 of file iptableentry.h.
Targets for Rules.
Definition at line 51 of file iptableentry.h.
bool softwarecontainer::IPTableEntry::applyRules | ( | ) |
Applies all rules to iptables.
Definition at line 26 of file iptableentry.cpp.
References interpretPolicy(), interpretRule(), and interpretRuleWithProtocol().
std::string softwarecontainer::IPTableEntry::interpretRule | ( | Rule | rule | ) |
Interprets a rule to iptables applicable string.
Definition at line 110 of file iptableentry.cpp.
Referenced by applyRules().
std::string softwarecontainer::IPTableEntry::interpretRuleWithProtocol | ( | Rule | rule, |
const std::string & | protocol | ||
) |
Interprets a rule with protocol information to iptables applicable string.
Definition at line 69 of file iptableentry.cpp.
Referenced by applyRules().
std::string softwarecontainer::IPTableEntry::interpretPolicy | ( | void | ) |
This function Interprets defaultTarget rule to iptables applicable policy string.
defaultTarget indicates what happens to packets if they don't match to any rules. iptables apply this functionality with setting policy. The role of this function is converting defaultTarget configuration value to iptables policy
Definition at line 149 of file iptableentry.cpp.
Referenced by applyRules().
std::string softwarecontainer::IPTableEntry::toString | ( | ) |
Creates a string with information about the entry.
Definition at line 182 of file iptableentry.cpp.