diff options
author | Mike78 <michael.oed@gmail.com> | 2014-12-20 23:13:05 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-01-27 13:40:24 +0000 |
commit | ef752689da5cb948a6f40052342f597ee90bd0b6 (patch) | |
tree | cf22a118317bfba6bd2f3e12d12071b94ce306cb /tshark.c | |
parent | 522510060985eb9a59b22383636157a4cd199f89 (diff) |
Allow/Create an option to use "capture filter" labels defined in wireshark GUI from CLI
Move ui/filters.[ch] to filter_files.[ch] because dumpcap is using functionality.
Bug: 8091
Change-Id: I195c82fc023f97d6f331b8718c45a2d83d30faea
Reviewed-on: https://code.wireshark.org/review/5925
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -87,6 +87,7 @@ #include "ui/ui_util.h" #include "ui/cli/tshark-tap.h" #include "register.h" +#include "filter_files.h" #include <epan/epan_dissect.h> #include <epan/tap.h> #include <epan/stat_tap_ui.h> @@ -971,10 +972,12 @@ main(int argc, char *argv[]) char *gpf_path, *pf_path; char *gdp_path, *dp_path; + char *cf_path; int gpf_open_errno, gpf_read_errno; int pf_open_errno, pf_read_errno; int gdp_open_errno, gdp_read_errno; int dp_open_errno, dp_read_errno; + int cf_open_errno; int err; volatile int exit_status = 0; #ifdef HAVE_LIBPCAP @@ -1321,6 +1324,13 @@ main(int argc, char *argv[]) pf_path = NULL; } + read_filter_list(CFILTER_LIST, &cf_path, &cf_open_errno); + if (cf_path != NULL) { + cmdarg_err("Could not open your capture filter file\n\"%s\": %s.", + cf_path, g_strerror(cf_open_errno)); + g_free(cf_path); + } + /* Read the disabled protocols file. */ read_disabled_protos_list(&gdp_path, &gdp_open_errno, &gdp_read_errno, &dp_path, &dp_open_errno, &dp_read_errno); |