userdata

package
v0.0.0-...-ec9672c Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package userdata implements a TLV parser/serializer for libnftables-compatible comments

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(udata []byte, typ Type, data []byte) []byte

func AppendString

func AppendString(udata []byte, typ Type, str string) []byte

func AppendUint32

func AppendUint32(udata []byte, typ Type, num uint32) []byte

func Get

func Get(udata []byte, styp Type) []byte

func GetString

func GetString(udata []byte, typ Type) (string, bool)

func GetUint32

func GetUint32(udata []byte, typ Type) (uint32, bool)

Types

type Type

type Type byte
const (
	TypeComment Type = iota
	TypeEbtablesPolicy

	TypesCount
)

TLV type values are defined in: https://git.netfilter.org/iptables/tree/iptables/nft.c?id=73611d5582e72367a698faf1b5301c836e981465#n1659

Jump to

Keyboard shortcuts

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