diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-05-24 05:05:29 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-05-24 05:05:29 +0000 |
commit | cf6d9841e37906448ad1a571a648140325efcae0 (patch) | |
tree | 8e14522dbdae5295fd41a236e7f9e49daab36c4e /capinfos.c | |
parent | 73888ed977e7ba3356d3c5e31c182508d576dfc1 (diff) | |
download | wireshark-cf6d9841e37906448ad1a571a648140325efcae0.tar.gz wireshark-cf6d9841e37906448ad1a571a648140325efcae0.tar.bz2 wireshark-cf6d9841e37906448ad1a571a648140325efcae0.zip |
Keep track, in Wiretap, of whether the file is compressed, and provide
an API to fetch that.
When doing "Save" on a compressed file, write it out compressed.
In the Statistics -> Summary dialog and in capinfos, report whether the
file is gzip-compressed.
svn path=/trunk/; revision=42818
Diffstat (limited to 'capinfos.c')
-rw-r--r-- | capinfos.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/capinfos.c b/capinfos.c index 4ffc0646f3..7c67bb2605 100644 --- a/capinfos.c +++ b/capinfos.c @@ -191,6 +191,7 @@ typedef enum { typedef struct _capture_info { const char *filename; guint16 file_type; + gboolean iscompressed; int file_encap; gint64 filesize; @@ -358,7 +359,9 @@ print_stats(const gchar *filename, capture_info *cf_info) stop_time_t = (time_t)cf_info->stop_time; if (filename) printf ("File name: %s\n", filename); - if (cap_file_type) printf ("File type: %s\n", file_type_string); + if (cap_file_type) printf ("File type: %s%s\n", + file_type_string, + cf_info->iscompressed ? " (gzip compressed)" : ""); if (cap_file_encap) printf ("File encapsulation: %s\n", file_encap_string); if (cap_file_encap && (cf_info->file_encap == WTAP_ENCAP_PER_PACKET)) { int i; @@ -749,6 +752,7 @@ process_cap_file(wtap *wth, const char *filename) /* File Type */ cf_info.file_type = wtap_file_type(wth); + cf_info.iscompressed = wtap_iscompressed(wth); /* File Encapsulation */ cf_info.file_encap = wtap_file_encap(wth); |