Fix "disable this protocol by default".
[jlayton/wireshark.git] / extcap.h
index fa334c59c6e5cb3539a60887fdb7bdea629edcee..509e007a5eadecd00bcb91d3628202fc05030d17 100644 (file)
--- a/extcap.h
+++ b/extcap.h
@@ -35,7 +35,9 @@
 
 #include <ui/capture_ui_utils.h>
 
-#ifdef HAVE_EXTCAP
+/* As boolean flags will be allowed any form of yes, true or any number != 0 (or starting with 0)
+ * The regex will be matched case-insensitive, so only the lower-case is defined here. */
+#define EXTCAP_BOOLEAN_REGEX "^.*([yt1-9])"
 
 /* Prefix for the pipe interfaces */
 #define EXTCAP_PIPE_PREFIX "wireshark_extcap"
 #define EXTCAP_ARGUMENT_CAPTURE_FILTER          "--extcap-capture-filter"
 #define EXTCAP_ARGUMENT_RUN_PIPE                "--fifo"
 
+typedef struct _extcap_info {
+    gchar * basename;
+    gchar * full_path;
+    gchar * version;
+} extcap_info;
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
 
+/* Registers preferences for all interfaces */
+void
+extcap_register_preferences(void);
+
 /* try to get if capabilities from extcap */
 if_capabilities_t *
 extcap_get_if_dlts(const gchar * ifname, char ** err_str);
 
-/* get a list of all capture interfaces */
+/* append a list of all extcap capture interfaces to the specified list */
 GList *
-extcap_interface_list(char **err_str);
+append_extcap_interface_list(GList *list, char **err_str);
+
+/* get a list of all available extcap tools */
+GHashTable *
+extcap_tools_list(void);
 
 /* returns the configuration for the given interface name, or an
  * empty list, if no configuration has been found */
@@ -69,6 +85,9 @@ extcap_get_if_configuration(const char * ifname);
 gboolean
 extcap_has_configuration(const char * ifname, gboolean is_required);
 
+/* converts an extcap setting to its equivalent preference key */
+gchar * extcap_settings_key(const gchar * ifname, const gchar * setting);
+
 #ifdef WIN32
 HANDLE
 extcap_get_win32_handle();
@@ -89,8 +108,6 @@ extcap_cleanup(capture_options * capture_opts _U_);
 
 #endif
 
-#endif
-
 /*
  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
  *