Subject: Re: PF_PACKET ???
To: Palle Lyckegaard <PalleLyckegaard@e-noerd.dk>
From: Alfred Perlstein <bright@mu.org>
List: tech-net
Date: 11/21/2001 14:47:21
* Palle Lyckegaard <PalleLyckegaard@e-noerd.dk> [011121 14:40] 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 find it sort of strange that people always seem to toss up
$OBSCURE_LINUX_FEATURE as if we all know what it is.  I think that
if you (and others) would include a URL or short description clearly
documenting the "feature" you'd quickly gain more interest rather
than having some of us (well at least me) think, "oh great another
thing that should/could be done in userland or using existing
facilities that Linux has made yet another kernel API for."

> 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?

Yes.

> Is it worth considering implementing the PF_PACKET on *BSD or can the
> 'bpf' be used?
> 
> It would be a nice place for me to start contributing to the *BSD
> world...

Yes, that would be nice, but before you possibly duplicate work
already done, why not have a look at libpcap or some of the libraries
that make packet capture and raw packet sending work on multiple
OSes through a (mostly) transparent library.

-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
                           http://www.morons.org/rants/gpl-harmful.php3