From 11a9a501fb004bd3259f457714670ffb6d3d21e9 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 31 Oct 2018 10:03:04 +0100 Subject: Dumpcap+Qt: Add support for `-a packets:NUM` and `-b packets:NUM`. Add the ability to rotate files after a specified number of packets (`-b packets:NUM`). Move some condition checks to capture_loop_write_packet_cb. Add `-a packets:NUM` in order to be consistent. It is functionally equivalent to the `-c` flag. Add a corresponding "packets" option to the Capture Interfaces dialog Output tab. Add initial tests for autostop and ringbuffer conditions. Change-Id: I66eb968927ed287deb8edb96db96d7c73526c257 Reviewed-on: https://code.wireshark.org/review/30534 Reviewed-by: Gerald Combs Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- capture_opts.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'capture_opts.h') diff --git a/capture_opts.h b/capture_opts.h index a403b495a2..8f2e9648ea 100644 --- a/capture_opts.h +++ b/capture_opts.h @@ -293,13 +293,16 @@ typedef struct capture_options_tag { gdouble file_duration; /**< Switch file after n seconds */ gboolean has_file_interval; /**< TRUE if ring interval specified */ gint32 file_interval; /**< Create time intervals of n seconds */ + gboolean has_file_packets; /**< TRUE if ring packet count is + specified */ + int file_packets; /**< Switch file after n packets */ gboolean has_ring_num_files; /**< TRUE if ring num_files specified */ guint32 ring_num_files; /**< Number of multiple buffer files */ /* autostop conditions */ gboolean has_autostop_files; /**< TRUE if maximum number of capture files are specified */ - gint32 autostop_files; /**< Maximum number of capture files */ + int autostop_files; /**< Maximum number of capture files */ gboolean has_autostop_packets; /**< TRUE if maximum packet count is specified */ -- cgit v1.2.3