ifstate

package
v0.0.0-...-21cfbab Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeySize    = 4
	ValueSize  = 4 + 16
	MaxEntries = 1000
)
View Source
const (
	FlgWEP   = uint32(0x1)
	FlgReady = uint32(0x2)
)

Variables

View Source
var MapParams = maps.MapParameters{
	Type:         "hash",
	KeySize:      KeySize,
	ValueSize:    ValueSize,
	MaxEntries:   MaxEntries,
	Name:         "cali_iface",
	Flags:        unix.BPF_F_NO_PREALLOC,
	Version:      2,
	UpdatedByBPF: false,
}

Functions

func Map

func Map() maps.Map

func MapMemIter

func MapMemIter(m MapMem) func(k, v []byte)

func SetMapSize

func SetMapSize(size int)

Types

type Key

type Key [4]byte

func KeyFromBytes

func KeyFromBytes(b []byte) Key

func NewKey

func NewKey(ifIndex uint32) Key

func (Key) AsBytes

func (k Key) AsBytes() []byte

func (Key) IfIndex

func (k Key) IfIndex() uint32

type MapMem

type MapMem map[Key]Value

type Value

type Value [4 + 16]byte

func NewValue

func NewValue(flags uint32, name string) Value

func ValueFromBytes

func ValueFromBytes(b []byte) Value

func (Value) AsBytes

func (v Value) AsBytes() []byte

func (Value) Flags

func (v Value) Flags() uint32

func (Value) IfName

func (v Value) IfName() string

func (Value) String

func (v Value) String() string

Jump to

Keyboard shortcuts

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