If we see a 5View time-stamped header with a bad key, make sure we
authorGuy Harris <guy@alum.mit.edu>
Wed, 18 Apr 2012 02:48:23 +0000 (02:48 -0000)
committerGuy Harris <guy@alum.mit.edu>
Wed, 18 Apr 2012 02:48:23 +0000 (02:48 -0000)
return the right error code and information string.

InfoVista bought Accellent Group, and, at least according to the
InfoVista Web site, it's "5View", not "5Views".

svn path=/trunk/; revision=42119

doc/wireshark.pod.template
wiretap/5views.c
wiretap/file_access.c

index 39d41ee884987d0ef34c5c198590e62cd19abb31..06197553da014b5de33c391a7d006f6226d11963 100644 (file)
@@ -130,7 +130,7 @@ Visual Networks' B<Visual UpTime> traffic capture
 the output from B<CoSine> L2 debug
 
 =item *
-the output from Accellent's B<5Views> LAN agents
+the output from InfoVista's B<5View> LAN agents
 
 =item *
 Endace Measurement Systems' ERF format captures
index 90e2e75f1a2b23f41bfbb09477f158d9b4b241dd..1ad604204f31ea5afc46037d8f5bf39b7e0c0160 100644 (file)
@@ -223,8 +223,12 @@ _5views_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset)
                wth->data_offset += bytes_read;
 
                TimeStamped_Header.Key = pletohl(&TimeStamped_Header.Key);
-               if(TimeStamped_Header.Key != CST_5VW_RECORDS_HEADER_KEY)
+               if(TimeStamped_Header.Key != CST_5VW_RECORDS_HEADER_KEY) {
+                       *err = WTAP_ERR_BAD_FILE;
+                       *err_info = g_strdup_printf("5views: Time-stamped header has bad key value 0x%08X",
+                           TimeStamped_Header.Key);
                        return FALSE;
+               }
 
                TimeStamped_Header.RecSubType =
                    pletohl(&TimeStamped_Header.RecSubType);
index d4ddd6f735da1de84b5c7dbaa5a60469333eefe0..5fb1ae6762c458e600a0dda5a5162d453fdbe443 100644 (file)
@@ -446,7 +446,7 @@ static const struct file_type_info dump_open_table_base[] = {
          libpcap_dump_can_write_encap, libpcap_dump_open },
 
        /* WTAP_FILE_5VIEWS */
-       { "Accellent 5Views capture", "5views", "5vw", NULL, TRUE, FALSE,
+       { "InfoVista 5View capture", "5views", "5vw", NULL, TRUE, FALSE,
          _5views_dump_can_write_encap, _5views_dump_open },
 
        /* WTAP_FILE_IPTRACE_1_0 */