summaryrefslogtreecommitdiff
path: root/capture.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 /capture.c
parent9fc0d3aefe081a52867b60cea82bb124dbb50cf5 (diff)
downloadwireshark-678b5fd6ffcb9b6fad1cd9769e393fe580cf28fa.tar.gz
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 'capture.c')
-rw-r--r--capture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/capture.c b/capture.c
index 4c9365e550..a367e04440 100644
--- a/capture.c
+++ b/capture.c
@@ -1,7 +1,7 @@
/* capture.c
* Routines for packet capture windows
*
- * $Id: capture.c,v 1.60 1999/08/22 02:29:30 guy Exp $
+ * $Id: capture.c,v 1.61 1999/08/24 03:19:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -824,6 +824,7 @@ capture_pcap_cb(u_char *user, const struct pcap_pkthdr *phdr,
capture_eth(pd, phdr->caplen, &ld->counts);
break;
case WTAP_ENCAP_FDDI:
+ case WTAP_ENCAP_FDDI_BITSWAPPED:
capture_fddi(pd, phdr->caplen, &ld->counts);
break;
case WTAP_ENCAP_TR: