aboutsummaryrefslogtreecommitdiffstats
path: root/capinfos.c
diff options
context:
space:
mode:
Diffstat (limited to 'capinfos.c')
-rw-r--r--capinfos.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/capinfos.c b/capinfos.c
index 5f227e6afe..bed9cfe2a8 100644
--- a/capinfos.c
+++ b/capinfos.c
@@ -177,41 +177,41 @@ typedef enum {
} order_t;
typedef struct _capture_info {
- const char *filename;
- guint16 file_type;
- gboolean iscompressed;
- int file_encap;
- int file_tsprec;
- gint64 filesize;
- wtap_block_t shb;
- guint64 packet_bytes;
- gboolean times_known;
- nstime_t start_time;
- int start_time_tsprec;
- nstime_t stop_time;
- int stop_time_tsprec;
- guint32 packet_count;
- gboolean snap_set; /* If set in capture file header */
- guint32 snaplen; /* value from the capture file header */
- guint32 snaplen_min_inferred; /* If caplen < len for 1 or more rcds */
- guint32 snaplen_max_inferred; /* ... */
- gboolean drops_known;
- guint32 drop_count;
-
- nstime_t duration;
- int duration_tsprec;
- double packet_rate;
- double packet_size;
- double data_rate; /* in bytes */
- gboolean know_order;
- order_t order;
-
- int *encap_counts; /* array of per_packet encap counts; array has one entry per wtap_encap type */
-
- guint num_interfaces; /* number of IDBs, and thus size of interface_packet_counts array */
- GArray *interface_packet_counts; /* array of per_packet interface_id counts; one entry per file IDB */
- guint32 pkt_interface_id_unknown; /* counts if packet interface_id didn't match a known one */
- GArray *idb_info_strings; /* array of IDB info strings */
+ const char *filename;
+ guint16 file_type;
+ wtap_compression_type compression_type;
+ int file_encap;
+ int file_tsprec;
+ gint64 filesize;
+ wtap_block_t shb;
+ guint64 packet_bytes;
+ gboolean times_known;
+ nstime_t start_time;
+ int start_time_tsprec;
+ nstime_t stop_time;
+ int stop_time_tsprec;
+ guint32 packet_count;
+ gboolean snap_set; /* If set in capture file header */
+ guint32 snaplen; /* value from the capture file header */
+ guint32 snaplen_min_inferred; /* If caplen < len for 1 or more rcds */
+ guint32 snaplen_max_inferred; /* ... */
+ gboolean drops_known;
+ guint32 drop_count;
+
+ nstime_t duration;
+ int duration_tsprec;
+ double packet_rate;
+ double packet_size;
+ double data_rate; /* in bytes/s */
+ gboolean know_order;
+ order_t order;
+
+ int *encap_counts; /* array of per_packet encap counts; array has one entry per wtap_encap type */
+
+ guint num_interfaces; /* number of IDBs, and thus size of interface_packet_counts array */
+ GArray *interface_packet_counts; /* array of per_packet interface_id counts; one entry per file IDB */
+ guint32 pkt_interface_id_unknown; /* counts if packet interface_id didn't match a known one */
+ GArray *idb_info_strings; /* array of IDB info strings */
} capture_info;
static char *decimal_point;
@@ -585,7 +585,7 @@ print_stats(const gchar *filename, capture_info *cf_info)
if (filename) printf ("File name: %s\n", filename);
if (cap_file_type) printf ("File type: %s%s\n",
file_type_string,
- cf_info->iscompressed ? " (gzip compressed)" : "");
+ cf_info->compression_type == WTAP_GZIP_COMPRESSED ? " (gzip compressed)" : "");
if (cap_file_encap) {
printf ("File encapsulation: %s\n", file_encap_string);
@@ -1241,7 +1241,7 @@ process_cap_file(wtap *wth, const char *filename)
/* File Type */
cf_info.file_type = wtap_file_type_subtype(wth);
- cf_info.iscompressed = wtap_iscompressed(wth);
+ cf_info.compression_type = wtap_get_compression_type(wth);
/* File Encapsulation */
cf_info.file_encap = wtap_file_encap(wth);