From owner-freebsd-net Wed Mar 22 13:34: 7 2000 Delivered-To: freebsd-net@freebsd.org Received: from gw.errno.com (node-d1d4bd7a.powerinter.net [209.212.189.122]) by hub.freebsd.org (Postfix) with ESMTP id 1D23A37B89A for ; Wed, 22 Mar 2000 13:34:02 -0800 (PST) (envelope-from sam@errno.com) Received: from MELANGE (melange.errno.com [209.212.166.36]) by gw.errno.com (8.9.0/8.9.0) with SMTP id NAA10798; Wed, 22 Mar 2000 13:29:26 -0800 (PST) Message-ID: <011001bf9445$adaca3d0$0132a8c0@MELANGE> From: "Sam Leffler" To: "Bakul Shah" Cc: , "C. Stephen Gunn" References: <200003221915.OAA21851@chai.torrentnet.com> Subject: Re: Trimming ether_header before ether_input() Date: Wed, 22 Mar 2000 13:29:17 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org If you read the RFC or the book you'll see that the original Ethernet header was copied to the end (the "trailer") and a new one was created. The purpose was to get the payload page-aligned on receipt so we could do page flipping tricks with the Unibus adapter. Worked very well for it's time; but people frowned on it because it wasn't standard and so led to interoperability problems. Sam ----- Original Message ----- From: "Bakul Shah" To: "Sam Leffler" Cc: ; "C. Stephen Gunn" Sent: Wednesday, March 22, 2000 11:15 AM Subject: Re: Trimming ether_header before ether_input() > > > something peculiar in all ethernet drivers. Is there a historical > > > reason that the ethernet header is trimmed from the mbuf chain > > > before its passed to ether_input()? > > > > > > I can only assume that (at one time) there were ethernet devices > > > (back in the IMP days) that handed you the link header and the > > > payload in separate buffers. > > > > > > > When all this code was written there was a link layer encapsulation called a > > trailer protocol that placed the Ethernet header at the end of the packet. > ^^^^^^^^^^^^^^^ > > I think it's described in the "real BSD book" (the 4.2 one, not a later one > > :-)); if not there is an RFC that describes it. > > Perhaps you mean ``protocol header(s) above the ethernet > level at the end of the packet''? The 14 byte ethernet header > has to be at the front (unless you had significantly simpler > devices than that old seeq8005). A separate arg for the > ethernet header may have something to do with a device where > the header was in a separate place that could not be an mbuf > struct? Another reason may have to do with alignment. > Some devices may prefer to put ethernet payload as well as > header on a 4 byte boundary. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message