diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-08-24 03:19:34 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-08-24 03:19:34 +0000 |
commit | 678b5fd6ffcb9b6fad1cd9769e393fe580cf28fa (patch) | |
tree | 04bfdca69dd647e2f67813f7bcd4642cfe5ea826 /wiretap/ngsniffer.c | |
parent | 9fc0d3aefe081a52867b60cea82bb124dbb50cf5 (diff) |
Add a new Wiretap encapsulation type WTAP_ENCAP_FDDI_BITSWAPPED, meaning
"FDDI with the MAC addresses bit-swapped"; whether the MAC addresses are
bit-swapped is a property of the machine on which the capture was taken,
not of the machine on which the capture is being read - right now, none
of the capture file formats we read indicate whether FDDI MAC addresses
are bit-swapped, but this does let us treat non-"libpcap" captures as
being bit-swapped or not bit-swapped independent of the machine on which
they're being read (and of the machine on which they were captured, but
I have the impression they're bit-swapped on most platforms), and allows
us to, if, as, and when we implement packet capture in Wiretap, mark
packets in a capture file written in Wiretap-native format based on the
machine on which they are captured (assuming the rule "Ultrix, Alpha,
and BSD/OS are the only platforms that don't bit-swap", or some other
compile-time rule, gets the right answer, or that some platform has
drivers that can tell us whether the addresses are bit-swapped).
(NOTE: if, for any of the capture file formats used only on one
platform, FDDI MAC addresses aren't bit-swapped, the code to read that
capture file format should be fixed to flag them as not bit-swapped.)
Use the encapsulation type to decide whether to bit-swap addresses in
"dissect_fddi()".
svn path=/trunk/; revision=557
Diffstat (limited to 'wiretap/ngsniffer.c')
-rw-r--r-- | wiretap/ngsniffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index 53066089d8..c2ed78d151 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -1,6 +1,6 @@ /* ngsniffer.c * - * $Id: ngsniffer.c,v 1.19 1999/08/22 02:29:39 guy Exp $ + * $Id: ngsniffer.c,v 1.20 1999/08/24 03:19:32 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu> @@ -261,7 +261,7 @@ int ngsniffer_open(wtap *wth, int *err) WTAP_ENCAP_UNKNOWN, /* Znet */ WTAP_ENCAP_LAPB, /* Internetwork analyzer */ WTAP_ENCAP_UNKNOWN, /* type 8 not defined in Sniffer */ - WTAP_ENCAP_FDDI, + WTAP_ENCAP_FDDI_BITSWAPPED, WTAP_ENCAP_ATM_SNIFFER /* ATM */ }; #define NUM_NGSNIFF_ENCAPS (sizeof sniffer_encap / sizeof sniffer_encap[0]) |