Date: Fri, 23 Mar 2001 14:34:48 -0800 (PST) From: Archie Cobbs <archie@dellroad.org> To: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: question about BPF programming Message-ID: <200103232234.f2NMYmf28390@arch20m.dellroad.org> In-Reply-To: <99d8mo$2cbo$1@igloo.uran.net.ua> "from Andrey Simonenko at Mar 22, 2001 06:15:50 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Andrey Simonenko writes:
> I read bpf(4) man page and have one question about BPF.
> Suppose I open one of free BPF devices /dev/bpf??. I can dup(2)
> descriptor of opened BPF device and get so called shared interface.
>
> Can I setup different filters on each descriptor for opened BPF device?
Nope. Quoting dup(2):
The object referenced by the descriptor does not distinguish between oldd
and newd in any way. Thus if newd and oldd are duplicate references to
an open file, read(2), write(2) and lseek(2) calls all move a single
pointer into the file, and append mode, non-blocking I/O and asynchronous
I/O options are shared between the references.
-Archie
__________________________________________________________________________
Archie Cobbs * Packet Design * http://www.packetdesign.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103232234.f2NMYmf28390>
