Subject: Re: libpcap and FDDI header fdd_ph[3] alignment: bug, or not?
To: Matt Thomas <matt@3am-software.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-net
Date: 05/16/2000 08:50:58
In message <4.3.1.2.20000516080256.00b41ef8@3am-software.com>Matt Thomas writes
>At 08:37 PM 5/15/2000 -0700, Jonathan Stone wrote:

[fddi_ph]

>>the commit message syas this is done to avoid alignment problmes.

>I guess it depends on who you want to be compatible with.
>I decided to be compatible with Digital UNIX and ULTRIX (which
>also have fddi_ph).

In the kernel, in RAM, or in a pcap tracefile?  Can the NetBSD
tcpdump read FDDI dumps taken on DU and Ultrix?

My problem is, this week I really need to be compatible with dumps
created on sunos and freebsd. I think I consed up something that
works.  (just dropping the freebsd print-fddi.c in over ours, too,
when back-porting to freebsd. I have no clue about sunos. I will have
to, very soon.)

>Without the fix, tcpdump and other bpf utilities would need to be
>changed to be able to deal unaligned FDDI packet data.  It was easier
>to fix the fddi header than all the utilities.

Sure. But AFAIK, libpcap is/was supposed to be an interchange
format. If you want to change the format, you should really change
the magic number. Did we?

I can fix tcpdump and my own tools.  But what to do about the
incompatibile dumpfile format? Perpetuate them forever?

Hm.  Tying fddi_bitswap to the platform/OS doesn't look right either.
Does our tcpdump get that right on (say) netbsd/sparc with an Sbus
FDDI card (assuming we had a driver:), or is it really an artifact of
the PDQ?