ifstate

package
v1.11.0-cni-plu...-aa3fb74 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeySize    = 4
	ValueSize  = 4 + 16 + 3*4 + 3*4 + 2*4
	MaxEntries = 1000
)
View Source
const (
	FlgWEP       = uint32(0x1)
	FlgIPv4Ready = uint32(0x2)
	FlgIPv6Ready = uint32(0x4)
	FlgHEP       = uint32(0x8)
	FlgBond      = uint32(0x10)
	FlgBondSlave = uint32(0x20)
	FlgVxlan     = uint32(0x40)
	FlgIPIP      = uint32(0x80)
	FlgWireguard = uint32(0x100)
	FlgL3        = uint32(0x200)
	FlgMax       = uint32(0x3ff)
)

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:      4,
	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

func (Key) String

func (k Key) String() string

type MapMem

type MapMem map[Key]Value

type Value

type Value [ValueSize]byte

func NewValue

func NewValue(
	flags uint32,
	name string,
	xdpPolIPv4,
	ingressPolIPv4,
	egressPolIPv4,
	xdpPolIPv6,
	ingressPolIPv6,
	egressPolIPv6,
	tcIngressFilter,
	tcEgressFilter int,
) Value

func ValueFromBytes

func ValueFromBytes(b []byte) Value

func (Value) AsBytes

func (v Value) AsBytes() []byte

func (Value) EgressPolicyV4

func (v Value) EgressPolicyV4() int

func (Value) EgressPolicyV6

func (v Value) EgressPolicyV6() int

func (Value) Flags

func (v Value) Flags() uint32

func (Value) IfName

func (v Value) IfName() string

func (Value) IngressPolicyV4

func (v Value) IngressPolicyV4() int

func (Value) IngressPolicyV6

func (v Value) IngressPolicyV6() int

func (Value) String

func (v Value) String() string

func (Value) TcEgressFilter

func (v Value) TcEgressFilter() int

func (Value) TcIngressFilter

func (v Value) TcIngressFilter() int

func (Value) XDPPolicyV4

func (v Value) XDPPolicyV4() int

func (Value) XDPPolicyV6

func (v Value) XDPPolicyV6() int

Jump to

Keyboard shortcuts

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