pcap-analyzer icon indicating copy to clipboard operation
pcap-analyzer copied to clipboard

pcap-info: thread 'main' panicked

Open sergey-safarov opened this issue 10 months ago • 1 comments

I try get PCAP file info using the command

./pcap-info webrtc.pcapng 

thread 'main' panicked at pcap-info/src/info.rs:254:23:
Error while reading: BufferTooSmall
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Also, according to the source code, pcap-info should print information about secrets, but I have checked on other pcap this info is not printed.

webrtc.pcapng.gz

sergey-safarov avatar Apr 26 '25 19:04 sergey-safarov

Hi, pcap-analyzer is complaining about the buffer size, which must be big enough for one block. Looking at the pcap file, this is caused by the first DSB block (block 3), which has a length of 1273652 bytes (more than 1MB, while the default buffer size is 128k).

It can be fixed by increasing buffer_initial_capacity in conf/pcap-analyzer.conf (it works here with buffer_initial_capacity = 1310720. That said, I think the error message could be more helpful. Also, maybe a mechanism could be added to deal with very large blocks in pcap file.

chifflier avatar Apr 28 '25 15:04 chifflier