Shomiti Surveyor 3.x appears to have changed the version number in the

file header to 4; fortunately, as they appear to put their extensions to
snoop into the padding at the end of the record, all their capture files
look alike to programs such as snoop and Ethereal that ignore the
padding, so we can just treat version 4 just like version 2 (unless and
until Brent decides a new snoop format is called for, changes the record
header, and picks a version number that's the same as one used by
Shomiti).

svn path=/trunk/; revision=2447
This commit is contained in:
Guy Harris 2000-09-19 05:12:11 +00:00
parent 348ee93844
commit 706bd5e1fc
1 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
/* snoop.c
*
* $Id: snoop.c,v 1.30 2000/09/07 05:34:19 gram Exp $
* $Id: snoop.c,v 1.31 2000/09/19 05:12:11 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@ -181,8 +181,14 @@ int snoop_open(wtap *wth, int *err)
wth->data_offset += sizeof hdr;
hdr.version = ntohl(hdr.version);
if (hdr.version != 2) {
/* We only support version 2. */
switch (hdr.version) {
case 2: /* Solaris 2.x and later snoop, and Shomiti
Surveyor prior to 3.x */
case 4: /* Shomiti Surveyor 3.x */
break;
default:
g_message("snoop: version %u unsupported", hdr.version);
*err = WTAP_ERR_UNSUPPORTED;
return -1;