ebpf

package
v1.0.0-pre2 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: GPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MapMaxEntries = 1024
	KprobedFunc   = "inode_permission"
)

Variables

View Source
var (
	RingbuffReader *ringbuf.Reader = nil
	Objs           bpfObjects      = bpfObjects{}
	Kprobe         link.Link       = nil
	Loaded         bool            = false
)

Functions

func AddInode

func AddInode(mapKey BpfMapKey) error

* Add an entry to the map

func LoadEbpf

func LoadEbpf(ctx context.Context) error

* Loads the eBPF objects, the eBPF program and opens the ring * buffer.

func ReadAlert

func ReadAlert(ctx context.Context, cli client.Reader) (kivev2alpha1.KiveAlert, error)

func ReadEbpfData

func ReadEbpfData() (bpfLogData, error)

* Read the data from the Ringbuffer, hangs until data is received or * returns an error. This function can be used without a running * kubernetes cluster.

func RemoveInode

func RemoveInode(mapKey BpfMapKey) error

* Remove an entry from the map

func UnloadEbpf

func UnloadEbpf(ctx context.Context) error

* Unload the eBPF program, objects and ringbuffer.

Types

type BpfMapKey

type BpfMapKey = bpfMapKey

Jump to

Keyboard shortcuts

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