2011-09-08 09:35:10 +00:00
|
|
|
/* filter_expressions.h
|
|
|
|
* Submitted by Edwin Groothuis <wireshark@mavetju.org>
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-08 16:59:17 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2011-09-08 09:35:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __FILTER_EXPRESSIONS_H__
|
|
|
|
#define __FILTER_EXPRESSIONS_H__
|
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
#include "ws_symbol_export.h"
|
|
|
|
|
2017-06-22 15:34:48 +00:00
|
|
|
#include <epan/prefs.h>
|
2021-07-26 00:31:17 +00:00
|
|
|
#include <epan/wmem_scopes.h>
|
2017-06-22 15:34:48 +00:00
|
|
|
|
2013-02-06 19:12:14 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2015-02-20 21:44:27 +00:00
|
|
|
/** @file
|
|
|
|
* Filter expressions.
|
|
|
|
*/
|
|
|
|
|
2017-06-22 15:34:48 +00:00
|
|
|
typedef struct filter_expression {
|
2011-09-08 09:35:10 +00:00
|
|
|
gchar *label;
|
|
|
|
gchar *expression;
|
2017-06-25 15:48:46 +00:00
|
|
|
gchar *comment;
|
2011-09-08 09:35:10 +00:00
|
|
|
|
|
|
|
gboolean enabled; /* Can be set to FALSE by Preferences Dialog */
|
2017-06-22 15:34:48 +00:00
|
|
|
} filter_expression_t;
|
2011-09-08 09:35:10 +00:00
|
|
|
|
2017-06-22 15:34:48 +00:00
|
|
|
WS_DLL_PUBLIC void filter_expression_iterate_expressions(wmem_foreach_func func, void* user_data);
|
2011-09-08 09:35:10 +00:00
|
|
|
|
2015-02-20 21:44:27 +00:00
|
|
|
/** Create a filter expression
|
|
|
|
*
|
|
|
|
* @param label Label (button) text for the expression.
|
|
|
|
* @param expr The display filter for the expression.
|
2019-07-11 10:23:07 +00:00
|
|
|
* @param comment A comment about the filter.
|
2015-02-20 21:44:27 +00:00
|
|
|
* @param enabled Determines if the expression is shown in the UI.
|
|
|
|
* @return A newly allocated and initialized struct filter_expression.
|
|
|
|
*/
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC
|
2017-06-22 15:34:48 +00:00
|
|
|
filter_expression_t *filter_expression_new(const gchar *label,
|
2017-06-25 15:48:46 +00:00
|
|
|
const gchar *expr, const gchar *comment, const gboolean enabled);
|
2011-09-08 09:35:10 +00:00
|
|
|
|
2017-06-22 15:34:48 +00:00
|
|
|
/* Keep the UAT structure local to the filter_expressions */
|
|
|
|
void filter_expression_register_uat(module_t* pref_module);
|
2015-02-20 21:44:27 +00:00
|
|
|
|
2013-02-06 19:12:14 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2011-09-08 09:35:10 +00:00
|
|
|
#endif /* __FILTER_EXPRESSIONS_H__ */
|