aboutsummaryrefslogtreecommitdiffstats
path: root/packet.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-08-24 03:19:34 +0000
committerGuy Harris <guy@alum.mit.edu>1999-08-24 03:19:34 +0000
commit678b5fd6ffcb9b6fad1cd9769e393fe580cf28fa (patch)
tree04bfdca69dd647e2f67813f7bcd4642cfe5ea826 /packet.c
parent9fc0d3aefe081a52867b60cea82bb124dbb50cf5 (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 'packet.c')
-rw-r--r--packet.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/packet.c b/packet.c
index 0fbb99714d..f4fad5d693 100644
--- a/packet.c
+++ b/packet.c
@@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
- * $Id: packet.c,v 1.39 1999/08/22 00:47:45 guy Exp $
+ * $Id: packet.c,v 1.40 1999/08/24 03:19:23 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -658,7 +658,10 @@ dissect_packet(const u_char *pd, frame_data *fd, proto_tree *tree)
dissect_eth(pd, 0, fd, tree);
break;
case WTAP_ENCAP_FDDI :
- dissect_fddi(pd, fd, tree);
+ dissect_fddi(pd, fd, tree, FALSE);
+ break;
+ case WTAP_ENCAP_FDDI_BITSWAPPED :
+ dissect_fddi(pd, fd, tree, TRUE);
break;
case WTAP_ENCAP_TR :
dissect_tr(pd, 0, fd, tree);