ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Delays in real-time packet capture

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 22 Sep 2006 10:10:53 -0700
Richard van der Hoff wrote:

One workaround for this is to #define MUST_DO_SELECT, so that capture_loop_dispatch uses a select() to wait for packets to turn up, and put a second's timeout on the select() - but i'm not sure how portable this is likely to be.

It's likely to be quite non-portable, given that

	1) select() on Windows can't be used in that fashion

and

	2) select() on at least some BSD-derived OSes doesn't work on BPF devices.

Anyone got any better ideas?

I'm not sure the display update rate limiting belongs in dumpcap; it might be better to do it in Wireshark. I.e., have dumpcap send packet count updates immediately to Wireshark, and have Wireshark decide when to read the new packets.