Expand description
Basic eBPF helper functions module.
Modules§
- consts
- Helper function IDs for BPF programs.
Functions§
- bpf_
ktime_ get_ ns - Get the current kernel time in nanoseconds.
- bpf_
probe_ read - For tracing programs, safely attempt to read size bytes from kernel space address unsafe_ptr and store the data in dst.
- init_
helper_ functions - Initialize the helper functions map.
- map_
delete_ elem - Delete entry with key from map.
- map_
for_ each_ elem - Do some action for each element in map.
- map_
lookup_ elem - Lookup an element in map.
- map_
lookup_ percpu_ elem - Lookup an element in percpu map.
- map_
peek_ elem - Get an element from map without removing it.
- map_
pop_ elem - Pop an element from map.
- map_
push_ elem - Push an element value in map.
- map_
update_ elem - Update entry with key in map.
- perf_
event_ output - Output data to a perf event.
- printf⚠
- Printf according to the format string, function will return the number of bytes written(including ‘\0’)
- probe_
read_ user_ str - Copy a NULL terminated string from an unsafe user address unsafe_ptr to dst.
- raw_
map_ delete_ elem - Delete entry with key from map.
- raw_
map_ for_ each_ elem - For each element in map, call callback_fn function with map, callback_ctx and other map-specific parameters. The callback_fn should be a static function and the callback_ctx should be a pointer to the stack. The flags is used to control certain aspects of the helper. Currently, the flags must be 0.
- raw_
map_ lookup_ elem - See https://ebpf-docs.dylanreimerink.nl/linux/helper-function/bpf_map_lookup_elem/
- raw_
map_ lookup_ percpu_ elem - Perform a lookup in percpu map for an entry associated to key on cpu.
- raw_
map_ peek_ elem - Get an element from map without removing it.
- raw_
map_ pop_ elem - Pop an element from map.
- raw_
map_ push_ elem - Push an element value in map.
- raw_
map_ update_ elem - Update entry with key in map.
- raw_
perf_ event_ output - See https://ebpf-docs.dylanreimerink.nl/linux/helper-function/bpf_perf_event_output/
- trace_
printf - See https://ebpf-docs.dylanreimerink.nl/linux/helper-function/bpf_trace_printk/
Type Aliases§
- RawBPF
Helper Fn - Type alias for a raw BPF helper function.