Wireshark  4.3.0
The Wireshark network protocol analyzer
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
17 extern "C" {
18 #endif /* __cplusplus */
19 
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 */
29 
30 void macro_parse(dfilter_macro_t *m);
31 
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);
34 
35 void dfilter_macro_init(void);
36 
37 WS_DLL_PUBLIC
38 void dfilter_macro_reload(void);
39 
40 void dfilter_macro_cleanup(void);
41 
43  GHashTableIter iter;
44 };
45 
46 WS_DLL_PUBLIC
47 size_t
48 dfilter_macro_table_count(void);
49 
50 WS_DLL_PUBLIC
51 void
52 dfilter_macro_table_iter_init(struct dfilter_macro_table_iter *iter);
53 
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);
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