|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
#include <wireshark.h>Go to the source code of this file.
Classes | |
| struct | filter_def |
| Represents a single filter entry. More... | |
| struct | filter_list_t |
| Represents a list of filters of a specific type. More... | |
Macros | |
| #define | CFILTER_FILE_NAME "cfilters" |
| #define | DFILTER_FILE_NAME "dfilters" |
| #define | DMACROS_FILE_NAME "dmacros" |
Enumerations | |
| enum | filter_list_type_t { CFILTER_LIST , DFILTER_LIST , DMACROS_LIST } |
| Types of filter lists supported. More... | |
Functions | |
| WS_DLL_PUBLIC WS_RETNONNULL filter_list_t * | ws_filter_list_read (filter_list_type_t list_type, const char *app_env_var_prefix) |
| Reads a list of filters from persistent storage. | |
| WS_DLL_PUBLIC void | ws_filter_list_add (filter_list_t *list, const char *name, const char *expression) |
| Adds a new filter to the end of a filter list. | |
| WS_DLL_PUBLIC GList * | ws_filter_list_find (filter_list_t *list, const char *name) |
| Finds a filter in a list by name. | |
| WS_DLL_PUBLIC bool | ws_filter_list_remove (filter_list_t *list, const char *name) |
| Removes a filter from a list by name. | |
| WS_DLL_PUBLIC void | ws_filter_list_write (filter_list_t *list, const char *app_env_var_prefix) |
| Writes a filter list to persistent storage. | |
| WS_DLL_PUBLIC void | ws_filter_list_free (filter_list_t *list) |
| Frees all memory associated with a filter list. | |
Declarations of routines for reading and writing the filters file.
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
| enum filter_list_type_t |
| WS_DLL_PUBLIC void ws_filter_list_add | ( | filter_list_t * | list, |
| const char * | name, | ||
| const char * | expression | ||
| ) |
Adds a new filter to the end of a filter list.
Appends a filter with the given name and expression to the specified list.
| list | The filter list to modify. |
| name | The name of the new filter. |
| expression | The filter expression (e.g., display or capture syntax). |
| WS_DLL_PUBLIC GList * ws_filter_list_find | ( | filter_list_t * | list, |
| const char * | name | ||
| ) |
Finds a filter in a list by name.
Searches the filter list for an entry matching the given name.
| list | The filter list to search. |
| name | The name of the filter to find. |
| WS_DLL_PUBLIC void ws_filter_list_free | ( | filter_list_t * | list | ) |
Frees all memory associated with a filter list.
Cleans up and releases resources used by the filter list.
| list | The filter list to free. |
| WS_DLL_PUBLIC WS_RETNONNULL filter_list_t * ws_filter_list_read | ( | filter_list_type_t | list_type, |
| const char * | app_env_var_prefix | ||
| ) |
Reads a list of filters from persistent storage.
Loads the specified type of filter list (e.g., display, capture) from disk or configuration. On error, a message is reported via the UI.
| list_type | The type of filter list to read. |
| app_env_var_prefix | The prefix for the application environment variable used to get the personal config directory. |
| WS_DLL_PUBLIC bool ws_filter_list_remove | ( | filter_list_t * | list, |
| const char * | name | ||
| ) |
Removes a filter from a list by name.
Deletes the filter entry with the specified name from the list.
| list | The filter list to modify. |
| name | The name of the filter to remove. |
| WS_DLL_PUBLIC void ws_filter_list_write | ( | filter_list_t * | list, |
| const char * | app_env_var_prefix | ||
| ) |
Writes a filter list to persistent storage.
Saves the current filter list to disk or configuration. On error, a message is reported via the UI.
| list | The filter list to write. |
| app_env_var_prefix | The prefix for the application environment variable used to get the personal config directory. |