diff options
author | Roland Knall <roland.knall@br-automation.com> | 2018-04-05 10:02:27 +0200 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2018-04-05 08:40:04 +0000 |
commit | c2422d78281e10beb6ce4ebda1d61c9d0ca63a09 (patch) | |
tree | 47bf7d32733d50da52e5adab94776c07dc175a06 /extcap/extcap-base.c | |
parent | 5d8964cd3b6362615571831ef1bbe5c8cc972516 (diff) |
extcap: Tell utilities the wireshark version
Add an optional argument to extcap-version, which tells the utilities
the wireshark version and therefore allows them to handle different
versions differently.
If no version is provided, the utility has to assume it is dealing
with a Wireshark 2.x version (default behavior).
Change-Id: I51658300f28f503ca8050d204b73749f1a54df16
Reviewed-on: https://code.wireshark.org/review/26752
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'extcap/extcap-base.c')
-rw-r--r-- | extcap/extcap-base.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/extcap/extcap-base.c b/extcap/extcap-base.c index 6ec654c790..45713adfd6 100644 --- a/extcap/extcap-base.c +++ b/extcap/extcap-base.c @@ -171,6 +171,7 @@ uint8_t extcap_base_parse_options(extcap_parameters * extcap, int result, char * extcap->do_list_interfaces = 1; break; case EXTCAP_OPT_VERSION: + extcap->ws_version = g_strdup(optargument); extcap->do_version = 1; break; case EXTCAP_OPT_LIST_DLTS: @@ -297,6 +298,7 @@ void extcap_base_cleanup(extcap_parameters ** extcap) g_free((*extcap)->version); g_free((*extcap)->helppage); g_free((*extcap)->help_header); + g_free((*extcap)->ws_version); g_list_foreach((*extcap)->help_options, (GFunc)extcap_help_option_free, NULL); g_list_free((*extcap)->help_options); g_free(*extcap); |