Joerg Mayer's changes to add support for NetXRay file format version

2.002, as used by release 3.50 of the Network Associates Sniffer for
Windows; currently, we treat it just like the 2.001 version, so we
rename the version #define WTAP_FILE_NETXRAY_2_001 to
WTAP_FILE_NETXRAY_2_00x and use that for both 2.001 and 2.002.

svn path=/trunk/; revision=2087
This commit is contained in:
Guy Harris 2000-06-24 05:32:48 +00:00
parent 068f36c4fe
commit ae1f565029
3 changed files with 13 additions and 8 deletions

View File

@ -1,6 +1,6 @@
/* file.c
*
* $Id: file.c,v 1.53 2000/05/25 09:00:20 guy Exp $
* $Id: file.c,v 1.54 2000/06/24 05:32:46 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@ -273,8 +273,8 @@ const static struct file_type_info {
{ "Network Associates Sniffer (Windows-based) 1.1", "ngwsniffer_1_1",
netxray_dump_can_write_encap, netxray_dump_open_1_1 },
/* WTAP_FILE_NETXRAY_2_001 */
{ "Network Associates Sniffer (Windows-based) 2.001", NULL,
/* WTAP_FILE_NETXRAY_2_00x */
{ "Network Associates Sniffer (Windows-based) 2.00x", NULL,
NULL, NULL },
/* WTAP_FILE_RADCOM */

View File

@ -1,6 +1,6 @@
/* netxray.c
*
* $Id: netxray.c,v 1.28 2000/05/19 23:06:58 gram Exp $
* $Id: netxray.c,v 1.29 2000/06/24 05:32:47 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@ -72,6 +72,10 @@ static const char vers_2_001[] = {
'0', '0', '2', '.', '0', '0', '1', '\0'
};
static const char vers_2_002[] = {
'0', '0', '2', '.', '0', '0', '2', '\0'
};
/* NetXRay 1.x data record format - followed by frame data. */
struct netxrayrec_1_x_hdr {
guint32 timelo; /* lower 32 bits of time stamp */
@ -164,10 +168,11 @@ 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_001, sizeof vers_2_001) == 0
|| memcmp(hdr.version, vers_2_002, sizeof vers_2_002) == 0) {
timeunit = 1000000.0;
version_major = 2;
file_type = WTAP_FILE_NETXRAY_2_001;
file_type = WTAP_FILE_NETXRAY_2_00x;
} else {
g_message("netxray: version \"%.8s\" unsupported", hdr.version);
*err = WTAP_ERR_UNSUPPORTED;

View File

@ -1,6 +1,6 @@
/* wtap.h
*
* $Id: wtap.h,v 1.72 2000/05/25 09:00:24 guy Exp $
* $Id: wtap.h,v 1.73 2000/06/24 05:32:48 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@ -115,7 +115,7 @@
#define WTAP_FILE_NETMON_2_x 12
#define WTAP_FILE_NETXRAY_1_0 13
#define WTAP_FILE_NETXRAY_1_1 14
#define WTAP_FILE_NETXRAY_2_001 15
#define WTAP_FILE_NETXRAY_2_00x 15
#define WTAP_FILE_RADCOM 16
#define WTAP_FILE_ASCEND 17
#define WTAP_FILE_NETTL 18