How isginf/pcap-diff works
pcap-diff is a single-file command-line tool that compares packet contents across two or more PCAP captures and writes differing packets to a new capture. Its workflow parses options, reads captures into packet maps keyed by normalized serialization, compares those maps according to left/right selection rules, and writes the result. The README documents field-ignore and layer-boundary options. The excerpt omits some implementation details, so the graph keeps the major stages within the one supported source file and shows only evidenced relationships.
Main entry points: pcap_diff.py Capture reader
Components 8
PCAP comparison
- Option parsing
pcap_diff.py - Capture reader
pcap_diff.py - Packet normalization
pcap_diff.py - Difference selection
pcap_diff.py - Diff capture output
pcap_diff.py
Other components
- CLI user
- Scapy
- PCAP files
Connections 10
- CLI user → Option parsing: sets options
pcap_diff.py - Option parsing → Capture reader: selects inputs
pcap_diff.py - Capture reader → Scapy: reads packets
pcap_diff.py - PCAP files → Capture reader: provides captures
pcap_diff.py - Capture reader → Packet normalization: serializes packets
pcap_diff.py - Packet normalization → Difference selection: keys packets
pcap_diff.py - Option parsing → Packet normalization: configures ignores
pcap_diff.py - Difference selection → Diff capture output: selects differences
pcap_diff.py - Diff capture output → Scapy: writes capture
- Diff capture output → PCAP files: produces diff