diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-02-16 18:58:40 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-02-16 18:58:40 +0000 |
commit | 55001ef1989ef30f1cab74e513193e11a4344d7f (patch) | |
tree | fe72535c08298fbb0d41cb5d6491eb221913dc5e /file.c | |
parent | 149f655c58229153e7045ea5a4cb91bf54299b7d (diff) |
With the WTAP_ERR_UNSUPPORTED error, Wiretap supplies a string giving
the details of what in particular is unsupported; report it in TShark
and Wireshark.
Handle WTAP_ERR_RANDOM_OPEN_PIPE in TShark.
Handle WTAP_ERR_COMPRESSION_NOT_SUPPORTED in TShark, and have its error
message in Wireshark not speak of gzip, in case we support compressed
output in other formats in the future.
If we see a second section header block in a pcap-NG file, don't report
it as "the file is corrupted", report it as "the file uses a feature we
don't support", as that's the case - and don't free up the interface
data array, as the file remains open, and Wireshark might still try to
access the packets we were able to read.
svn path=/trunk/; revision=41041
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -688,6 +688,14 @@ cf_read(capture_file *cf, gboolean from_save) if any. */ switch (err) { + case WTAP_ERR_UNSUPPORTED: + g_snprintf(errmsg_errno, sizeof(errmsg_errno), + "The capture file contains record data that TShark doesn't support.\n(%s)", + err_info); + g_free(err_info); + errmsg = errmsg_errno; + break; + case WTAP_ERR_UNSUPPORTED_ENCAP: g_snprintf(errmsg_errno, sizeof(errmsg_errno), "The capture file has a packet with a network type that Wireshark doesn't support.\n(%s)", @@ -3996,7 +4004,7 @@ cf_open_failure_alert_box(const char *filename, int err, gchar *err_info, case WTAP_ERR_COMPRESSION_NOT_SUPPORTED: simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, - "Gzip compression not supported by this file type."); + "This file type cannot be written as a compressed file."); break; case WTAP_ERR_DECOMPRESS: |