On Wed, Apr 04, 2001 at 09:51:47PM -0700, Vern Paxson wrote:
> Some old email I just unearthed, FYI.

> - ---------- Forwarded message ----------
> Date: Wed, 8 Dec 1999 10:06:47 -0500
> From: Mark Abene <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: fix for libpcap and tcpdump
> Resent-Date: 8 Dec 1999 14:59:55 -0000
> Resent-From: [EMAIL PROTECTED]
> Resent-cc: recipient list not shown: ;
> 
> Dan Frasnelli et al:
> 
> Please accept the attached patches for libpcap and tcpdump.
> My changes fix some general 64-bit uncleanness, as well as a major portability
> issue stemming from the use of packet timestamps based on struct timeval.
> On Alpha, a time_t is a 64-bit long, unlike everybody else.  This made packet
> dumps made on the Alpha incompatible with, well, everybody.  We couldn't read
> dumps made on other systems either.  I basically override the use of timeval
> with a "mytimeval" which is a struct containing two ints, instead of two
> longs, and do some typecasting where appropriate.  So now we're totally 
> compatible with everyone else!  The only downside is that any app, like tcpdump
> for example, which prints timestamps *also* has to override the native timeval,
> hence my little patches to tcpdump.  Nothing major, a small sacrifice in favor
> of portability in a heterogeneous networking environment (like the kind us
> security weenies are used to).  If you're looking to adapt a util that uses
> timestamps from libpcap, just look at my tcpdump changes, they're pretty 
> straightforward.

That's silly. Exchanging int for long reverses the problem. The result is a 
fine binary on alpha and nowhere else. Anyway, current libpcap and tcpdump
don't have this issue anymore, right?

Thanks

        Torsten

PGP signature

Reply via email to