|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Classes | |
| struct | df_reference_t |
| struct | df_cell_t |
| struct | df_cell_iter_t |
| struct | epan_dfilter |
| struct | dfstate_t |
| struct | dfsyntax_t |
| struct | dfwork_t |
Macros | |
| #define | SCAN_FAILED -1 /* not 0, as that means end-of-input */ |
| #define | df_cell_ptr(rp) ((rp)->array) |
Functions | |
| void * | DfilterAlloc (void *(*)(size_t)) |
| void | DfilterFree (void *, void(*)(void *)) |
| void | Dfilter (void *, int, stnode_t *, dfsyntax_t *) |
| WS_DLL_PUBLIC void | dfilter_vfail (void *state, int code, df_loc_t err_loc, const char *format, va_list args) |
| Report a failure in a display filter. | |
| WS_DLL_PUBLIC void | dfilter_fail (void *state, int code, df_loc_t err_loc, const char *format,...) |
| Handle a filter failure and log an error message. | |
| WS_DLL_PUBLIC WS_NORETURN void | dfilter_fail_throw (void *state, int code, df_loc_t err_loc, const char *format,...) |
| Throw a filter failure with an error message. | |
| void | dfw_set_error_location (dfwork_t *dfw, df_loc_t err_loc) |
| Set the error location for a given dfwork_t object. | |
| void | add_deprecated_token (GPtrArray *deprecated, const char *token) |
| Adds a deprecated token to an array. | |
| void | add_compile_warning (dfwork_t *dfw, const char *format,...) |
| Adds a compile warning to the given dfwork_t structure. | |
| void | free_deprecated (GPtrArray *deprecated) |
| Frees memory allocated for deprecated items. | |
| void | DfilterTrace (FILE *TraceFILE, char *zTracePrompt) |
| Writes a trace prompt to the specified file. | |
| header_field_info * | dfilter_resolve_unparsed (const char *name, GPtrArray *deprecated) |
| Resolve an unparsed filter name to a header field info. | |
| bool | dfilter_fvalue_from_literal (dfwork_t *dfw, ftenum_t ftype, stnode_t *st, bool allow_partial_value, header_field_info *hfinfo_value_string) |
| Creates a fvalue from a literal string. | |
| bool | dfilter_fvalue_from_string (dfwork_t *dfw, ftenum_t ftype, stnode_t *st, header_field_info *hfinfo_value_string) |
| Converts a string to a filter value. | |
| void | dfilter_fvalue_from_charconst (dfwork_t *dfw, ftenum_t ftype, stnode_t *st) |
| Create a new filter value from a character constant. | |
| void | dfilter_fvalue_from_number (dfwork_t *dfw, ftenum_t ftype, stnode_t *st) |
| Create an filter value from a number token. | |
| const char * | tokenstr (int token) |
| Retrieves a string representation of a token. | |
| df_reference_t * | reference_new (const field_info *finfo, bool raw) |
| Creates a new reference for a field. | |
| void | reference_free (df_reference_t *ref) |
| Frees a reference. | |
| WS_DLL_PUBLIC void | df_cell_append (df_cell_t *rp, fvalue_t *fv) |
| Append a fvalue to a df_cell. | |
| WS_DLL_PUBLIC GPtrArray * | df_cell_ref (df_cell_t *rp) |
| Get a reference to the array in a df_cell_t structure. | |
| WS_DLL_PUBLIC size_t | df_cell_size (const df_cell_t *rp) |
| Get the size of a df_cell_t. | |
| WS_DLL_PUBLIC fvalue_t ** | df_cell_array (const df_cell_t *rp) |
| Retrieves an array of fvalue_t pointers from a df_cell_t. | |
| WS_DLL_PUBLIC bool | df_cell_is_empty (const df_cell_t *rp) |
| Checks if a df_cell_t is empty. | |
| WS_DLL_PUBLIC bool | df_cell_is_null (const df_cell_t *rp) |
| Check if the given cell is null. | |
| WS_DLL_PUBLIC void | df_cell_init (df_cell_t *rp, bool free_seg) |
| Initialize a df_cell_t structure. | |
| WS_DLL_PUBLIC void | df_cell_clear (df_cell_t *rp) |
| Clear a df_cell_t structure. | |
| WS_DLL_PUBLIC void | df_cell_iter_init (df_cell_t *rp, df_cell_iter_t *iter) |
| Initialize an iterator for a cell. | |
| WS_DLL_PUBLIC fvalue_t * | df_cell_iter_next (df_cell_iter_t *iter) |
| Advances the iterator to the next cell and returns its value. | |
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
| void add_compile_warning | ( | dfwork_t * | dfw, |
| const char * | format, | ||
| ... | |||
| ) |
| void add_deprecated_token | ( | GPtrArray * | deprecated, |
| const char * | token | ||
| ) |
Adds a deprecated token to an array.
| deprecated | Pointer to the GPtrArray where deprecated tokens are stored. |
| token | The token to add, which will not be added if it already exists in the array. |
Append a fvalue to a df_cell.
| rp | Pointer to the df_cell where the fvalue will be appended. |
| fv | Pointer to the fvalue to append. |
| WS_DLL_PUBLIC void df_cell_clear | ( | df_cell_t * | rp | ) |
| WS_DLL_PUBLIC void df_cell_init | ( | df_cell_t * | rp, |
| bool | free_seg | ||
| ) |
| WS_DLL_PUBLIC bool df_cell_is_empty | ( | const df_cell_t * | rp | ) |
| WS_DLL_PUBLIC bool df_cell_is_null | ( | const df_cell_t * | rp | ) |
Check if the given cell is null.
| rp | Pointer to the df_cell_t structure to check. |
| WS_DLL_PUBLIC void df_cell_iter_init | ( | df_cell_t * | rp, |
| df_cell_iter_t * | iter | ||
| ) |
Initialize an iterator for a cell.
| rp | Pointer to the cell to iterate over. |
| iter | Pointer to the iterator structure to initialize. |
| WS_DLL_PUBLIC fvalue_t * df_cell_iter_next | ( | df_cell_iter_t * | iter | ) |
Advances the iterator to the next cell and returns its value.
| iter | Pointer to the iterator structure. |
| WS_DLL_PUBLIC GPtrArray * df_cell_ref | ( | df_cell_t * | rp | ) |
| WS_DLL_PUBLIC size_t df_cell_size | ( | const df_cell_t * | rp | ) |
| WS_DLL_PUBLIC void dfilter_fail | ( | void * | state, |
| int | code, | ||
| df_loc_t | err_loc, | ||
| const char * | format, | ||
| ... | |||
| ) |
Handle a filter failure and log an error message.
This function is called when a filter fails to compile or execute, and it logs an error message with the specified code and location.
| state | The state of the dfilter. |
| code | The error code associated with the failure. |
| err_loc | The location in the filter where the error occurred. |
| format | A format string for the error message. |
| WS_DLL_PUBLIC WS_NORETURN void dfilter_fail_throw | ( | void * | state, |
| int | code, | ||
| df_loc_t | err_loc, | ||
| const char * | format, | ||
| ... | |||
| ) |
Throw a filter failure with an error message.
| state | The state of the filter. |
| code | The error code. |
| err_loc | The location of the error. |
| format | The format string for the error message. |
Create a new filter value from a character constant.
| dfw | The current dfilter work context. |
| ftype | The type of the field value. |
| st | The node containing the data to be converted. |
| bool dfilter_fvalue_from_literal | ( | dfwork_t * | dfw, |
| ftenum_t | ftype, | ||
| stnode_t * | st, | ||
| bool | allow_partial_value, | ||
| header_field_info * | hfinfo_value_string | ||
| ) |
Creates a fvalue from a literal string.
| dfw | The current working state of the display filter. |
| ftype | The type of the field. |
| st | The syntax tree node to be replaced with the fvalue. |
| allow_partial_value | Whether partial values are allowed. |
| hfinfo_value_string | Information about the value string. |
Create an filter value from a number token.
This function converts a number token into an fvalue based on its type and stores it in the dfwork_t structure.
| dfw | Pointer to the dfwork_t structure where the fvalue will be stored. |
| ftype | The desired data type for the fvalue (e.g., FT_INT64, FT_DOUBLE). |
| st | Pointer to the stnode_t structure containing the number token. |
| bool dfilter_fvalue_from_string | ( | dfwork_t * | dfw, |
| ftenum_t | ftype, | ||
| stnode_t * | st, | ||
| header_field_info * | hfinfo_value_string | ||
| ) |
Converts a string to a filter value.
| dfw | The current working state of the dfilter. |
| ftype | The type of the field. |
| st | The node where the result will be stored. |
| hfinfo_value_string | Information about the header field. |
| header_field_info * dfilter_resolve_unparsed | ( | const char * | name, |
| GPtrArray * | deprecated | ||
| ) |
Resolve an unparsed filter name to a header field info.
| name | The name of the filter to resolve. |
| deprecated | A pointer to a GPtrArray where deprecated tokens will be stored, or NULL if not needed. |
| WS_DLL_PUBLIC void dfilter_vfail | ( | void * | state, |
| int | code, | ||
| df_loc_t | err_loc, | ||
| const char * | format, | ||
| va_list | args | ||
| ) |
Report a failure in a display filter.
This function is used to report an error in a display filter. If an error has already been reported, it will not overwrite the existing error.
| state | Pointer to the state of the display filter. |
| code | Error code indicating the type of error. |
| err_loc | Location information where the error occurred. |
| format | Format string for the error message. |
| args | Variable arguments list for the format string. |
| void DfilterTrace | ( | FILE * | TraceFILE, |
| char * | zTracePrompt | ||
| ) |
Writes a trace prompt to the specified file.
| TraceFILE | Pointer to the file where the trace prompt will be written. |
| zTracePrompt | The trace prompt string to write. |
| void free_deprecated | ( | GPtrArray * | deprecated | ) |
Frees memory allocated for deprecated items.
| deprecated | Pointer to the GPtrArray containing deprecated items. |
| void reference_free | ( | df_reference_t * | ref | ) |
Frees a reference.
| ref | The reference to be freed. |
| df_reference_t * reference_new | ( | const field_info * | finfo, |
| bool | raw | ||
| ) |
Creates a new reference for a field.
| finfo | Pointer to the field information. |
| raw | Flag indicating whether to use raw value. |
| const char * tokenstr | ( | int | token | ) |
Retrieves a string representation of a token.
| token | The integer value of the token to convert. |