Documentation ¶
Index ¶
- func IsSupported() bool
- func LineParser(i uint, t string) (rowInfo cmdutils.RowInfo, err error)
- func ResetCheck()
- type Base
- func (a *Base) ClearSet(table, set string) (err error)
- func (a *Base) DeleteElementInSet(table, set, element string) (err error)
- func (a *Base) DeleteElementInSetByHandleID(table, set string, handleID uint64) (err error)
- func (a *Base) DeleteRuleByHandleID(table, chain string, handleID uint64) (err error)
- func (a *Base) DeleteSet(table, set string) (err error)
- func (a *Base) FindPositionByID(table, chain string, id uint) (uint, error)
- func (a *Base) ListChainRules(table, chain string, startOffset, limit uint) (rows []cmdutils.RowInfo, hasMore bool, offset uint, err error)
- func (a *Base) ListSets(table, set string, startOffset, limit uint) (rows []cmdutils.RowInfo, hasMore bool, offset uint, err error)
- func (a *Base) NewRuleTarget(table, chain string) (ruleutils.RuleTarget, error)
- func (a *Base) Unban(ipAddresses ...string) error
- type NFTables
- func (a *NFTables) AddDefault() error
- func (a *NFTables) Append(rules ...driver.Rule) (err error)
- func (a *NFTables) AsWhitelist(tableName, chainName string) error
- func (a *NFTables) Ban(ips []string, expires time.Duration) error
- func (a *NFTables) Base() *Base
- func (a *NFTables) Clear() error
- func (a *NFTables) ClearSet(table, set string) error
- func (a *NFTables) Delete(rules ...driver.Rule) (err error)
- func (a *NFTables) DeleteByHandleID(rules ...driver.Rule) (err error)
- func (a *NFTables) DeleteElementInSet(table, set, element string) error
- func (a *NFTables) Enabled(on bool) error
- func (a *NFTables) Exists(rule driver.Rule) (bool, error)
- func (a *NFTables) Export(wfwFile string) error
- func (a *NFTables) FindPositionByID(table, chain string, id uint) (uint, error)
- func (a *NFTables) Import(wfwFile string) error
- func (a *NFTables) Insert(rules ...driver.Rule) (err error)
- func (a *NFTables) Reset() error
- func (a *NFTables) Unban(ips ...string) error
- func (a *NFTables) Update(rule driver.Rule) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSupported ¶
func IsSupported() bool
func ResetCheck ¶
func ResetCheck()
Types ¶
type Base ¶ added in v1.3.5
type Base struct { TableFamily nftables.TableFamily *biz.NFTables // contains filtered or unexported fields }
documention: https://wiki.nftables.org/wiki-nftables/index.php/Simple_rule_management
func (*Base) DeleteElementInSet ¶ added in v1.3.5
func (*Base) DeleteElementInSetByHandleID ¶ added in v1.3.5
func (*Base) DeleteRuleByHandleID ¶ added in v1.3.5
func (*Base) FindPositionByID ¶ added in v1.3.5
func (*Base) ListChainRules ¶ added in v1.3.5
func (*Base) NewRuleTarget ¶ added in v1.3.5
func (a *Base) NewRuleTarget(table, chain string) (ruleutils.RuleTarget, error)
type NFTables ¶
type NFTables struct {
// contains filtered or unexported fields
}
func (*NFTables) AddDefault ¶ added in v1.4.7
func (*NFTables) AsWhitelist ¶
func (*NFTables) DeleteByHandleID ¶
func (*NFTables) DeleteElementInSet ¶
func (*NFTables) FindPositionByID ¶ added in v1.3.5
Click to show internal directories.
Click to hide internal directories.