Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplierCleaner ¶
type ApplierCleaner interface { // Apply will create custom chains and insert rules Apply() error // Remove flush rules of all custom chains and remove them all Remove() error // Flush rules of all custom chains Flush() error }
ApplierCleaner is used to apply or clean custom chains and rules
func NewApplierCleaner ¶
func NewApplierCleaner(protocol Protocol, chains []JumpChain, rulesData []byte) ApplierCleaner
type FlushFlag ¶
type FlushFlag = utiliptables.FlushFlag
type Interface ¶
type Interface interface { utiliptables.Interface // CreateChains create custom chains and insert them in specified positions CreateChains(chains []JumpChain) error // SafeFlushChain flush rules of all custom chains, it won't return error if chain doesn't exist SafeFlushChain(table Table, chain Chain) error // FlushChains flush rules of all custom chains FlushChains(chains []JumpChain) error // DeleteChains flush rules of all custom chains and remove them all DeleteChains(chains []JumpChain) error // SafeDeleteChain flush rules of specified chain from specified table and delete the chain, // it won't return error if chain doesn't exist SafeDeleteChain(chain JumpChain) error // NewApplierCleaner create a ApplierCleaner with specified custom chains and rules NewApplierCleaner(chains []JumpChain, rulesData []byte) ApplierCleaner }
func NewIPTablesHelper ¶
type JumpChain ¶
type JumpChain struct { Table Table SrcChain Chain DstChain Chain Position RulePosition }
type Protocol ¶
type Protocol = utiliptables.Protocol
type RestoreCountersFlag ¶
type RestoreCountersFlag = utiliptables.RestoreCountersFlag
RestoreCountersFlag is an option flag for Restore
const ( RestoreCounters RestoreCountersFlag = true NoRestoreCounters RestoreCountersFlag = false )
type RulePosition ¶
type RulePosition = utiliptables.RulePosition
const ( Append RulePosition = utiliptables.Append Prepend RulePosition = utiliptables.Prepend )
Click to show internal directories.
Click to hide internal directories.