Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Nov 2002 17:54:02 -0500
From:      Barney Wolff <barney@tp.databus.com>
To:        Petri Helenius <pete@he.iki.fi>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: bpf
Message-ID:  <20021103225402.GA28812@tp.databus.com>
In-Reply-To: <03fe01c28386$186fed80$862a40c1@PHE>
References:  <03fe01c28386$186fed80$862a40c1@PHE>

next in thread | previous in thread | raw e-mail | index | archive | help
I believe you're misunderstanding the meaning of the timeout in select(2).
Timeout applies only when no FDs are ready.

Also, you might be better off setting immediate mode on your bpf fd,
if you want a return before the buffer is full.

On Mon, Nov 04, 2002 at 12:12:26AM +0200, Petri Helenius wrote:
> 
> I believe the select operation on bpf is not functioning as supposed to.
> I?m calling select with 100ms timeout. The bpf interface is listening to
> an interface with constant packet rate, so it?s certain that multiple packets
> have been received during the select call. However the fd for the bpf
> device is not set until the bpf buffer is full. (which might be several seconds
> away since I?m using fairly large bpf buffers)
> 
> Looking at the code I get the impression that if there are packets on the bpf
> buffer when the select timeouts, it should return the fd for the bpf ?
> 
> Pete
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message

-- 
Barney Wolff         http://www.databus.com/bwresume.pdf
I'm available by contract or FT, in the NYC metro area or via the 'Net.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021103225402.GA28812>