How lerboe/beeper works
Beeper is a Rust library that configures application-layer parsers and installs them into eBPF programs, where messages can be parsed and selected fields extracted in-kernel. The main workflow is to configure captures, attach a parser to a target BPF program, then use its parse and extraction stubs on traffic. HTTP/1 and HTTP/2 are documented as supported; RESP2 is work in progress. The graph includes DFA construction and protocol-specific parsing; sampled source does not establish the internals of the example monitor or all RESP2 behavior.
Main entry points: http2/parser.rs HTTP/2 Configuration · http1/parser.rs HTTP/1 Configuration · resp2/parser.rs RESP2 Parser · http2.h HTTP/2 BPF Interface
Components 20
Parser Configuration
- Beeper API
beeper/src/lib.rs - DFA Builder
beeper/src/dfa.rs - BPF Base Contract
beeper/include/beeper/beeper.h - HTTP Parse Contract
beeper/include/beeper/http.h
HTTP/1 Parsing
- HTTP/1 Configuration
beeper/src/http1/parser.rs - HTTP/1 Actions
beeper/src/http1/action.rs - HTTP/1 Kernel Parser
beeper/src/http1/parser.bpf.c - HTTP/1 BPF Interface
beeper/include/beeper/http1.h
HTTP/2 Parsing
- HTTP/2 Configuration
beeper/src/http2/parser.rs - HTTP/2 Actions
beeper/src/http2/action.rs - HPACK Handling
beeper/src/http2/hpack.rs - HTTP/2 Kernel Parser
beeper/src/http2/parser.bpf.c - HTTP/2 BPF Interface
beeper/include/beeper/http2.h
RESP2 Parsing
- RESP2 Parser
beeper/src/resp2/parser.rs - RESP2 Kernel Parser
beeper/src/resp2/parser.bpf.c - RESP2 BPF Interface
beeper/include/beeper/resp2.h
Other components
- Application Developer
- Target eBPF Program
- Application Traffic
- Example Monitor
example/src/monitor.bpf.c
Connections 27
- Application Developer → Beeper API: configures captures
README.md - Beeper API → DFA Builder: builds patterns
beeper/src/lib.rs - Application Developer → HTTP/1 Configuration: selects protocol
- Application Developer → HTTP/2 Configuration: selects protocol
README.md - HTTP/1 Configuration → DFA Builder: constructs transitions
beeper/src/http1/parser.rs - HTTP/1 Configuration → HTTP/1 Actions: uses actions
beeper/src/http1/mod.rs - HTTP/1 Configuration → HTTP/1 Kernel Parser: attaches parser
README.md - HTTP/1 Kernel Parser → HTTP/1 BPF Interface: implements stubs
beeper/src/http1/parser.bpf.c - HTTP/1 BPF Interface → HTTP Parse Contract: includes contract
beeper/include/beeper/http1.h - HTTP Parse Contract → BPF Base Contract: includes base
beeper/include/beeper/http.h - HTTP/2 Configuration → DFA Builder: constructs transitions
beeper/src/http2/parser.rs - HTTP/2 Configuration → HTTP/2 Actions: uses actions
beeper/src/http2/mod.rs - HTTP/2 Configuration → HPACK Handling: uses HPACK
beeper/src/http2/parser.rs - HTTP/2 Configuration → HTTP/2 Kernel Parser: attaches parser
README.md - HTTP/2 Kernel Parser → HTTP/2 BPF Interface: implements stubs
beeper/src/http2/parser.bpf.c - HTTP/2 BPF Interface → HTTP Parse Contract: includes contract
beeper/include/beeper/http2.h - HTTP/2 BPF Interface → BPF Base Contract: includes base
- Application Developer → RESP2 Parser: selects protocol
- RESP2 Parser → DFA Builder: constructs transitions
- RESP2 Parser → RESP2 Kernel Parser: attaches parser
- RESP2 Kernel Parser → RESP2 BPF Interface: uses interface
- Target eBPF Program → Application Traffic: processes messages
- HTTP/2 Configuration → Target eBPF Program: attaches to
README.md - HTTP/1 Configuration → Target eBPF Program: attaches to
- RESP2 Parser → Target eBPF Program: attaches to
- Example Monitor → HTTP/1 BPF Interface: uses interface
- Example Monitor → HTTP/2 BPF Interface: uses interface