From 706bd5e1fc964615a2df8240fe0f522f11145ced Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 19 Sep 2000 05:12:11 +0000 Subject: [PATCH] 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 --- wiretap/snoop.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wiretap/snoop.c b/wiretap/snoop.c index 14a590136a..7d8e9302f4 100644 --- a/wiretap/snoop.c +++ b/wiretap/snoop.c @@ -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 @@ -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;