Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jun 1996 18:34:43 -0700
From:      David Greenman <davidg@Root.COM>
To:        Ted Lemon <mellon@fugue.com>
Cc:        Jason Thorpe <thorpej@nas.nasa.gov>, freebsd-hackers@freebsd.org
Subject:   Re: Swapped ethertype in BPF output? 
Message-ID:  <199606110134.SAA18869@Root.COM>
In-Reply-To: Your message of "Mon, 10 Jun 1996 18:05:27 PDT." <199606110105.SAA28278@toccata.fugue.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>> Still, I feel like I might as well lean a little - this is
>> definitely bogus.
>
>(blush)   And, of course, if I had looked more closely at the headers
>and noticed this was going to freebsd-hackers, I probably would have
>stated that a bit more politely.
>
>I do think it's bogus, but I don't know why it was done, and based on
>my experiences with FreeBSD people so far, I'm sure there was some
>good reason for doing it this way.  So I am trying to lean on y'all

   I think this is a matter of something that wasn't done rather than
something that was. If the problem is with the type getting switched in
the kernel, then it is likely that it's always been this way (inherited
from 4.4BSD). I'd be happy to be proven wrong, however. In any case,
I'd just as well see it changed to whatever people think is "correct".
It seems to me that BPF should return the data to the user process
exactly as it was received. The closest thing I could find when looking
through the CVS logs is this from if_ethersubr.c (and all of the ethernet
drivers):

revision 1.4
date: 1994/11/24 14:29:38;  author: davidg;  state: Exp;  lines: +11 -8
Moved conversion of ether_type to host byte order out of ethernet drivers
and into ether_input(). It was silly to have bpf want this one way and
ether_input want it another way. Ripped out trailer support from the few
remaining drivers that still had it.

   ...but as far as I recall, this didn't change the calling convention
of bpf_*tap at all.

>about it, but you obviously have every right to lean back.  Sorry for
>the offensive faux pas.  :'(

   Not offensive at all.

-DG

David Greenman
Core-team/Principal Architect, The FreeBSD Project



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