summaryrefslogtreecommitdiff
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-06-18 19:55:11 -0700
committerGuy Harris <guy@alum.mit.edu>2017-06-19 02:55:47 +0000
commite9e1b4816278a131aa38dfc579ccd975fed2d7c7 (patch)
tree71da3e2ae4b5d52ca6c0214d3a86cc7fd6393bb0 /wiretap
parent547b08b49527eb97ac2ab37fbbcb5a728869d2fd (diff)
downloadwireshark-e9e1b4816278a131aa38dfc579ccd975fed2d7c7.tar.gz
Put the definition of BIT_SWAPPED_MAC_ADDRS in the file where it's used.
In change 18a3b0659c209a2e0121eacd640b75e6c1c3b87d, I moved the table that uses it, but not the actual definition, from libpcap.c to pcap-common.c; they both should have been moved. Make it so. Change-Id: I266fce455df3848b873cdfadb12cecdbf9c8d4d3 Reviewed-on: https://code.wireshark.org/review/22216 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/libpcap.c5
-rw-r--r--wiretap/pcap-common.c12
2 files changed, 12 insertions, 5 deletions
diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c
index c0b90cc5cb..877464c3e7 100644
--- a/wiretap/libpcap.c
+++ b/wiretap/libpcap.c
@@ -50,11 +50,6 @@ typedef struct {
void *encap_priv;
} libpcap_t;
-/* On some systems, the FDDI MAC addresses are bit-swapped. */
-#if !defined(ultrix) && !defined(__alpha) && !defined(__bsdi__)
-#define BIT_SWAPPED_MAC_ADDRS
-#endif
-
/* Try to read the first two records of the capture file. */
static int libpcap_try(wtap *wth, int *err, gchar **err_info);
static int libpcap_try_header(wtap *wth, FILE_T fh, int *err, gchar **err_info,
diff --git a/wiretap/pcap-common.c b/wiretap/pcap-common.c
index 0950e5adad..d615411b76 100644
--- a/wiretap/pcap-common.c
+++ b/wiretap/pcap-common.c
@@ -35,6 +35,18 @@
#include "pcap-common.h"
/*
+ * On some systems, the FDDI MAC addresses are bit-swapped.
+ *
+ * XXX - what we *really* need to know is whether the addresses are
+ * bit-swapped *in a particular capture*, which depends on the system
+ * on which it was captured, not on the system that's reading it.
+ * Unfortunately, we can't determine that.
+ */
+#if !defined(ultrix) && !defined(__alpha) && !defined(__bsdi__)
+#define BIT_SWAPPED_MAC_ADDRS
+#endif
+
+/*
* Map link-layer header types (LINKTYPE_ values) to Wiretap encapsulations.
*
* Either LBL NRG wasn't an adequate central registry (e.g., because of