Subject: Re: PF_PACKET ???
To: Palle Lyckegaard <PalleLyckegaard@e-noerd.dk>
From: Nick Amato <naamato@nexthop.com>
List: tech-net
Date: 11/21/2001 16:18:42
On Wed, Nov 21, 2001 at 09:44:30PM +0100, Palle Lyckegaard wrote:
> Hi,
> 
> Just wondering if NetBSD (or any of the other BSDs) support the
> PF_PACKET domain in the socket calls? I have been using this neat
> feature on Linux and would like to have this on NetBSD as well if
> possible.
> 
> I've been looking at the man-pages for 'bfp' - it seems possible to use
> the bpf-devices for both sending and receiving raw data link layer
> frames - have anyone tried that?
> 
> Is it worth considering implementing the PF_PACKET on *BSD or can the
> 'bpf' be used?

It's worth noting that an advantage of PF_PACKET vs. bpf(4) is that
a PF_PACKET socket may be bound to an ethertype (or 802.3 frame)
and can receive these frames on any interface if desired (analogous
to a raw IP socket).  IIRC, a bpf pseudodevice must be bound to an
interface to receive, thus requiring a bpf in the kernel for every
interface on which one wants to receive.

Nick Amato