This crate provides random access to packets in a pcap file.
You can get()
n'th packet of pcap in a constant time.
The crate is consider to be a companion crate of the pcap-file
.
Add to Cargo.toml:
[dependency]
pcap-file = "0.10.0"
pcap-file-ra = "0.1.1"
Tested with pcap-file 0.10.0 on windows 64-bit platform.
Index
trait for PcapReader
Index
trait can't be implemented because it assumes the returned value is already on some memory location.We depend on pcap-file
.
The crate was chosen based on the following criteria.
pcap 0.7.0 - wrapper of pcap/WinPcap
pcap-file 0.7.0 - manually written pcap parser
pcap-rs 1.0.1 - nom-based pcap parser
rpcap 0.3.0 - bytepack-based pcap parser
pcapng 1.0.0 - nom-based pcapng-only parser