aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-09-19 05:12:11 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-09-19 05:12:11 +0000
commit494179a225aebc56d542421c0b6bbb421fbcf276 (patch)
tree5fe881904f1bc6b74d0813ffa845b6a3cb22ec78 /wiretap
parent101f2f128e324f04793ce3e6ae282f5c307d6e26 (diff)
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). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2447 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/snoop.c12
1 files 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 <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;