Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Sep 2003 16:04:49 -0700
From:      Lev Walkin <vlm@netli.com>
To:        Dmitry Morozovsky <marck@rinet.ru>
Cc:        hackers@freebsd.org
Subject:   Re: if bpf fd's select()able?
Message-ID:  <3F5BB991.2050601@netli.com>
In-Reply-To: <20030907233940.M18589@woozle.rinet.ru>
References:  <20030907233940.M18589@woozle.rinet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Dmitry Morozovsky wrote:
> Dear colleagues,
> 
> [all below is for 4-STABLE]
> 
> I'm trying to write effective arp scanner for multi-interface router (esp.
> multi-vlan); I plan to use multiple bpf devices attached to different
> interfaces emitting ARP requests and filters listening to ARP replies; the most
> natural way to multiplex them for me is select().
> 
> However, my tests show that select()ing bpf fd does not lead to trigger packets
> available to bpf filter; the process hangs in select state while parallel
> tcpdump process shows packets desired *and* is in bpf state.
> 
> Am I missing something "base"? References (surely, I'd already read
> manpages for bpf, pcap and related -- but did I still missed something
> serious?) would be greatly appreciated.

Yes, you're missing the interactive mode.

Refer to BIOCIMMEDIATE in the bpf(4) manual page.


-- 
Lev Walkin
vlm@netli.com



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