iptables

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewFunc func() (Interface, error)

Functions

func CreateChainIfNotExists added in v0.10.1

func CreateChainIfNotExists(ipt Interface, table, chain string) error

func InsertUnique added in v0.10.1

func InsertUnique(ipt Interface, table, chain string, position int, ruleSpec []string) error

func PrependUnique added in v0.10.1

func PrependUnique(ipt Interface, table, chain string, ruleSpec []string) error

func UpdateChainRules added in v0.10.1

func UpdateChainRules(ipt Interface, table, chain string, rules [][]string) error

UpdateChainRules ensures that the rules in the list are the ones in rules, without any preference for the order, any stale rules will be removed from the chain, and any missing rules will be added.

Types

type Interface

type Interface interface {
	Append(table, chain string, rulespec ...string) error
	AppendUnique(table, chain string, rulespec ...string) error
	Delete(table, chain string, rulespec ...string) error
	Insert(table, chain string, pos int, rulespec ...string) error
	List(table, chain string) ([]string, error)
	ListChains(table string) ([]string, error)
	NewChain(table, chain string) error
	ChainExists(table, chain string) (bool, error)
	ClearChain(table, chain string) error
	DeleteChain(table, chain string) error
}

func New

func New() (Interface, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL