Skip to main content

Module pcap

Module pcap 

Source
Expand description

PCAP and PcapNG file I/O for reading and writing packet captures.

Provides rdpcap for reading all packets from a file (auto-detects format), PcapIterator / PcapNgIterator / CaptureIterator for streaming, and wrpcap / wrpcapng for writing.

Re-exports§

pub use reader::CaptureIterator;
pub use reader::PcapIterator;
pub use reader::PcapNgIterator;
pub use reader::rdpcap;
pub use writer::PcapNgStreamWriter;
pub use writer::wrpcap;
pub use writer::wrpcap_packets;
pub use writer::wrpcapng;
pub use writer::wrpcapng_packets;

Modules§

reader
PCAP and PcapNG file reader with streaming support and auto-detection.
writer
PCAP and PcapNG file writer.

Structs§

CapturedPacket
A captured packet with associated PCAP metadata.
LinkType
PCAP link-layer type.
PcapMetadata
Metadata from a PCAP/PcapNG packet record.

Enums§

CaptureFormat
Capture file format.