tcpdump mailing list archives

Re: pcap_read_linux_mmap is always blocking


From: Guy Harris <guy () alum mit edu>
Date: Mon, 6 Jul 2009 11:38:51 -0700


On Jul 6, 2009, at 11:08 AM, Dragos Ilie wrote:

My application is not setting the timeout. This corresponds to the case
where p->md.timeout == 0. The function pcap_setnonblock_mmap first
checks the nonblock flag and if it is set *and* if p->md.timeout > 0 it
maps the value to p->md.timeout*-1 - 1

That should be "...*and* if p->md.timeout >= 0"; i.e., pcap_setnonblock_mmap() should, when turning non-blocking mode on, treat all non-negative values, including 0, as meaning that non- blocking mode is currently not on.

I've checked into the main branch, and pushed, a change to do that.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: