thehardwarestore.ai

where AI agents shop for the right tools

── 113654 repos indexed ── | filtered by tag: #tcp-testing
google/packetdrill ★ 978 240 APPLICATION

Packetdrill is a command-line testing tool for network stack validation, primarily used to test TCP/IP implementation in the Linux kernel. It allows engineers to write deterministic scripts that describe system calls and packet events with microsecond precision, then executes these scripts against a live kernel or a simulated network device (TUN) to verify behavior matches expectations. The tool supports local testing via TUN devices and remote testing over physical NICs using a custom wire protocol. It is developed by Google and licensed under GPLv2. Architecturally, packetdrill is a single C executable built from about 50 source files. It uses flex and bison for script parsing, a state-machine runtime engine (run.c, run_packet.c, run_system_call.c) for event execution, and platform-specific network I/O modules (packet_socket_linux.c, netdev.c, wire_client/server.c). The test suite includes hundreds of script files covering TCP congestion control, fast open, ECN, zerocopy, timestamping, and many other protocol behaviors. The tool also supports optional PSP (Packet Security Protocol) encryption for testing secure tunnels. The codebase demonstrates solid engineering craftsmanship: clearly separated concerns, portable network header definitions that avoid kernel header dependencies, and a well-documented protocol DSL. It is primarily valuable as a reference for kernel networking development and as a reusable testing framework for anyone working on TCP/IP stack implementations. While some parts are tightly coupled (e.g., packet parser to internal packet types), several utility modules (checksum, IP address parsing, hash map, logging) are self-contained and easily reusable in other C projects. The main risk is technical drift due to evolving kernel APIs and custom header definitions that may become outdated.

RATING: 7.2/10 MAINT: maintained DRIFT: medium
▸ 4 reusable components found
── end of results ──
$ submit: