Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

dfunctions.h
1 /*
2 * Wireshark - Network traffic analyzer
3 *
4 * Copyright 2006 Gilbert Ramirez <gram@alumni.rice.edu>
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9 #ifndef DFUNCTIONS_H
10 #define DFUNCTIONS_H
11
12 #include <glib.h>
13 #include <ftypes/ftypes.h>
14 #include "syntax-tree.h"
15
16 /* The run-time logic of the dfilter function */
17 typedef gboolean (*DFFuncType)(GList *arg1list, GList *arg2list, GList **retval);
18
19 /* The semantic check for the dfilter function */
20 typedef void (*DFSemCheckType)(dfwork_t *dfw, int param_num, stnode_t *st_node);
21
22 /* If a function needs more args than this, increase
23 * this macro and add more arg members to the dfvm_insn_t
24 * struct in dfvm.h, and add some logic to dfw_append_function()
25 * and dfvm_apply() */
26 #define DFUNCTION_MAX_NARGS 2
27
28 /* This is a "function definition" record, holding everything
29 * we need to know about a function */
30 typedef struct {
31 const char *name;
32 DFFuncType function;
33 ftenum_t retval_ftype;
34 guint min_nargs;
35 guint max_nargs;
36 DFSemCheckType semcheck_param_function;
37 } df_func_def_t;
38
39 /* Return the function definition record for a function of named "name" */
40 df_func_def_t* df_func_lookup(char *name);
41
42 #endif
stnode_t
Definition: syntax-tree.h:48
syntax-tree.h
dfwork_t
Definition: dfilter-int.h:32
df_func_def_t
Definition: dfunctions.h:30