Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Mar 2000 14:15:02 -0500
From:      Bakul Shah <bakul@torrentnet.com>
To:        "Sam Leffler" <sam@errno.com>
Cc:        freebsd-net@FreeBSD.ORG, "C. Stephen Gunn" <csg@waterspout.com>
Subject:   Re: Trimming ether_header before ether_input() 
Message-ID:  <200003221915.OAA21851@chai.torrentnet.com>
In-Reply-To: Your message of "Wed, 22 Mar 2000 09:04:07 PST." <005301bf9420$a53ebdc0$0132a8c0@MELANGE> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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




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