Subject: Re: IPv4 Packet Processing in NetBSD
To: David W. Rankin Jr. <drankin@bohemians.lexington.ky.us>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 11/12/2002 23:22:11
On Tue, Nov 12, 2002 at 06:44:32AM -0500, David W. Rankin Jr. wrote:
> On Fri, Nov 08, 2002 at 06:15:44PM +0100, Joel Wilsson wrote:
> 
> > Okay, you can read it, but only if you all point out the errors
> > I'm sure exist in this first draft ;)
> 
> > It's a bit short, I think, so if you could point out anything you think
> > is missing that'd be great.
> 
> As a newbie to kernel hacking in general, and to the network code in
> specific, I would really love to see a paragraph or two on what assumptions
> the networking code (m_aux_find, etc.) make concerning how the packet data
> is layed out within the mbufs.
> 
> I am looking at adding 3Com VLT VLAN support to the Ethernet code, and
> the unique problem is that the extra VLT bytes are at the front of the
> packet. It would seem simple to just slice off 4 bytes from the front
> and (if needed) rearrange bytes from the data portion, but that would
> appear to break the usage of m_aux_find in ether_input at the very least. 
> 
> I'm reading the source to try to understand this more, but I for one would
> welcome someone who is more competant than I giving a hand. :)

vlan(4) has similar problem (exept that the extra 4 bytes are not in front
of the packet, but after the ethernet addresses). Did you look at the
vlan driver (sys/net/if_vlan.c) ?

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 23 ans d'experience feront toujours la difference
--