|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Classes | |
| struct | _dfilter_macro_t |
| struct | dfilter_macro_table_iter |
Typedefs | |
| typedef struct _dfilter_macro_t | dfilter_macro_t |
Functions | |
| void | macro_parse (dfilter_macro_t *m) |
| Parses a macro and processes its components. | |
| char * | dfilter_macro_apply (const char *text, df_error_t **error) |
| Applies macros to a given text. | |
| void | dfilter_macro_init (const char *app_env_var_prefix) |
| Initialize the dfilter macro system with a given application environment variable prefix. | |
| WS_DLL_PUBLIC void | dfilter_macro_reload (const char *app_env_var_prefix) |
| Reloads dfilter macros from a configuration file. | |
| void | dfilter_macro_cleanup (void) |
| Cleans up the macro table by destroying it and setting the pointer to NULL. | |
| WS_DLL_PUBLIC size_t | dfilter_macro_table_count (void) |
| Returns the count of macros in the macro table. | |
| WS_DLL_PUBLIC void | dfilter_macro_table_iter_init (struct dfilter_macro_table_iter *iter) |
| Initialize an iterator for traversing a macro table. | |
| WS_DLL_PUBLIC bool | dfilter_macro_table_iter_next (struct dfilter_macro_table_iter *iter, const char **name_ptr, const char **text_ptr) |
| Move to the next macro in the iterator. | |
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 2001 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
| char * dfilter_macro_apply | ( | const char * | text, |
| df_error_t ** | error | ||
| ) |
Applies macros to a given text.
| text | The input text containing macros. |
| error | Pointer to a df_error_t object for storing errors, if any. |
| void dfilter_macro_cleanup | ( | void | ) |
Cleans up the macro table by destroying it and setting the pointer to NULL.
This function is responsible for freeing all resources associated with the macro table, including any dynamically allocated memory, and resetting the pointer to ensure that subsequent operations on the macro table will fail gracefully.
| void dfilter_macro_init | ( | const char * | app_env_var_prefix | ) |
Initialize the dfilter macro system with a given application environment variable prefix.
This function initializes the dfilter macro system by creating a new hash table for storing macros and reloading them using the provided prefix.
| app_env_var_prefix | The prefix of the application environment variables to use for loading macros. |
| WS_DLL_PUBLIC void dfilter_macro_reload | ( | const char * | app_env_var_prefix | ) |
Reloads dfilter macros from a configuration file.
This function reloads dfilter macros by converting an old configuration file if necessary, removing all existing macros, and reading new macros from a filter list.
| app_env_var_prefix | The prefix for the application environment variable. |
| WS_DLL_PUBLIC size_t dfilter_macro_table_count | ( | void | ) |
Returns the count of macros in the macro table.
This function returns the number of macros currently stored in the macro table.
| WS_DLL_PUBLIC void dfilter_macro_table_iter_init | ( | struct dfilter_macro_table_iter * | iter | ) |
Initialize an iterator for traversing a macro table.
| iter | Pointer to the iterator structure that will be initialized. |
| WS_DLL_PUBLIC bool dfilter_macro_table_iter_next | ( | struct dfilter_macro_table_iter * | iter, |
| const char ** | name_ptr, | ||
| const char ** | text_ptr | ||
| ) |
Move to the next macro in the iterator.
| iter | Iterator for the macro table. |
| name_ptr | Pointer to store the name of the current macro, if not NULL. |
| text_ptr | Pointer to store the text of the current macro, if not NULL. |
| void macro_parse | ( | dfilter_macro_t * | m | ) |
Parses a macro and processes its components.
This function takes a pointer to a dfilter_macro_t structure and parses it, extracting parts and arguments as necessary and storing it within the dfilter_macro_t.
| m | Pointer to the dfilter_macro_t structure to be parsed. |