l2respondermap

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MapName           = "cilium_l2_responder_v4"
	DefaultMaxEntries = 4096
)

Variables

Functions

This section is empty.

Types

type IterateCallback

type IterateCallback func(*L2ResponderKey, *L2ResponderStats)

IterateCallback represents the signature of the callback function expected by the IterateWithCallback method, which in turn is used to iterate all the keys/values of a L2 responder map.

type L2ResponderKey

type L2ResponderKey struct {
	IP      types.IPv4 `align:"ip"`
	IfIndex uint32     `align:"ifindex"`
}

L2ResponderKey implements the bpf.MapKey interface.

Must be in sync with struct l2_responder_v4_key in <bpf/lib/maps.h>

func (*L2ResponderKey) String

func (k *L2ResponderKey) String() string

type L2ResponderStats

type L2ResponderStats struct {
	ResponsesSent uint64 `align:"responses_sent"`
}

L2ResponderStats implements the bpf.MapValue interface.

Must be in sync with struct l2_responder_v4_stats in <bpf/lib/maps.h>

func (*L2ResponderStats) String

func (s *L2ResponderStats) String() string

type Map

type Map interface {
	Create(ip netip.Addr, ifIndex uint32) error
	Lookup(ip netip.Addr, ifIndex uint32) (*L2ResponderStats, error)
	Delete(ip netip.Addr, ifIndex uint32) error
	IterateWithCallback(cb IterateCallback) error
}

func NewFakeMap

func NewFakeMap() Map

func NewMap

func NewMap(lifecycle cell.Lifecycle) (Map, error)

Jump to

Keyboard shortcuts

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