If we see a 5View time-stamped header with a bad key, make sure we

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
This commit is contained in:
Guy Harris 2012-04-18 02:48:23 +00:00
parent 81209da65b
commit 477185a387
3 changed files with 7 additions and 3 deletions

View 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

View 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);

View 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 */