Pure-Elixir macOS and Linux simulator for MaeBPF.IR pipelines.
Executes the exact fused IR operations generated by use MaeBPF or
MaeBPF.compile_pipeline/2 without requiring Linux or root privileges,
returning the packet verdict, per-plug execution trace, updated map states,
RingBuf event streams, and hidden ringbuf_drops counts.
Summary
Functions
Simulates a single packet (or tracepoint event) through hook hook_name of
module_or_ir.
Functions
Simulates a single packet (or tracepoint event) through hook hook_name of
module_or_ir.
state options:
:maps- initial map contents (%{map_id => ...})::ringbuf- initial emitted 16-byte binary events per stream (%{stream => [...]}):ringbuf_capacity- simulated max queued events per stream (%{stream => non_neg_integer()}or integer default for all streams). When full, emitting increments bothdrops[stream]and the hidden"__maebpf_rb_drops_<stream>"map slot0.:drops- initial drop counts per stream (%{stream => count}):sample_seq- sampling counter state persisted across multi-packet runs:debug_trace- whentrue, runs with per-plug debug RingBuf emission into:__maebpf_debug_rb(honoring optional:debug_sample/:sample)
Returns:
%{
action: :drop | :pass | :tx | :redirect | :aborted | :next | :ok,
trace: [{plug_module, :cont | {:halt, action}}],
maps: %{map_id => term()},
ringbuf: %{stream_id => [binary()]},
events: %{stream_id => [map()]},
drops: %{stream_id => non_neg_integer()},
sample_seq: map()
}