Documentation
¶
Overview ¶
Package contains information about network devices for Cilium datapath. +groupName=maps
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cell = cell.Module( "netdev-map", "eBPF map contains information about network devices for Cilium datapath", cell.Provide(newMap), NetDevMapSyncCell, )
Cell initializes and manages the network devices map.
View Source
var NetDevMapSyncCell = cell.Module( "netdev-map-sync", "Synchronizes network devices state into the cilium_devices BPF map", cell.Invoke(registerNetDevMapSync), )
NetDevMapSyncCell keeps the cilium_devices map in sync with the selected devices.
Functions ¶
This section is empty.
Types ¶
type DeviceState ¶
type DeviceState struct {
MAC types.MACAddr `align:"mac"`
L3 DeviceStateL3 `align:"l3"`
// contains filtered or unexported fields
}
DeviceState matches struct device_state in bpf/lib/network_device.h.
func NewDeviceState ¶
func NewDeviceState(mac net.HardwareAddr) DeviceState
func (*DeviceState) IsL3 ¶
func (s *DeviceState) IsL3() bool
func (*DeviceState) New ¶
func (s *DeviceState) New() bpf.MapValue
func (*DeviceState) SetL3 ¶
func (s *DeviceState) SetL3(enabled bool)
func (*DeviceState) String ¶
func (s *DeviceState) String() string
type IterateCallback ¶
type IterateCallback func(*Index, *DeviceState)
IterateCallback represents the signature of the callback used for iteration.
type Map ¶
type Map interface {
Upsert(ifindex uint32, state DeviceState) error
Lookup(ifindex uint32) (*DeviceState, error)
IterateWithCallback(cb IterateCallback) error
Clear(ifindex uint32) error
}
Map provides access to the eBPF map cilium_devices.
Click to show internal directories.
Click to hide internal directories.