Documentation ¶
Index ¶
Constants ¶
const LockfilePath16x = "/run/xtables.lock"
const WaitIntervalString = "-W"
WaitIntervalString a constant for specifying the wait interval flag
const WaitIntervalUsecondsValue = "100000"
WaitIntervalUsecondsValue a constant for specifying the default wait interval useconds
const WaitSecondsValue = "5"
WaitSecondsValue a constant for specifying the default wait seconds
const WaitString = "-w"
WaitString a constant for specifying the wait flag
Variables ¶
var MinCheckVersion = utilversion.MustParseGeneric("1.4.11")
MinCheckVersion minimum version to be checked Versions of iptables less than this do not support the -C / --check flag (test whether a rule exists).
var RandomFullyMinVersion = utilversion.MustParseGeneric("1.6.2")
RandomFullyMinVersion is the minimum version from which the --random-fully flag is supported, used for port mapping to be fully randomized
var WaitIntervalMinVersion = utilversion.MustParseGeneric("1.6.1")
WaitIntervalMinVersion a minimum iptables versions supporting the wait interval useconds
var WaitMinVersion = utilversion.MustParseGeneric("1.4.20")
WaitMinVersion a minimum iptables versions supporting the -w and -w<seconds> flags
var WaitRestoreMinVersion = utilversion.MustParseGeneric("1.6.2")
WaitRestoreMinVersion a minimum iptables versions supporting the wait restore seconds
var WaitSecondsMinVersion = utilversion.MustParseGeneric("1.4.22")
WaitSecondsMinVersion a minimum iptables versions supporting the wait seconds
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { EnsureChian(table Table, chain Chain) (bool, error) FlushChain(table Table, chain Chain) error DeleteChain(table Table, chain Chain) error EnsureRule(position RulePosition, table Table, chain Chain, args ...string) (bool, error) DeleteRule(table Table, chain Chain, args ...string) error SaveInto(table Table, buffer *bytes.Buffer) error Restore(table Table, data []byte, flush FlushFlag, counters RestoreCountersFlag) error RestoreAll(data []byte, flush FlushFlag, counters RestoreCountersFlag) error }
type IptablesCommand ¶
type IptablesCommand string
type RestoreCountersFlag ¶
type RestoreCountersFlag bool
const NoRestoreCounters RestoreCountersFlag = false
const RestoreCounters RestoreCountersFlag = true
type RulePosition ¶
type RulePosition string
const ( Prepend RulePosition = "-I" Append RulePosition = "-A" )