Subject: Re: revised ethernet/802.xx input header processing.
To: Matt Thomas <>
From: Bill Sommerfeld <>
List: tech-net
Date: 10/31/1999 07:37:15
> No it isn't.  It's for 802.1 bridging.  you need to preserve the entire
> packet (including crc -- if possible) if you are forwarding across unlike
> media.

Hmm.  I would presume that for bridging, you'd want {ether,fddi,token,...}_input()
to start something like:

foo_input(ifp, m) {
	look at dst address
		if (!unicast) {
		if multicast, set M_MCAST
		if broadcast, set M_BCAST
#ifdef BRIDGE
		foo_forward_mcast(ifp, m_copym(m))
#ifdef BRIDGE
	else if (dst is not for me) { foo_forward(ifp, m); return; }

.. and then only once that's out of the way and it's clear you have a
packet intended for this host, you call into the ethertype_input/llc
parsing as appropriate.

in the foo_forward routine, if the media type of the output is not the
same as the input, you might have to look at the frame headers to do
format conversion (e.g., insertion/removal of SNAP headers if
appropriate).. but that seems like a different problem than figuring
out which upper-layer input queue the packet belongs in..

						- Bill