a netfilter mark/mask pair More...
#include <NfMarkConfig.h>
Public Member Functions | |
NfMarkConfig () | |
creates an empty object More... | |
NfMarkConfig (nfmark_t mark_val, nfmark_t mask_val) | |
creates an object with specified mark and mask More... | |
bool | matches (const nfmark_t m) const |
whether the 'm' matches the configured mark/mask More... | |
bool | isEmpty () const |
whether the netfilter mark is unset More... | |
bool | hasMask () const |
whether the mask is set More... | |
nfmark_t | applyToMark (nfmark_t m) const |
Static Public Member Functions | |
static NfMarkConfig | Parse (const SBuf &token) |
parses a token and returns an object, expects a "mark[/mask]" format More... | |
Public Attributes | |
nfmark_t | mark = 0 |
nfmark_t | mask = 0xffffffff |
Detailed Description
Definition at line 22 of file NfMarkConfig.h.
Constructor & Destructor Documentation
◆ NfMarkConfig() [1/2]
|
inline |
Definition at line 26 of file NfMarkConfig.h.
◆ NfMarkConfig() [2/2]
Definition at line 28 of file NfMarkConfig.h.
Member Function Documentation
◆ applyToMark()
Applies configured mark/mask to previously set mark (m). m is ANDed with the negated mask and then ORed with the configured mark.
- Returns
- new mark. This is similar to what iptables –set-mark does.
Definition at line 46 of file NfMarkConfig.cc.
Referenced by Ip::Qos::setNfConnmark().
◆ hasMask()
|
inline |
Definition at line 37 of file NfMarkConfig.h.
References mask.
◆ isEmpty()
|
inline |
Definition at line 35 of file NfMarkConfig.h.
References mark.
Referenced by Ip::Qos::Config::isAclNfmarkActive().
◆ matches()
|
inline |
Definition at line 33 of file NfMarkConfig.h.
◆ Parse()
|
static |
Definition at line 32 of file NfMarkConfig.cc.
References Parser::Tokenizer::atEnd(), getNfmark(), mark, mask, Parser::Tokenizer::skip(), TexcHere, and ToSBuf().
Referenced by Acl::ConnMark::parse().
Member Data Documentation
◆ mark
nfmark_t Ip::NfMarkConfig::mark = 0 |
Definition at line 43 of file NfMarkConfig.h.
◆ mask
nfmark_t Ip::NfMarkConfig::mask = 0xffffffff |
Definition at line 44 of file NfMarkConfig.h.
The documentation for this class was generated from the following files:
- src/ip/NfMarkConfig.h
- src/ip/NfMarkConfig.cc