aboutsummaryrefslogtreecommitdiffstats
path: root/extcap.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-05-26 07:52:17 -0400
committerRoland Knall <rknall@gmail.com>2017-05-30 18:10:03 +0000
commit6c44f2017c891e15045fca5c5cff79acd48ad4e5 (patch)
treee7270e94624e201819100fc67865cc938c608023 /extcap.h
parent44327d8a6c7a312642adcec775555ab8a3430787 (diff)
Qt: Add support to verify extcap capture filter
Bug: 11668 Change-Id: Ib218d87c1905e53ffdab4e3dd6f93ba2c3d07c8b Reviewed-on: https://code.wireshark.org/review/21770 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'extcap.h')
-rw-r--r--extcap.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/extcap.h b/extcap.h
index 297745ee63..addf30fad7 100644
--- a/extcap.h
+++ b/extcap.h
@@ -62,6 +62,12 @@ typedef struct _extcap_info {
GList * interfaces;
} extcap_info;
+typedef enum {
+ EXTCAP_FILTER_UNKNOWN,
+ EXTCAP_FILTER_VALID,
+ EXTCAP_FILTER_INVALID
+} extcap_filter_status;
+
struct _extcap_arg;
#ifdef __cplusplus
@@ -108,6 +114,16 @@ GList *
extcap_get_if_configuration(const char * ifname);
/**
+ * Check if the capture filter for the given interface name is valid.
+ * @param ifname Interface to check
+ * @param filter Capture filter to check
+ * @param err_str Error string returned if filter is invalid
+ * @return Filter check status.
+ */
+extcap_filter_status
+extcap_verify_capture_filter(const char *ifname, const char *filter, gchar **err_str);
+
+/**
* Frees the memory from extcap_get_if_configuration.
* @param list The list returned by extcap_get_if_configuration.
* @param free_args TRUE if all arguments in the list must be freed too or FALSE