network

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIP4Chain added in v0.20.0

func CreateIP4Chain(table, chain string)

func CreateIP6Chain added in v0.20.0

func CreateIP6Chain(table, chain string)

func DeleteIP4Tables added in v0.19.0

func DeleteIP4Tables(rules []IPTablesRule) error

DeleteIP4Tables delete specified iptables rules

func DeleteIP6Tables added in v0.15.0

func DeleteIP6Tables(rules []IPTablesRule) error

DeleteIP6Tables delete specified iptables rules

func SetupAndEnsureIP4Tables added in v0.19.0

func SetupAndEnsureIP4Tables(rules []IPTablesRule, resyncPeriod int)

func SetupAndEnsureIP6Tables added in v0.15.0

func SetupAndEnsureIP6Tables(rules []IPTablesRule, resyncPeriod int)

Types

type IPTables added in v0.9.1

type IPTables interface {
	AppendUnique(table string, chain string, rulespec ...string) error
	ChainExists(table, chain string) (bool, error)
	ClearChain(table, chain string) error
	Delete(table string, chain string, rulespec ...string) error
	Exists(table string, chain string, rulespec ...string) (bool, error)
}

type IPTablesError added in v0.14.0

type IPTablesError interface {
	IsNotExist() bool
	Error() string
}

type IPTablesRestore added in v0.19.0

type IPTablesRestore interface {
	// ApplyWithoutFlush apply without flush chains
	ApplyWithoutFlush(rules IPTablesRestoreRules) error
}

IPTablesRestore wrapper for iptables-restore

func NewIPTablesRestoreWithProtocol added in v0.19.0

func NewIPTablesRestoreWithProtocol(protocol iptables.Protocol) (IPTablesRestore, error)

NewIPTablesRestoreWithProtocol build new IPTablesRestore for supplied proto

type IPTablesRestoreRuleSpec added in v0.19.0

type IPTablesRestoreRuleSpec []string

IPTablesRestoreRuleSpec represents one rule spec delimited by space

type IPTablesRestoreRules added in v0.19.0

type IPTablesRestoreRules map[string][]IPTablesRestoreRuleSpec

IPTablesRestoreRules represents iptables-restore table block

type IPTablesRule added in v0.9.1

type IPTablesRule struct {
	// contains filtered or unexported fields
}

func ForwardRules added in v0.9.1

func ForwardRules(flannelNetwork string) []IPTablesRule

func MasqIP6Rules added in v0.15.0

func MasqIP6Rules(ipn ip.IP6Net, lease *subnet.Lease) []IPTablesRule

func MasqRules added in v0.9.1

func MasqRules(ipn ip.IP4Net, lease *subnet.Lease) []IPTablesRule

Jump to

Keyboard shortcuts

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