Lowers a structured %MaeBPF.IR.Module{} (built-in MaeBPF.Plugs.*,
MaeBPFC.Plugs.TLSSNI, global/3, c_preamble/1, and ~BPFC"""..."""
inline C blocks) into clean, warning-free C CO-RE eBPF source.
Supports two header modes via header_mode::
:vmlinux-#include "vmlinux.h",<bpf/bpf_helpers.h>, and<bpf/bpf_endian.h>for full Linux CO-RE compilation.:standalone- self-contained portable BPF UAPI types, map macros, helper declarations, andbpf_iter_numksym externs soclang -target bpfcompiles valid LinuxEM_BPFELF64 + BTF objects even on macOS or minimal Linux hosts withoutvmlinux.h/libbpf-dev.
Summary
Functions
Generates C eBPF source code for a normalized %MaeBPF.IR.Module{}.
Functions
@spec generate(MaeBPF.IR.Module.t(), keyword()) :: {:ok, String.t()}
Generates C eBPF source code for a normalized %MaeBPF.IR.Module{}.
Options:
:header_mode-:vmlinuxor:standalone(default:standalone):includes- extra header strings emitted as#include "..."or#include <...>:debug_trace- emit per-plug debug RingBuf events (defaultfalse)