nft

package
v1.1.0-alpha-4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NFT = iota
	TABLE
	CHAIN

	FamilyIP     = Family("ip")
	FamilyIP6    = Family("ip6")
	FamilyNET    = Family("net")
	FamilyARP    = Family("arp")
	FamilyBridge = Family("bridge")

	TypeSkipCreate = Type("")
	TypeNAT        = Type("nat")
	TypeFilter     = Type("filter")
)

Variables

This section is empty.

Functions

func Apply

func Apply(nft Nft) error

func ApplyFromFile

func ApplyFromFile(cfg string) error

func Drop

func Drop(table, chain string, handle int) error

func DropRules

func DropRules(nft Nft) error

Types

type Chain

type Chain struct {
	Type     Type
	Hook     string
	Priority int
	Policy   string
	Rules    []Rule
}

type Chains

type Chains map[string]Chain

type Family

type Family string

type Nft

type Nft map[string]Table

func Get

func Get() (Nft, error)

func Parse

func Parse(config string) (Nft, error)

func (Nft) MarshalText

func (n Nft) MarshalText() ([]byte, error)

type Rule

type Rule struct {
	Handle int
	Body   string
}

type Table

type Table struct {
	Family Family
	Chains Chains
}

type Type

type Type string

Jump to

Keyboard shortcuts

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