Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // GetVersion returns the "X.Y.Z" semver string for ebtables. GetVersion() (string, error) // EnsureRule checks if the specified rule is present and, if not, creates it. If the rule existed, return true. // WARNING: ebtables does not provide check operation like iptables do. Hence we have to do a string match of args. // Input args must follow the format and sequence of ebtables list output. Otherwise, EnsureRule will always create // new rules and causing duplicates. EnsureRule(position RulePosition, table Table, chain Chain, args ...string) (bool, error) // EnsureChain checks if the specified chain is present and, if not, creates it. If the rule existed, return true. EnsureChain(table Table, chain Chain) (bool, error) // DeleteChain deletes the specified chain. If the chain did not exist, return error. DeleteChain(table Table, chain Chain) error // FlushChain flush the specified chain. If the chain did not exist, return error. FlushChain(table Table, chain Chain) error }
An injectable interface for running ebtables commands. Implementations must be goroutine-safe.
type RulePosition ¶
type RulePosition string
const ( Prepend RulePosition = "-I" Append RulePosition = "-A" )
Click to show internal directories.
Click to hide internal directories.