pcapng files from collected events using the pcap subcommand, enabling analysis with standard tools like Wireshark, tshark, and tcpdump.
Basic Usage
Generate a pcapng file from all collected events:Probe Filtering
Retis supports two modes for generating PCAP files:Filter by Specific Probe
Generate a capture containing only packets seen at a particular probe:The interface information in the resulting PCAP file indicates the probe where each packet was captured.
All Probes
Without the--probe option, packets from all probes are included:
Wireshark Integration
The pcapng files generated by Retis contain extended metadata that Wireshark and tshark can interpret using the Retis Wireshark plugin.Clients that don’t support the Retis plugin (like tcpdump) will skip the extra metadata and read the standard PCAP data.
Installing the Wireshark Plugin
Prerequisites
Prerequisites
Install required build dependencies:Fedora/RHEL:Ubuntu/Debian:
Using the Wireshark Plugin
Once installed, the plugin automatically displays Retis event metadata alongside each packet in Wireshark.Display Filters in tshark
The plugin registers the Retis protocol dynamically after reading the JSON schema. This creates a limitation:tshark display filters don’t work by default because filters are evaluated before packet dissection.
Solution: Provide the JSON schema manually using the retis.schema preference:
TCP Sequence Analysis
Retis captures contain the same packet multiple times because:- Events are generated from many probes
- The same packet can traverse the same probe multiple times
Complete Workflow Example
PCAP-NG Internals
Retis uses PCAP-NG extensibility features to embed Retis-specific data using custom PEN 70000.Custom Blocks and Options
Schema Block
Schema Block
The first event in the capture is a custom block containing the JSON Schema (2020-12) definition of Retis events.This allows the Wireshark plugin to dynamically understand the event structure.
Event Option
Event Option
Each packet has a custom option containing the JSON-encoded Retis event.This includes all metadata captured by Retis (kernel symbols, connection tracking state, SKB tracking, etc.).
Compatibility
The custom blocks and options follow the PCAP-NG specification for vendor extensions:- Tools that don’t recognize custom PEN 70000 blocks safely ignore them
- Standard PCAP fields (packet data, timestamps, interface) remain accessible
- Files work with tcpdump, tshark, Wireshark, and other PCAP-NG compatible tools
Common Use Cases
See Also
- Event Structure - Understanding event metadata in PCAP files
- Python Bindings - Programmatic PCAP data access
- Schema Command - Generate JSON schema for tshark filters
