Skip to content

Add offline BMP capture decoder and release 0.6.1 - #17

Draft
nuclearcat wants to merge 6 commits into
mainfrom
feat/offline-bmp-decoder
Draft

nuclearcat wants to merge 6 commits into
mainfrom
feat/offline-bmp-decoder

Conversation

@nuclearcat

Copy link
Copy Markdown
Collaborator

Add netom-bmpdump, a standalone offline BMP/BGP/EVPN decoder for PCAP and PCAPNG captures. It reassembles TCP streams and prints filtered route records as readable text or JSON, including EVPN ARP/ND flags, PMSI ingress-replication endpoints, full UTC capture timestamps, and stable message references within frames.

Include the decoder in DEB/RPM packages and runtime images, add documentation and CI coverage, and bump the workspace version to 0.6.1. The six commits are based directly on main and contain no automatic BMP reconciliation changes.

Validation: all 30 decoder tests passed, including the full reference-capture regression; all six release metadata checks passed; git diff --check passed. Decoder source and packaging match the previously tested implementation. Full package/image builds were not rerun for this split.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 17:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It adds a large new ~3.7k-line protocol decoder plus release/packaging and Cargo.lock dependency changes whose built artifacts and release wiring warrant final human verification.

1 open issue
What changed in this PR

This PR introduces netom-bmpdump, a self-contained offline BMP/BGP/EVPN decoder for PCAP and PCAPNG captures, added as a new, isolated workspace member (tools/bmpdump) that does not link against the Netom daemon. It reassembles TCP streams, decodes BMP/BGP/EVPN messages, and renders them as readable/colorized text or newline-delimited JSON with filtering, summaries, and stable per-frame message ordinals. The PR also wires the new binary into DEB/RPM packaging, runtime images, man pages, docs, and CI, and bumps the workspace to release 0.6.1.

Changes:

  • New netom-bmpdump tool: capture parsing (capture.rs), TCP reassembly (stream.rs), protocol decoding (protocol.rs), rendering (display.rs), CLI (cli.rs/main.rs), with an extensive 30-test integration suite.
  • Packaging/CI integration: build all three binaries, cargo deb --package netom, RPM spec, smoke tests, and a dedicated CI test step; workspace members/default-members updated.
  • Release 0.6.1: version bumps in Cargo.toml/Cargo.lock, docs (README.md, docs/, man page), and Changelog.md.
File Description
tools/​bmpdump/​src/​capture.rs PCAP/PCAPNG parsing, link-type/IP/TCP extraction, timestamp resolution.
tools/​bmpdump/​src/​stream.rs TCP reassembly with wrap/overlap handling and BMP framing/limits.
tools/​bmpdump/​src/​protocol.rs BMP/BGP/EVPN message decoding and ADD-PATH negotiation.
tools/​bmpdump/​src/​display.rs Readable/colorized rendering, UTC timestamps, control-char escaping.
tools/​bmpdump/​src/​cli.rs Argument parsing, run loop, filters, summaries, diagnostics, exit codes.
tools/​bmpdump/​src/​main.rs Entry point with broken-pipe handling.
tools/​bmpdump/​src/​lib.rs Module declarations for the library crate.
tools/​bmpdump/​tests/​decoder.rs Comprehensive fixtures and CLI/decoder regression tests.
tools/​bmpdump/​Cargo.toml, README.md, rustfmt.toml New package manifest, readme, formatting config (edition 2024).
Cargo.toml, Cargo.lock Workspace members, 0.6.1 bump, deb assets, terminal_size + transitive lock updates.
pkg/​build-package.sh, rpm/​netom.spec, test-scripts/​*.sh Build/package/smoke-test the new binary and its man page/docs.
.github/​workflows/​ci.yml Added a netom-bmpdump test step.
doc/​netom-bmpdump.1, docs/​bmpdump.md, docs/​index.md, docs/​releases.md, README.md, TESTING.md, Changelog.md Documentation, man page, and 0.6.1 references.

Review effort: Balanced

Comment thread tools/bmpdump/src/cli.rs
let source: Box<dyn Read> = if args.read.as_os_str() == "-" {
Box::new(io::stdin())
} else {
Box::new(File::open(&args.read)?)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants