Sam Pierson wrote:
This is unavoidable, as the problem lies within FreeBSD, correct?
To what does "this" refer?
It's an intended feature that a zero timeout will wait until "enough"
packets arrive, so if you're not in non-blocking mode, it is, indeed,
"unavoidable" that a read will block until "enough" packets arrive, just
as it's unavoidable that a read from a socket in non-blocking mode will
block until data arrives. That's not a "problem", though - it's what's
*supposed* to happen.
If you don't want to block indefinitely, don't ask the system to make
the read block indefinitely, i.e., don't use a zero timeout.
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.