quick example to
- define a map from the eBPF program
- pin the map to a fs path (
/sys/fs/bpf/map_instruction
) from the handler program - read the pinned map from a C program using the
bpf
syscall
tested so far on linux, requires bpftool
(provided by bpf
in arch/community)
% clang test.c && sudo ./a.out
% sudo python test.py `pgrep a.out`