nftset_utils

package
v5.0.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerOpts

type HandlerOpts struct {
	Conn        *nftables.Conn // Required.
	TableFamily nftables.TableFamily
	TableName   string // Required
	SetName     string // Required
}

type NftSetHandler

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

NftSetHandler can add netip.Prefix to the corresponding set. The table that contains this set must be an inet family table. If the set has a 'interval' flag, the prefix from netip.Prefix will be applied.

func NewNtSetHandler

func NewNtSetHandler(opts HandlerOpts) *NftSetHandler

NewNtSetHandler inits NftSetHandler.

func (*NftSetHandler) AddElems

func (h *NftSetHandler) AddElems(es ...netip.Prefix) error

AddElems adds SetIPElem(s) to set in a single batch.

Jump to

Keyboard shortcuts

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