Peter Memishian wrote:

> > > > Why are we fabricating the ethernet header rather than having
> > snoop ask lo0 what MAC type it is and using that to understand
> > that there is no MAC header to speak of?
> > Hear, hear. Software that assumes that all packets are carried
> over Ethernet should be squashed, not coddled.

Since Phil's asleep and this thread may otherwise run amok: we are
fabricating an Ethernet header because that's what /dev/lo0 on other
Unix-like systems do.


Such systems being?

None of the BSDs do this, they all use an ioctl to ask the driver
what MAC tpe it is (NULL) and adjust their output similarly:

14:53:46.714843 AF IPv4 (2), length 88: 127.0.0.1 > 127.0.0.1: ICMP echo request, id 63821, seq 1, length 64

I can point you at the source code, if you need convincing.

I'm sure the same would carry over to Tru64 (I can test that
on the weekend, if you're doubting) and others - except for
HP-UX (which suffers from he Mentat STREAMS disease.)

This appears top be a Linux-specific hack and doesn't need
to be replicated in Solaris.  Why it is being done like that,
I don't know.  Probably because someone was lazy and wanted
to assume that all NICs are "ethernet".  FWIW, libpcap does
understand that DLT_LOOP (used by Linux in the past) is
different and has correctly functioned with it:

http://www.tcpdump.org/lists/workers/2003/08/msg00378.html

We don't need to blindly follow Linux down this path.

Darren

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to