Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

About

PcapNgPlusPlus is a modern C++14 implementation of a pcapng reader and writer, intended to replace LightPcapNg in PcapPlusPlus. It supports reading, writing and appending pcapng files, including zstd-compressed files.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

PcapNgPlusPlus

Coverage

PcapNgPlusPlus is a modern C++14 implementation of a pcapng reader and writer, intended to replace LightPcapNg in PcapPlusPlus. It reads, writes and appends pcapng files, including zstd-compressed ones.

Status: early development (milestone M1). Nothing here is usable as a library yet. See docs/PLAN.md for the plan and progress.

Why a rewrite

LightPcapNg is written in C and has accumulated bugs, edge cases and local patches in PcapPlusPlus. A rewrite is only safe if it provably behaves the same, so this project builds the test suite first and the new implementation second.

What's in this repo

Path What
legacy/ A read-only copy of LightPcapNg as patched by PcapPlusPlus, pinned to a PcapPlusPlus commit. It is the reference implementation.
src/, include/ The new C++14 implementation.
conformance/ A test suite that runs both implementations on the same inputs and compares the results.
bench/, fuzz/ Benchmarks and a differential fuzzer covering both implementations.

How conformance is checked

  • Inputs: a corpus generated from the pcapng spec (every block type and option, with malformed variants), real-world captures, and files found by fuzzing.
  • Oracle: golden outputs recorded from the legacy implementation. The new implementation must match them, except for intentional fixes listed in conformance/divergences.yaml.
  • Memory: no leaks or sanitizer reports, and peak memory within a tolerance of legacy's, on each of 9 platforms.
  • Performance: throughput within a tolerance of legacy's on every benchmark, on each of 9 platforms.

Details are in docs/PLAN.md.

Building

cmake -S . -B build          # add -DLIGHT_PCAPNG_ZSTD=ON for zstd support
cmake --build build

Only the legacy LightPcapNg library builds for now.

Contributing

Read AGENTS.md before contributing. It covers the repo rules (for example, legacy/ and golden files are never edited by hand) and the coding conventions, which follow PcapPlusPlus.

License

MIT. See LICENSE. The copy of LightPcapNg in legacy/ keeps its original license.

About

PcapNgPlusPlus is a modern C++14 implementation of a pcapng reader and writer, intended to replace LightPcapNg in PcapPlusPlus. It supports reading, writing and appending pcapng files, including zstd-compressed files.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages