diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-02-09 18:45:14 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-02-10 03:44:10 +0000 |
commit | 0b649a09100813151555308d6ccdbd18ec43accd (patch) | |
tree | 1e44ea0caf3c164e8851156a45f448ad7c3c5cb4 /ui/file_dialog.h | |
parent | 9797f340747e3f47191fe6b8df2dee657aa2179d (diff) |
Separately count all records and data records.
A file might contain only metadata records, which exist only to provide
information needed to interpret data records; no point in showing them
in record counts.
Put the counts into the structure that we fill in, and rename the
structure and the routine to reflect that it determines statistics other
than just times.
Speak of data records rather than packets; the file might be full of
Sysdig event records but not have any packets in it, for example.
Change-Id: I8553181dca4129736bdae2c0cbba92becc28d6ef
Reviewed-on: https://code.wireshark.org/review/25722
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/file_dialog.h')
-rw-r--r-- | ui/file_dialog.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/ui/file_dialog.h b/ui/file_dialog.h index 5cc455082d..b77213ec98 100644 --- a/ui/file_dialog.h +++ b/ui/file_dialog.h @@ -32,20 +32,22 @@ typedef enum { } export_type_e; typedef struct { - double start_time; /* seconds, with nsec resolution */ - double stop_time; /* seconds, with nsec resolution */ -} ws_file_preview_times; + gboolean have_times; /* TRUE if we have start and stop times */ + double start_time; /* seconds, with nsec resolution */ + double stop_time; /* seconds, with nsec resolution */ + guint32 records; /* total number of records */ + guint32 data_records; /* number of data records */ +} ws_file_preview_stats; typedef enum { - PREVIEW_HAVE_TIMES, - PREVIEW_HAVE_NO_TIMES, + PREVIEW_SUCCEEDED, PREVIEW_TIMED_OUT, PREVIEW_READ_ERROR -} ws_file_preview_times_status; +} ws_file_preview_stats_status; -extern ws_file_preview_times_status -get_times_for_preview(wtap *wth, ws_file_preview_times *times, - guint32 *num_packets, int *err, gchar **err_info); +extern ws_file_preview_stats_status +get_stats_for_preview(wtap *wth, ws_file_preview_stats *stats, + int *err, gchar **err_info); #ifdef __cplusplus } |