diff options
author | Roland Knall <roland.knall@br-automation.com> | 2016-09-05 07:54:47 +0200 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2016-09-07 09:09:30 +0000 |
commit | ee1a4109cfc8fb314d151f59859a348765ba9dbf (patch) | |
tree | 36f0efeb8e85e339824ce3d63841f87385ab971b /extcap_parser.c | |
parent | 859cf86c8d25b7ead113821ece4e9dec853e70d6 (diff) |
extcap: Add tool-specified helppage
Allow the tool to provide a link to a helppage, displayed
by clicking on help in the configuration dialog.
The URL will be opened using an URL based service, therefore local
as well as remote URLs are possible.
Change-Id: I58b30244e97919d5cf6892faf96536ddc30fb5a7
Reviewed-on: https://code.wireshark.org/review/17549
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'extcap_parser.c')
-rw-r--r-- | extcap_parser.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/extcap_parser.c b/extcap_parser.c index f2271399d9..f9e2c856ea 100644 --- a/extcap_parser.c +++ b/extcap_parser.c @@ -188,6 +188,8 @@ static extcap_token_sentence *extcap_tokenize_sentence(const gchar *s) { param_type = EXTCAP_PARAM_VALIDATION; } else if (g_ascii_strcasecmp(arg, "version") == 0) { param_type = EXTCAP_PARAM_VERSION; + } else if (g_ascii_strcasecmp(arg, "help") == 0) { + param_type = EXTCAP_PARAM_HELP; } else { param_type = EXTCAP_PARAM_UNKNOWN; } @@ -550,11 +552,7 @@ static extcap_interface * extcap_parse_interface_sentence(extcap_token_sentence if (sent == EXTCAP_SENTENCE_UNKNOWN) return NULL; - ri = g_new(extcap_interface, 1); - - ri->call = NULL; - ri->display = NULL; - ri->version = NULL; + ri = g_new0(extcap_interface, 1); ri->if_type = sent; @@ -580,6 +578,11 @@ static extcap_interface * extcap_parse_interface_sentence(extcap_token_sentence ri->version = g_strdup(param_value); } + if ((param_value = (gchar *)g_hash_table_lookup(s->param_list, ENUM_KEY(EXTCAP_PARAM_HELP))) + != NULL) { + ri->help = g_strdup(param_value); + } + return ri; } |