On Thu, Dec 28, 2000 at 09:35:44AM -0500, Michael T. Stolarchuk wrote:
> >So it looks as if interactive applications might be able to, at least on
> >BSD, Solaris, and Linux, do a "select()" or "poll()" on the pcap_t file
> >descriptor in the main loop, and, with the aid of a timeout, work around
> >the BSD problem - the timeout is established regardless of what platform
> >you're on, so you don't even have to #ifdef it.
> 
> maybe, but the problem is that on most BSD platforms, the timeout
> is implemented via a sleep(_timeout_),

To which timeout are you referring here?  The one in select/poll (which
is the one that a timeout in the GTK+ main loop uses; that's probably
the case for most if not all X toolkits), or the one in BPF?

> and the associated select
> timeout only works `marginally'... the select will only be awoken
> when the buffer fills, not when the timeout has passed.

Not true - it will be awoken when the timeout specified by the timeout
argument to "select()" or "poll()" expires; that's the timeout to which
I'm referring.

It will *also* be awoken if any input arrives on any of the *other*
descriptors it's waiting for, e.g. a connection to the X server in the
case of an X application.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to