Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
dfilter-macro.h
Go to the documentation of this file.
1
10#ifndef _DFILTER_MACRO_H
11#define _DFILTER_MACRO_H
12
13#include <wireshark.h>
14#include "dfilter.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20typedef 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 */
29
30void macro_parse(dfilter_macro_t *m);
31
32/* applies all macros to the given text and returns the resulting string or NULL on failure */
33char* dfilter_macro_apply(const char* text, df_error_t** error);
34
35void dfilter_macro_init(void);
36
37WS_DLL_PUBLIC
38void dfilter_macro_reload(void);
39
40void dfilter_macro_cleanup(void);
41
43 GHashTableIter iter;
44};
45
46WS_DLL_PUBLIC
47size_t
48dfilter_macro_table_count(void);
49
50WS_DLL_PUBLIC
51void
52dfilter_macro_table_iter_init(struct dfilter_macro_table_iter *iter);
53
54WS_DLL_PUBLIC
55bool
56dfilter_macro_table_iter_next(struct dfilter_macro_table_iter *iter,
57 const char **name_ptr, const char **text_ptr);
58
59#ifdef __cplusplus
60}
61#endif /* __cplusplus */
62
63#endif /* _DFILTER_MACRO_H */
Definition dfilter-macro.h:20
Definition dfilter.h:30
Definition dfilter-macro.h:42