class PaIpfw2Backend
|
IPFW2 ACL backend interface.
More... |
|
|
Public Types
- enum { DEFAULT_RULESET = 0, TRANSCRIPT_RULESET = 1,
RESERVED_RULESET = 31, MAX_RULESETS = 32 }
- enum { MAX_IPFW2_RULE_WORDS = 255, IPFW_RULENUM_MAX = 65535 }
- enum { CMD_DEL_RULE = 0,
CMD_DEL_RULES_WITH_SET = 1,
CMD_MOVE_RULE = 2,
CMD_MOVE_RULESET = 3,
CMD_SWAP_RULESETS = 4
}
- typedef vector<uint32_t> RuleBuf
- typedef map<uint16_t, RuleBuf> RulesetDB
- typedef map<uint8_t, Snapshot4* > Snapshot4DB
- typedef bitset<MAX_RULESETS> RulesetGroup
Public Methods
Protected Methods
- int docmd4 (int optname, void *optval, socklen_t optlen)
- int enable_disable_rulesets4 (RulesetGroup& enable_group,
RulesetGroup& disable_group)
- int enable_ruleset4 (int index)
- int disable_ruleset4 (int index)
- int move_ruleset4 (int src_index, int dst_index)
- int swap_ruleset4 (int first_index, int second_index)
- int flush_ruleset4 (int index)
- int add_rule4 (const int ruleset_index, const PaEntry4& entry)
- void copy_ruleset4 (int src_index, int dst_index)
- int read_ruleset4 (const int ruleset_index, RulesetDB& rulesetdb)
- void renumber_ruleset4 (const int ruleset_index, RulesetDB& rulesetdb)
- int push_rulesetdb4 (RulesetDB& rulesetdb)
- void transcribe_rule4 (const PaEntry4& entry,
const int ruleset_index,
uint32_t rulebuf[MAX_IPFW2_RULE_WORDS],
uint32_t& size_used)
- int push_rule4 (const int ruleset_index, uint32_t rulebuf[],
const uint32_t size_used)
Protected Static Methods
Protected Members
Concrete class defining a backend which drives IPFW2 on FreeBSD.
~PaIpfw2Backend ()
| ~PaIpfw2Backend |
[virtual]
enum { DEFAULT_RULESET = 0, TRANSCRIPT_RULESET = 1,
RESERVED_RULESET = 31, MAX_RULESETS = 32 }
|
|
enum { MAX_IPFW2_RULE_WORDS = 255, IPFW_RULENUM_MAX = 65535 }
|
|
enum { CMD_DEL_RULE = 0,
CMD_DEL_RULES_WITH_SET = 1,
CMD_MOVE_RULE = 2,
CMD_MOVE_RULESET = 3,
CMD_SWAP_RULESETS = 4
}
|
|
typedef vector<uint32_t> RuleBuf | RuleBuf |
typedef map<uint16_t, RuleBuf> RulesetDB | RulesetDB |
typedef map<uint8_t, Snapshot4* > Snapshot4DB | Snapshot4DB |
typedef bitset<MAX_RULESETS> RulesetGroup | RulesetGroup |
const char* get_name ()
| get_name |
[const]
Reimplemented from PaBackend.
const char* get_version ()
| get_version |
[const]
Reimplemented from PaBackend.
bool push_entries4 (const PaSnapshot4* snap)
| push_entries4 |
Reimplemented from PaBackend.
bool delete_all_entries4 ()
| delete_all_entries4 |
Reimplemented from PaBackend.
Reimplemented from PaBackend.
Reimplemented from PaBackend.
bool push_entries6 (const PaSnapshot6* snap)
| push_entries6 |
Reimplemented from PaBackend.
bool delete_all_entries6 ()
| delete_all_entries6 |
Reimplemented from PaBackend.
[const]
Reimplemented from PaBackend.
Reimplemented from PaBackend.
bool get_autoinc_step (uint32_t& step)
| get_autoinc_step |
[protected static]
bool set_autoinc_step (const uint32_t& step)
| set_autoinc_step |
[protected static]
int docmd4 (int optname, void *optval, socklen_t optlen)
| docmd4 |
[protected]
int enable_disable_rulesets4 (RulesetGroup& enable_group,
RulesetGroup& disable_group)
| enable_disable_rulesets4 |
[protected]
int enable_ruleset4 (int index)
| enable_ruleset4 |
[protected]
int disable_ruleset4 (int index)
| disable_ruleset4 |
[protected]
int move_ruleset4 (int src_index, int dst_index)
| move_ruleset4 |
[protected]
int swap_ruleset4 (int first_index, int second_index)
| swap_ruleset4 |
[protected]
int flush_ruleset4 (int index)
| flush_ruleset4 |
[protected]
int add_rule4 (const int ruleset_index, const PaEntry4& entry)
| add_rule4 |
[protected]
void copy_ruleset4 (int src_index, int dst_index)
| copy_ruleset4 |
[protected]
int read_ruleset4 (const int ruleset_index, RulesetDB& rulesetdb)
| read_ruleset4 |
[protected]
void renumber_ruleset4 (const int ruleset_index, RulesetDB& rulesetdb)
| renumber_ruleset4 |
[protected]
int push_rulesetdb4 (RulesetDB& rulesetdb)
| push_rulesetdb4 |
[protected]
void transcribe_rule4 (const PaEntry4& entry,
const int ruleset_index,
uint32_t rulebuf[MAX_IPFW2_RULE_WORDS],
uint32_t& size_used)
| transcribe_rule4 |
[protected]
int push_rule4 (const int ruleset_index, uint32_t rulebuf[],
const uint32_t size_used)
| push_rule4 |
[protected]
inline Snapshot4** get_snapshotdb ()
| get_snapshotdb |
Snapshot4* _snapshot4db[MAX_RULESETS]
| _snapshot4db[MAX_RULESETS] |
[protected]
[protected]
Generated by: pavlin on possum.icir.org on Wed Mar 21 11:23:22 2007, using kdoc $.