nftset_utils

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NtSetHandler

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

NtSetHandler can add SetIPElem to corresponding set. The table that contains this set must be an inet family table. If the set has a 'interval' flag, the SetIPElem.Mask will be applied.

func NewNtSetHandler

func NewNtSetHandler(family nftables.TableFamily, tableName, setName string) *NtSetHandler

NewNtSetHandler inits NtSetHandler.

func (*NtSetHandler) AddElems

func (h *NtSetHandler) AddElems(es []*SetIPElem) error

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

type SetIPElem

type SetIPElem struct {
	// An ipv4 IP must be a 4-byte address.
	// An ipv6 IP must be a 16-byte address.
	IP   net.IP
	Mask int
}

func (*SetIPElem) String

func (s *SetIPElem) String() string

Jump to

Keyboard shortcuts

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