How bogdann29/dpdkcap works
Project type and purpose
• DPDKCap is a high-speed packet capture tool built on top of DPDK (Data Plane Development Kit).
• It leverages multi-port, multi-core CPU parallelism and on-the-fly LZO compression to record network traffic into PCAP files.
• This is an open-source network utility rather than a web app or microservice. It operates entirely at the OS/hardware interface level.
File structure
• Top-level:
• Makefile, .travis.yml, Doxyfile, LICENSE, README.md – project build, CI, docs, and licensing.
• src/ – all C source and headers.
• src/ contains modules by functional area:
• core_capture.* – logic to grab packets from DPDK RX queues.
• core_write.* – logic to dequeue packets, compress (LZO), and write PCAP.
• pcap.*, parse.*, parser.* – building and parsing PCAP headers.
• lzo/minilzo/ – LZO compression library.
• crc32.*, sha256.* – checksum routines for PCAP integrity.
• hash_map.* – internal data structures (e.g., statistics, port mapping).
• numa.* – NUMA‐aware memory allocation.
• timestamp.*, statistics.* – time-stamping and runtime statistics.
• utils.* – common helpers (configuration parsing, ring buffers).
• tasks.* – assignment of capture vs write tasks to lcores.
• net_headers.h – definitions of Ethernet/IP/TCP/UDP headers.
• No “frontend” or “backend” folders – rather a pipeline of DPDK initialization → capture tasks → write tasks → output files.
README for additional insights
• Describes use of DPDK EAL arguments, huge pages, port binding.
• Explains two task types: capturing cores enqueue packets into a main buffer; writing cores dequeue, compress, write.
• Mentions core allocation options (-c, -w), file rotation, compression toggle, rx_desc, mbufs tuning.
Elements
• Clear labels for each component (e.g., “Capture Core #0”, “Ring Buffer”, “Write Core #1”).
• Packet flow from NIC → capture cores → ring → write cores → disk.
• Control and stats flow from cores to logging module.
• Blue for Capture tasks.
• Orange for Write tasks + Compression module.
• Gray for Utilities (checksum, parser, NUMA).