Add a higher level API for constructing eBPF programs
Opened this issue · 0 comments
oskardrums commented
Currently ebpf_kern
allows you to write eBPF programs, but it doesn't make it particularly easy or Erlang-y.
ebpf
should supply some higher level API for constructing eBPF programs.
I think that the best solution would be having a fun2bpf
parse-transform that takes a literal Erlang fun
and outputs a sequence of bpf_instruction
s, but there are a few steps to cross to get there.
For starters it would be nice to have ebpf_kern
functions for more common eBPF routines, like loading a value from a map to a specific register, or branching without having to count instructions for the jmp
instruction.