Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dfilter / dfilter-macro.h
blob0f71c78a91105794cedd5d9d1c584a10e77844b4
1 /** @file
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 2001 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #ifndef _DFILTER_MACRO_H
11 #define _DFILTER_MACRO_H
13 #include <wireshark.h>
14 #include "dfilter.h"
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
20 typedef struct _dfilter_macro_t {
21 char* name; /* the macro id */
22 char* text; /* raw data from file */
23 bool usable; /* macro is usable */
24 char** parts; /* various segments of text between insertion targets */
25 int* args_pos; /* what's to be inserted */
26 int argc; /* the expected number of arguments */
27 void* priv; /* a copy of text that contains every c-string in parts */
28 } dfilter_macro_t;
30 void macro_parse(dfilter_macro_t *m);
32 /* applies all macros to the given text and returns the resulting string or NULL on failure */
33 char* dfilter_macro_apply(const char* text, df_error_t** error);
35 void dfilter_macro_init(void);
37 WS_DLL_PUBLIC
38 void dfilter_macro_reload(void);
40 void dfilter_macro_cleanup(void);
42 struct dfilter_macro_table_iter {
43 GHashTableIter iter;
46 WS_DLL_PUBLIC
47 size_t
48 dfilter_macro_table_count(void);
50 WS_DLL_PUBLIC
51 void
52 dfilter_macro_table_iter_init(struct dfilter_macro_table_iter *iter);
54 WS_DLL_PUBLIC
55 bool
56 dfilter_macro_table_iter_next(struct dfilter_macro_table_iter *iter,
57 const char **name_ptr, const char **text_ptr);
59 #ifdef __cplusplus
61 #endif /* __cplusplus */
63 #endif /* _DFILTER_MACRO_H */