ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [ethereal-dev] More on 'hang' awaiting packets: NetBSD

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxx>
Date: Thu, 9 Dec 1999 15:03:15 -0800 (PST)
> The FAQ mentions that libpcap on Linux introduces a 'hang' when
> performing a live capture if no packets are being displayed. I have this
> same issue on NetBSD. Is this expected? If I switch desktops away from
> Ethereal and then back, the capture window is not refreshed and I can't
> press the STOP button (until a new packet arrives). Is the patch
> applicable to NetBSD too?

No.  It's a patch to "pcap-linux.c"; NetBSD uses BPF, so "pcap-linux.c"
isn't used, "pcap-bpf.c" is.

The patch adds to the Linux live-capture mechanism support for the
timeout argument to "pcap_live_open()"; other capture mechanisms already
support it, including BPF.

Perhaps there's some other reason why "libpcap" blocks indefinitely
waiting for input on some platforms, rather than timing out every 250 ms
to give the rest of Ethereal a chance; I've not seen that behavior on
other platforms, though.