Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
dfilter.h File Reference
#include <wireshark.h>
#include "dfilter-loc.h"
#include <epan/proto.h>

Go to the source code of this file.

Classes

struct  df_error_t
 

Macros

#define DF_ERROR_GENERIC   -1
 
#define DF_ERROR_UNEXPECTED_END   -2
 
#define df_error_new_msg(msg)    df_error_new_printf(DF_ERROR_GENERIC, NULL, "%s", msg)
 
#define DF_SAVE_TREE   (1U << 0)
 
#define DF_EXPAND_MACROS   (1U << 1)
 
#define DF_OPTIMIZE   (1U << 2)
 
#define DF_DEBUG_FLEX   (1U << 3)
 
#define DF_DEBUG_LEMON   (1U << 4)
 
#define DF_RETURN_VALUES   (1U << 5)
 
#define dfilter_compile(text, dfp, errp)
 
#define DF_DUMP_REFERENCES   (1U << 0)
 
#define DF_DUMP_SHOW_FTYPE   (1U << 1)
 
#define dfilter_log(dfcode, msg)   (void)0
 
#define DFILTER_DEBUG_HERE(dfcode)
 

Typedefs

typedef struct epan_dfilter dfilter_t
 

Functions

df_error_tdf_error_new (int code, char *msg, df_loc_t *loc)
 
df_error_tdf_error_new_printf (int code, df_loc_t *loc, const char *fmt,...) G_GNUC_PRINTF(3
 
df_error_tdf_error_new_vprintf (int code, df_loc_t *loc, const char *fmt, va_list ap)
 
WS_DLL_PUBLIC void df_error_free (df_error_t **ep)
 
void dfilter_init (void)
 
void dfilter_cleanup (void)
 
WS_DLL_PUBLIC char * dfilter_expand (const char *expr, df_error_t **err_ret)
 
WS_DLL_PUBLIC bool dfilter_compile_full (const char *text, dfilter_t **dfp, df_error_t **errpp, unsigned flags, const char *caller)
 
WS_DLL_PUBLIC struct stnodedfilter_get_syntax_tree (const char *text)
 
WS_DLL_PUBLIC void dfilter_free (dfilter_t *df)
 
WS_DLL_PUBLIC bool dfilter_apply_edt (dfilter_t *df, struct epan_dissect *edt)
 
bool dfilter_apply (dfilter_t *df, proto_tree *tree)
 
bool dfilter_apply_full (dfilter_t *df, proto_tree *tree, GPtrArray **fvals)
 
void dfilter_prime_proto_tree (const dfilter_t *df, proto_tree *tree)
 
void dfilter_prime_proto_tree_print (const dfilter_t *df, proto_tree *tree)
 
WS_DLL_PUBLIC void dfilter_load_field_references (const dfilter_t *df, proto_tree *tree)
 
WS_DLL_PUBLIC void dfilter_load_field_references_edt (const dfilter_t *df, struct epan_dissect *edt)
 
bool dfilter_has_interesting_fields (const dfilter_t *df)
 
bool dfilter_interested_in_field (const dfilter_t *df, int hfid)
 
bool dfilter_interested_in_proto (const dfilter_t *df, int proto_id)
 
WS_DLL_PUBLIC bool dfilter_requires_columns (const dfilter_t *df)
 
WS_DLL_PUBLIC GPtrArray * dfilter_deprecated_tokens (dfilter_t *df)
 
WS_DLL_PUBLIC GSList * dfilter_get_warnings (dfilter_t *df)
 
WS_DLL_PUBLIC void dfilter_dump (FILE *fp, dfilter_t *df, uint16_t flags)
 
WS_DLL_PUBLIC const char * dfilter_text (dfilter_t *df)
 
WS_DLL_PUBLIC const char * dfilter_syntax_tree (dfilter_t *df)
 
WS_DLL_PUBLIC void dfilter_log_full (const char *domain, enum ws_log_level level, const char *file, long line, const char *func, dfilter_t *dfcode, const char *msg)
 

Detailed Description

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

Macro Definition Documentation

◆ dfilter_compile

#define dfilter_compile (   text,
  dfp,
  errp 
)
Value:
dfilter_compile_full(text, dfp, errp, \
DF_EXPAND_MACROS|DF_OPTIMIZE, \
__func__)

◆ DFILTER_DEBUG_HERE

#define DFILTER_DEBUG_HERE (   dfcode)
Value:
dfilter_log_full(LOG_DOMAIN_DFILTER, LOG_LEVEL_ECHO, \
__FILE__, __LINE__, __func__, \
dfcode, #dfcode);

Function Documentation

◆ dfilter_get_syntax_tree()

WS_DLL_PUBLIC struct stnode * dfilter_get_syntax_tree ( const char *  text)

Build a syntax tree for a filter

Parameters
textA display filter.
Returns
The root node of a syntax tree on success or NULL on failure.