SPLIT more... use .FN_HDR???
[metze/wireshark/wip.git] / extcap_parser.h
index 5f12037014afa0ab1b53ffdfa700c2cb7f238abe..a05f4de6ae2461f947ba15ac56457956f815c1ef 100644 (file)
@@ -4,19 +4,7 @@
  * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
 #ifndef __EXTCAP_PARSER_H__
@@ -34,7 +22,8 @@ typedef enum {
     EXTCAP_SENTENCE_VALUE,
     EXTCAP_SENTENCE_EXTCAP,
     EXTCAP_SENTENCE_INTERFACE,
-    EXTCAP_SENTENCE_DLT
+    EXTCAP_SENTENCE_DLT,
+    EXTCAP_SENTENCE_CONTROL
 } extcap_sentence_type;
 
 typedef enum {
@@ -52,7 +41,8 @@ typedef enum {
     EXTCAP_ARG_SELECTOR,
     EXTCAP_ARG_RADIO,
     EXTCAP_ARG_MULTICHECK,
-    EXTCAP_ARG_FILESELECT
+    EXTCAP_ARG_FILESELECT,
+    EXTCAP_ARG_TIMESTAMP
 } extcap_arg_type;
 
 typedef enum {
@@ -67,16 +57,21 @@ typedef enum {
     EXTCAP_PARAM_VALUE,
     EXTCAP_PARAM_RANGE,
     EXTCAP_PARAM_TOOLTIP,
+    EXTCAP_PARAM_PLACEHOLDER,
     EXTCAP_PARAM_NAME,
     EXTCAP_PARAM_ENABLED,
     EXTCAP_PARAM_FILE_MUSTEXIST,
     EXTCAP_PARAM_FILE_EXTENSION,
+    EXTCAP_PARAM_GROUP,
     EXTCAP_PARAM_PARENT,
     EXTCAP_PARAM_REQUIRED,
+    EXTCAP_PARAM_RELOAD,
     EXTCAP_PARAM_SAVE,
     EXTCAP_PARAM_VALIDATION,
     EXTCAP_PARAM_VERSION,
-    EXTCAP_PARAM_HELP
+    EXTCAP_PARAM_HELP,
+    EXTCAP_PARAM_CONTROL,
+    EXTCAP_PARAM_ROLE
 } extcap_param_type;
 
 #define ENUM_KEY(s) GUINT_TO_POINTER((guint)s)
@@ -107,6 +102,7 @@ typedef struct _extcap_arg {
     gchar *call;
     gchar *display;
     gchar *tooltip;
+    gchar *placeholder;
 
     gchar * fileextension;
     gboolean fileexists;
@@ -114,15 +110,19 @@ typedef struct _extcap_arg {
     gboolean is_required;
     gboolean save;
 
+    gboolean reload;
+
     gchar * regexp;
 
+    gchar * group;
+
     extcap_arg_type arg_type;
 
     extcap_complex *range_start;
     extcap_complex *range_end;
     extcap_complex *default_complex;
 
-    gchar * storeval;
+    gchar ** pref_valptr; /**< A copy of the pointer containing the current preference value. */
     gchar * device_name;
 
     GList * values;
@@ -193,8 +193,11 @@ void extcap_free_arg_list(GList *a);
 /* Parse all sentences for args and values */
 GList * extcap_parse_args(gchar *output);
 
+/* Parse all sentences for values */
+GList * extcap_parse_values(gchar *output);
+
 /* Parse all sentences for interfaces */
-GList * extcap_parse_interfaces(gchar *output);
+GList * extcap_parse_interfaces(gchar *output, GList **control_items);
 
 /* Parse all sentences for DLTs */
 GList * extcap_parse_dlts(gchar *output);