aboutsummaryrefslogtreecommitdiffstats
path: root/ui/capture.h
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-07-14 22:16:30 -0700
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-07-15 05:43:36 +0000
commit0a9ef601d201f87ff3effb8aca62c61184fd6146 (patch)
treece64e2ddc50cdf76bbc4dc785e069a50a820c7b4 /ui/capture.h
parent94ac641efabc9830bc91db1c793bf0ba42f1e46c (diff)
Clean up handling of --capture-comment.
Don't store the comments in a capture_options structure, because that's available only if we're being built with capture support, and --capture-comment can be used in TShark when reading a capture file and writing another capture file, with no live capture taking place. This means we don't handle that option in capture_opts_add_opt(); handle it in the programs that support it. Support writing multiple comments in dumpcap when capturing. These changes also fix builds without pcap, and makes --capture-comment work in Wireshark when a capture is started from the command line with -k. Update the help messages to indicate that --capture-comment adds a capture comment, it doesn't change any comment (much less "the" comment, as there isn't necessarily a single comment). Update the man pages: - not to presume that only pcapng files support file comments (even if that's true now, it might not be true in the future); - to note that multiple instances of --capture-comment are supported, and that multiple comments will be written, whether capturing or reading one file and writing another; - clarify that Wireshark doesn't *discard* SHB comments other than the first one, even though it only displays the first one;
Diffstat (limited to 'ui/capture.h')
-rw-r--r--ui/capture.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/capture.h b/ui/capture.h
index 6589dfc8e7..f02e18ed92 100644
--- a/ui/capture.h
+++ b/ui/capture.h
@@ -60,13 +60,17 @@ capture_input_init(capture_session *cap_session, capture_file *cf);
* Start a capture session.
*
* @param capture_opts the numerous capture options
+ * @param capture_comments if not NULL, a GPtrArray * to a set of comments
+ * to put in the capture file's Section Header Block if it's a pcapng file
* @param cap_session the handle for the capture session
* @param cap_data a struct with capture info data
* @param update_cb update screen
* @return TRUE if the capture starts successfully, FALSE otherwise.
*/
extern gboolean
-capture_start(capture_options *capture_opts, capture_session *cap_session, info_data_t* cap_data, void(*update_cb)(void));
+capture_start(capture_options *capture_opts, GPtrArray *capture_comments,
+ capture_session *cap_session, info_data_t* cap_data,
+ void(*update_cb)(void));
/** Stop a capture session (usually from a menu item). */
extern void