From owner-freebsd-hackers Mon Jun 10 18:34:51 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA08268 for hackers-outgoing; Mon, 10 Jun 1996 18:34:51 -0700 (PDT) Received: from Root.COM (implode.Root.COM [198.145.90.17]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA08257 for ; Mon, 10 Jun 1996 18:34:42 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by Root.COM (8.7.5/8.6.5) with SMTP id SAA18869; Mon, 10 Jun 1996 18:34:43 -0700 (PDT) Message-Id: <199606110134.SAA18869@Root.COM> X-Authentication-Warning: implode.Root.COM: Host localhost [127.0.0.1] didn't use HELO protocol To: Ted Lemon cc: Jason Thorpe , freebsd-hackers@freebsd.org Subject: Re: Swapped ethertype in BPF output? In-reply-to: Your message of "Mon, 10 Jun 1996 18:05:27 PDT." <199606110105.SAA28278@toccata.fugue.com> From: David Greenman Reply-To: davidg@Root.COM Date: Mon, 10 Jun 1996 18:34:43 -0700 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> 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