Replace Mystery Binary .pcap Fixtures in Git & CI/CD With .frasm
Every DPI, eBPF/XDP, service-mesh, or SIEM repository has a cursed tests/fixtures/ folder stuffed with binary .pcap blobs nobody can review in a pull request or update without breaking TCP sequence numbers.
The Catch
Binary .pcap files are miserable in Git: git diff just prints Binary files differ, security scanners flag unknown binary blobs, and changing a gRPC method name or SQL query string requires recapturing live microservices in Docker.
Checking in .frasm text files (text/vnd.frameassembly) gives pull-request reviewers line-by-line diffs while the rootless frameassembly CLI or Rust frameassembly crate compiles byte-identical .pcap / .pcapng fixtures in under 1 millisecond during CI.
Microservice & Telemetry Parser CI Suite (gRPC + PostgreSQL v3.0 + MQTT QoS 1)
Twenty-two deterministic frames exercise three complex binary/framed Layer 7 dissectors in a single CI fixture: (1) TCP 50051 handshake + http2 settings + grpc /ledger.Payments/Authorize (grpcstatus 0 OK followed by grpcstatus 14 UNAVAILABLE); (2) TCP 5432 handshake + postgres startup -> authok -> query -> errorresponse; and (3) TCP 1883 handshake + mqtt connect -> connack -> qos 1 retained publish -> puback.
Adapt It for Your Network
- Commit
.frasmspecs alongside your Suricata rules, Zeek scripts, eBPF parsers, or Wireshark Lua dissectors in Git. - Compile to
.pcapor nanosecond.pcapnginside CI via theframeassemblyCLI orcargo add --dev frameassembly. - When an existing binary fixture needs updating, run
frameassembly reverse legacy.pcap fixture.frasmonce and delete the opaque blob.
.frasm -> .pcap
Preview frames inline or open in Playground ->Compiles 22 multi-service frames (HTTP/2 + gRPC status trailers, PostgreSQL v3.0 wire frames, and OASIS MQTT QoS 1) with deterministic timestamps.
host app_gw { ip 10.90.1.10 }
host backend_sv { ip 10.90.2.50 }
flow grpc_mesh_fixture(c, s) {
// 1. HTTP/2 + gRPC call succeeding (0) and failing over (14 UNAVAILABLE) on TCP 50051
c -> s tcp syn srcport 55051 dstport 50051 win 65535 mss 1460 wait 1ms
c <- s tcp syn ack win 65535 mss 1460 wait 1ms
c -> s tcp ack wait 1ms
c -> s http2 settings wait 1ms
c -> s grpc service "ledger.Payments" method "Authorize" wait 2ms
c <- s grpc grpcstatus 0 wait 2ms
c -> s grpc service "ledger.Payments" method "Settle" wait 2ms
c <- s grpc grpcstatus 14 wait 3ms
}
flow postgres_and_mqtt_fixtures(c, s) {
// 2. PostgreSQL v3.0 Startup -> AuthOk -> SQL Query -> ErrorResponse on TCP 5432
c -> s tcp syn srcport 55432 dstport 5432 win 65535 mss 1460 wait 1ms
c <- s tcp syn ack win 65535 mss 1460 wait 1ms
c -> s tcp ack wait 1ms
c -> s postgres startup user "ci_runner" db "ledger" wait 1ms
c <- s postgres authok wait 1ms
c -> s postgres query sql "SELECT tx_id, amount_cents FROM transfers LIMIT 5;" wait 2ms
c <- s postgres errorresponse wait 3ms
// 3. OASIS MQTT v3.1.1 Connect -> ConnAck -> QoS 1 Publish -> PubAck on TCP 1883
c -> s tcp syn srcport 51883 dstport 1883 win 65535 mss 1460 wait 1ms
c <- s tcp syn ack win 65535 mss 1460 wait 1ms
c -> s tcp ack wait 1ms
c -> s mqtt connect clientid "ci-sensor-01" keepalive 30 wait 1ms
c <- s mqtt connack returncode 0 wait 1ms
c -> s mqtt publish topic "ci/line1/watts" qos 1 retain pktid 10 payload "{\"w\":412.5}" wait 1ms
c <- s mqtt puback pktid 10 wait 1ms
}
compile {
grpc_mesh_fixture(app_gw, backend_sv)
postgres_and_mqtt_fixtures(app_gw, backend_sv)
}# 1. Compile deterministic .pcapng in CI/CD (under 1ms, zero root privileges)
frameassembly cicd_parser_suite.frasm cicd_parser_suite.pcapng
# 2. Assert decoded gRPC, PostgreSQL, and MQTT fields in automated tshark / Zeek checks
tshark -r cicd_parser_suite.pcapng -Y "grpc || pgsql || mqtt"
# 3. Or convert legacy binary Git fixtures into reviewable .frasm source once
frameassembly reverse legacy_fixture.pcap readable_fixture.frasmKeep cicd_parser_suite.frasm in Git and build .pcap in under 1ms
Single rootless binary + VS Code extension with live squiggles, quick-fixes, and side-by-side packet ladders ready for Wireshark.
Related Examples
All 81 Protocols ->Edit & Sanitize a .pcap File Before Sending It to Vendor Support
vlan · radius · syslog
Verify IPv6 First-Hop Security (RA Guard, NDP, DHCPv6) & Dual-Stack
vlan · ndp · dhcp · dns
Poke Holes in a New Firewall Rulebase Before Live Traffic Does
vlan · tcp · tls · icmp