aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-04-13 12:35:02 -0700
committerGuy Harris <gharris@sonic.net>2021-04-13 12:38:06 -0700
commit60e339bba4926cd3d299b142896a1d475d81e00d (patch)
tree377fd32095877343b142a0ca9d0eb9dd5ea6050c /capture_opts.c
parent6ab7435af8ed5f01ce6aaa903aee6ac2ecb06119 (diff)
Don't handle -k in capture_opts_add_opt().
It's not a generic capture option also supported by TShark and dumpcap, it's Wireshark-specific (dumpcap *always* starts a capture, and TShark starts one iff it's passed one or more interfaces on which to capture; only Wireshark needs it to start the capture immediately - that's a relic of the days when Wireshark *itself* did what dumpcap now does for Wireshark). Handle it in commandline_other_options(), rather than in capture_opts_add_opt(). That lets us get rid of an argument to capture_opts_add_opt(), and dummy variables in TShark and dumpcap used to work with that extra argument.
Diffstat (limited to 'capture_opts.c')
-rw-r--r--capture_opts.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/capture_opts.c b/capture_opts.c
index 6b0538d46f..e48fefa8ed 100644
--- a/capture_opts.c
+++ b/capture_opts.c
@@ -792,7 +792,7 @@ capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg_str
int
-capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg_str_p, gboolean *start_capture)
+capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg_str_p)
{
int status, snaplen;
@@ -881,9 +881,6 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg_
}
break;
#endif
- case 'k': /* Start capture immediately */
- *start_capture = TRUE;
- break;
/*case 'l':*/ /* Automatic scrolling in live capture mode */
#ifdef HAVE_PCAP_SETSAMPLING
case 'm':