Skip to main content

rdpcap

Function rdpcap 

Source
pub fn rdpcap(path: impl AsRef<Path>) -> Result<Vec<CapturedPacket>>
Expand description

Read all packets from a PCAP or PcapNG file into memory.

Auto-detects the file format from magic bytes. This is the simple Scapy-like API. For large files, use CaptureIterator instead.