From 6c44f2017c891e15045fca5c5cff79acd48ad4e5 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Fri, 26 May 2017 07:52:17 -0400 Subject: Qt: Add support to verify extcap capture filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: 11668 Change-Id: Ib218d87c1905e53ffdab4e3dd6f93ba2c3d07c8b Reviewed-on: https://code.wireshark.org/review/21770 Petri-Dish: Stig Bjørlykke Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann Reviewed-by: Roland Knall --- extcap.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'extcap.h') 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 @@ -107,6 +113,16 @@ extcap_clear_interfaces(void); 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. -- cgit v1.2.1