Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetNewDriverFn ¶
Types ¶
type Chain ¶
type Chain struct { Name string Policy ChainPolicy }
Supported policy values are accept (which is the default) or drop.
type ChainIPHook ¶
type ChainIPHook struct { Name string Type ChainType Hook ChainHook Priority ChainPriority Policy ChainPolicy JumpRule *Rule }
type ChainPolicy ¶
type ChainPolicy uint32
const ( ChainPolicyAccept ChainPolicy = iota ChainPolicyDrop )
func (ChainPolicy) String ¶
func (c ChainPolicy) String() string
type ChainPriority ¶
type ChainPriority uint32
const ( ChainPriorityFirst ChainPriority = iota ChainPriorityLast )
func (ChainPriority) String ¶
func (c ChainPriority) String() string
type Driver ¶
type Driver interface { // Chains ChainExists(table TableType, chain string) (bool, error) CreateIPHookChainIfNotExists(chain *ChainIPHook) error CreateChainIfNotExists(table TableType, chain *Chain) error DeleteIPHookChain(chain *ChainIPHook) error DeleteChain(table TableType, chain string) error ClearChain(table TableType, chain string) error // rules Delete(table TableType, chain string, rule *Rule) error AppendUnique(table TableType, chain string, rule *Rule) error List(table TableType, chain string) ([]*Rule, error) Append(table TableType, chain string, rule *Rule) error Insert(table TableType, chain string, pos int, rule *Rule) error // named Sets. NewNamedSet(set *SetInfo) NamedSet DestroySets(nameFilter func(string) bool) error }
type Interface ¶
type MssClampType ¶
type MssClampType uint32
const ( UndefinedMSS MssClampType = iota ToPMTU ToValue )
func (MssClampType) String ¶
func (m MssClampType) String() string
type Rule ¶
type RuleAction ¶
type RuleAction uint32
const ( RuleActionJump RuleAction = iota RuleActionAccept RuleActionMss RuleActionMark RuleActionSNAT RuleActionDNAT )
func (RuleAction) String ¶
func (r RuleAction) String() string
type SetInfo ¶
type SetInfo struct { // Name is the set name. Name string // SetType specifies the named type. SetType string // nftables named set attached to tables. Table TableType // SetFamily specifies the protocol family of the IP addresses to be stored in the set. // The default is IPv4. Family SetFamily }
named set.
Click to show internal directories.
Click to hide internal directories.