aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-01-03 02:24:56 +0000
committerGuy Harris <guy@alum.mit.edu>2003-01-03 02:24:56 +0000
commitdecd1f84d1f31bdbf752055be48df06f3297d4e1 (patch)
tree07f02b084bd03f840cfbea2b2db32b28bf5f54d0 /wiretap
parent773fcba41aad906d85306abb974b2330149e3f0d (diff)
Add support for version 002.000, and note that there's probably
something hidden in the per-packet header for ATM captures that specifies the traffic type (and stuff such as that). svn path=/trunk/; revision=6839
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/netxray.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/wiretap/netxray.c b/wiretap/netxray.c
index 9a920393d2..c665f1cf10 100644
--- a/wiretap/netxray.c
+++ b/wiretap/netxray.c
@@ -1,6 +1,6 @@
/* netxray.c
*
- * $Id: netxray.c,v 1.62 2002/10/31 07:12:41 guy Exp $
+ * $Id: netxray.c,v 1.63 2003/01/03 02:24:56 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -79,6 +79,10 @@ static const char vers_1_1[] = {
'0', '0', '1', '.', '1', '0', '0', '\0'
};
+static const char vers_2_000[] = {
+ '0', '0', '2', '.', '0', '0', '0', '\0'
+};
+
static const char vers_2_001[] = {
'0', '0', '2', '.', '0', '0', '1', '\0'
};
@@ -173,6 +177,11 @@ int netxray_open(wtap *wth, int *err)
WTAP_ENCAP_UNKNOWN, /* "DIX" - should not occur */
WTAP_ENCAP_UNKNOWN, /* ARCNET raw */
WTAP_ENCAP_UNKNOWN, /* ARCNET 878.2 */
+ /*
+ * XXX - not all ATM captures have LLC-encapsulated frames
+ * in them; there's probably something hidden in the
+ * per-packet header giving the traffic type.
+ */
WTAP_ENCAP_ATM_RFC1483, /* ATM */
WTAP_ENCAP_IEEE_802_11_WITH_RADIO,
/* Wireless WAN with radio information */
@@ -221,9 +230,8 @@ int netxray_open(wtap *wth, int *err)
* rather than the milliseconds version 1.0 files appear to
* have.
*
- * It also appears that version 2.001 files (as produced by
- * Windows(?) Sniffer Pro 2.50.05) have per-packet headers with
- * some extra fields. */
+ * It also appears that version 2.00x files have per-packet
+ * headers with some extra fields. */
if (memcmp(hdr.version, vers_1_0, sizeof vers_1_0) == 0) {
timeunit = 1000.0;
version_major = 1;
@@ -232,7 +240,8 @@ int netxray_open(wtap *wth, int *err)
timeunit = 1000000.0;
version_major = 1;
file_type = WTAP_FILE_NETXRAY_1_1;
- } else if (memcmp(hdr.version, vers_2_001, sizeof vers_2_001) == 0
+ } else if (memcmp(hdr.version, vers_2_000, sizeof vers_2_000) == 0
+ || memcmp(hdr.version, vers_2_001, sizeof vers_2_001) == 0
|| memcmp(hdr.version, vers_2_002, sizeof vers_2_002) == 0) {
if (hdr.timeunit > NUM_NETXRAY_TIMEUNITS) {
g_message("netxray: Unknown timeunit %u",