iptables

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 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

This section is empty.

Types

type Adapter added in v0.14.0

type Adapter struct {
	Basic
}

func (*Adapter) CreateChainIfNotExists added in v0.14.0

func (a *Adapter) CreateChainIfNotExists(table, chain string) error

func (*Adapter) InsertUnique added in v0.14.0

func (a *Adapter) InsertUnique(table, chain string, position int, ruleSpec []string) error

func (*Adapter) PrependUnique added in v0.14.0

func (a *Adapter) PrependUnique(table, chain string, ruleSpec []string) error

func (*Adapter) UpdateChainRules added in v0.14.0

func (a *Adapter) UpdateChainRules(table, chain string, rules [][]string) error

type Basic added in v0.14.0

type Basic 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
}

type Interface

type Interface interface {
	Basic
	CreateChainIfNotExists(table, chain string) error
	InsertUnique(table, chain string, position int, ruleSpec []string) error
	PrependUnique(table, chain string, ruleSpec []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.
	UpdateChainRules(table, chain string, rules [][]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