Open source, Apache-2.0
Binary messages off the wire, decoded, for those you authorise
first-bite listens on a tap or a mirror port, local or tunnelled (ERSPAN/GRE), decodes fixed-layout binary messages against a dictionary, and publishes each one as a record of typed values for the consumers its owner allows. It never transmits on the capture interface, and one core handles 450,000 packets per second.
Interactive decoder Read the documentation Technical brief (PDF)
Measured on one core
- 0.47 µsto decode one message: identify it, extract every field, render the values
- 450,000 / spackets through the whole pipeline, from frame read to record published
- 0.2%of one core for a link carrying 1,000 messages per second
- 500 of 500packets decoded in live capture on two interfaces at once, none dropped
- 10.9 MBresident memory while replaying a 145 MB capture
- 14.67 MBthe portable build of
mind: one file that needs only glibc
AMD Ryzen 7 8845HS, release build of the 1.1.0 code, 2026-11-15, the machine also running other work. The command behind each figure.
It listens, and takes nothing from the link
first-bite opens the capture interface for reading and never sends on it. On a passive tap there is no path from the monitor ports back to the link, so nothing first-bite does can delay, block or alter the traffic between the native systems, and if it stops, the link is unaffected.
Where a tap cannot be fitted, a switch mirror port gives the same copy: forwarding is not affected, but the switch does the copying and drops mirrored frames first when it is busy. A remote mirror sends the copy in an ERSPAN, GRE or VXLAN tunnel to first-bite on another host, which unwraps it; that adds the mirrored traffic to the network carrying the tunnel. It was built to open up the traffic of a tactical local network that until then was visible only to the systems exchanging it.
The message set is data, not code
A dictionary is a directory of JSON files that gives the bit range, type and value labels of every field. The same binary decodes a weather station's UDP reports, the frames on a vehicle CAN bus or a message set of your own, and bite check validates a dictionary and runs the test vectors it carries.
Observation test vector, field by field. Paste your own bytes into the interactive decoder, or read the dictionary format.One core is far more than a link needs
The whole pipeline (read a frame, parse Ethernet, IP and UDP, decode, build the record, publish) takes 2.2 µs per packet. A link carrying 1,000 messages per second therefore uses about 0.2% of one core, and a record is on the bus about two microseconds after its frame is read.
The project's first decoder managed 194 messages per second. Its rewrite decoded 1,700,000 on the same recorded messages, and also decodes the fields the first returned as null.
One decode, as many consumers as you allow
Without a tap, each consumer of a binary interface writes its own parser and holds its own connection to the native system. With first-bite the decode happens once: consumers on the host subscribe to a ZeroMQ socket and read records, as JSON or CBOR, or read what a sink wrote to S3-compatible storage, Azure Blob, an HTTP endpoint, a Zenoh data fabric or a file. A transform emits Cursor-on-Target. The owner decides who reads: the record socket binds loopback by default, no sink runs unless it is configured, and HTTPS and storage endpoints are reached over TLS with the certificate checked.
Where it runs, and what it reads
One process, mind, from one archive per platform with nothing to install on the target. The standard Linux build (glibc 2.31 or later) and the fully static one are built and run on x86-64; the 64-bit Arm Linux, macOS and Windows archives are built in CI; not run locally. The same decoder reads CAN-style frames; a SocketCAN capture source is designed, not built.
Try it in five minutes
Needs a Rust toolchain, a C/C++ compiler, CMake and the libpcap headers.
git clone https://github.com/USAREUR-AF/first-bite && cd first-bite
make build
# Validate a dictionary and run its test vectors.
cargo run -p bite -- check dictionaries/weather-station
# Decode one payload by hand.
cargo run -p bite -- decode dictionaries/weather-station --port 40100 \
0200174b583700fb2e18bcda9b4236000004030201beef
# Replay a capture file through the whole pipeline.
cargo run -p mind -- --pcap-file examples/weather-station.pcap \
--dictionary dictionaries/weather-station --output
To decode traffic your own network already carries, capture the Network Time Protocol with the ntp dictionary: sudo ./target/debug/mind eth0 --dictionary dictionaries/ntp --filter "udp port 123".