NetMon 1.x format does *not* support per-packet encapsulation.

svn path=/trunk/; revision=40495
This commit is contained in:
Guy Harris 2012-01-14 10:31:25 +00:00
parent 7ff623d5a0
commit 2db032c5d5
3 changed files with 17 additions and 4 deletions

View File

@ -516,11 +516,11 @@ static const struct file_type_info dump_open_table_base[] = {
/* WTAP_FILE_NETMON_1_x */
{ "Microsoft NetMon 1.x", "netmon1", "*.cap", ".cap", TRUE, FALSE,
netmon_dump_can_write_encap, netmon_dump_open },
netmon_dump_can_write_encap_1_x, netmon_dump_open },
/* WTAP_FILE_NETMON_2_x */
{ "Microsoft NetMon 2.x", "netmon2", "*.cap", ".cap", TRUE, FALSE,
netmon_dump_can_write_encap, netmon_dump_open },
netmon_dump_can_write_encap_2_x, netmon_dump_open },
/* WTAP_FILE_NGSNIFFER_UNCOMPRESSED */
{ "NA Sniffer (DOS)", "ngsniffer", "*.cap;*.enc;*.trc;*.fdc;*.syc", ".cap", FALSE, FALSE,

View File

@ -947,7 +947,19 @@ static const int wtap_encap[] = {
/* Returns 0 if we could write the specified encapsulation type,
an error indication otherwise. */
int netmon_dump_can_write_encap(int encap)
int netmon_dump_can_write_encap_1_x(int encap)
{
/*
* Per-packet encapsulations are *not* supported in NetMon 1.x
* format.
*/
if (encap < 0 || (unsigned) encap >= NUM_WTAP_ENCAPS || wtap_encap[encap] == -1)
return WTAP_ERR_UNSUPPORTED_ENCAP;
return 0;
}
int netmon_dump_can_write_encap_2_x(int encap)
{
/*
* Per-packet encapsulations are supported in NetMon 2.1

View File

@ -28,6 +28,7 @@
int netmon_open(wtap *wth, int *err, gchar **err_info);
gboolean netmon_dump_open(wtap_dumper *wdh, int *err);
int netmon_dump_can_write_encap(int encap);
int netmon_dump_can_write_encap_1_x(int encap);
int netmon_dump_can_write_encap_2_x(int encap);
#endif