From owner-freebsd-net Wed Mar 22 11:15:13 2000 Delivered-To: freebsd-net@freebsd.org Received: from chai.torrentnet.com (chai.torrentnet.com [198.78.51.73]) by hub.freebsd.org (Postfix) with ESMTP id C53DB37C1E9 for ; Wed, 22 Mar 2000 11:15:10 -0800 (PST) (envelope-from bakul@torrentnet.com) Received: from chai.torrentnet.com (localhost [127.0.0.1]) by chai.torrentnet.com (8.8.8/8.8.5) with ESMTP id OAA21851; Wed, 22 Mar 2000 14:15:02 -0500 (EST) Message-Id: <200003221915.OAA21851@chai.torrentnet.com> To: "Sam Leffler" Cc: freebsd-net@FreeBSD.ORG, "C. Stephen Gunn" Subject: Re: Trimming ether_header before ether_input() In-reply-to: Your message of "Wed, 22 Mar 2000 09:04:07 PST." <005301bf9420$a53ebdc0$0132a8c0@MELANGE> Date: Wed, 22 Mar 2000 14:15:02 -0500 From: Bakul Shah Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > 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