| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Typedefs | Functions
dfilter-translator.h File Reference
`#include <glib.h>`
`#include <epan/dfilter/syntax-tree.h>`

Go to the source code of this file.

## Typedefs
typedef bool(* | DFTranslator) (stnode_t *root_node, GString *translated)

## Functions
void | dfilter_translator_init (void)
void | dfilter_translator_cleanup (void)
WS_DLL_PUBLIC bool | register_dfilter_translator (const char *translator_name, DFTranslator translator)
WS_DLL_PUBLIC void | deregister_dfilter_translator (const char *translator_name)
WS_DLL_PUBLIC char ** | get_dfilter_translator_list (void)
WS_DLL_PUBLIC const char * | translate_dfilter (const char *translator_name, const char *dfilter)

## Detailed Description

Wireshark - Network traffic analyzer

Copyright 1998 Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg

SPDX-License-Identifier: GPL-2.0-or-later

## Function Documentation

## ◆ deregister_dfilter_translator()

WS_DLL_PUBLIC void deregister_dfilter_translator | ( | const char * | translator_name | ) |

Deregister a display filter translator

Parameters

  translator_name | The name provided in register_dfilter_translator.

## ◆ dfilter_translator_cleanup()

void dfilter_translator_cleanup | ( | void |  | ) |

Clean up our built-in translators

## ◆ dfilter_translator_init()

void dfilter_translator_init | ( | void |  | ) |

Initialize our built-in translators

## ◆ get_dfilter_translator_list()

WS_DLL_PUBLIC char ** get_dfilter_translator_list | ( | void |  | ) |

Get the current translator list

Returns
  A NULL terminated array of translator names. The return value must be g_freed, but the names themselves must not be g_freed.

## ◆ register_dfilter_translator()

WS_DLL_PUBLIC bool register_dfilter_translator | ( | const char * | translator_name,
|  | DFTranslator | translator )

Register a display filter translator

Parameters

  translator_name | A unique, proper name for the translator, suitable for display.
  translator | A function which will handle translating the syntax tree.

Returns
  true on success, false on failure.

## ◆ translate_dfilter()

WS_DLL_PUBLIC const char * translate_dfilter | ( | const char * | translator_name,
|  | const char * | dfilter )

Translate a display filter.

The root node and data pointer will be passed to the

Parameters

  translator_name | The name of a registered translator.
  dfilter | The Wireshark display filter to translate.

Returns
  A translated filter or rule on success, NULL on failure.