Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

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

- File List
- File Members

dfilter-int.h
1 /*
2 * Wireshark - Network traffic analyzer
3 * By Gerald Combs <gerald@wireshark.org>
4 * Copyright 2001 Gerald Combs
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9 #ifndef DFILTER_INT_H
10 #define DFILTER_INT_H
11
12 #include "dfilter.h"
13 #include "syntax-tree.h"
14
15 #include <epan/proto.h>
16 #include <stdio.h>
17
18 /* Passed back to user */
19 struct epan_dfilter {
20 GPtrArray *insns;
21 GPtrArray *consts;
22 guint num_registers;
23 guint max_registers;
24 GList **registers;
25 gboolean *attempted_load;
26 gboolean *owns_memory;
27 int *interesting_fields;
28 int num_interesting_fields;
29 GPtrArray *deprecated;
30 };
31
32 typedef struct {
33 /* Syntax Tree stuff */
34 stnode_t *st_root;
35 gboolean syntax_error;
36 gchar *error_message;
37 GPtrArray *insns;
38 GPtrArray *consts;
39 GHashTable *loaded_fields;
40 GHashTable *interesting_fields;
41 int next_insn_id;
42 int next_const_id;
43 int next_register;
44 int first_constant; /* first register used as a constant */
45 } dfwork_t;
46
47 /*
48 * State kept by the scanner.
49 */
50 typedef struct {
51 dfwork_t *dfw;
52 GString* quoted_string;
53 gboolean in_set; /* true if parsing set elements for the membership operator */
54 } df_scanner_state_t;
55
56 /* Constructor/Destructor prototypes for Lemon Parser */
57 void *DfilterAlloc(void* (*)(gsize));
58
59 void DfilterFree(void*, void (*)(void *));
60 void Dfilter(void*, int, stnode_t*, dfwork_t*);
61
62 /* Scanner's lval */
63 extern stnode_t *df_lval;
64
65 /* Return value for error in scanner. */
66 #define SCAN_FAILED -1 /* not 0, as that means end-of-input */
67
68 /* Set dfw->error_message */
69 void
70 dfilter_fail(dfwork_t *dfw, const char *format, ...) G_GNUC_PRINTF(2, 3);
71
72 void
73 DfilterTrace(FILE *TraceFILE, char *zTracePrompt);
74
75 #endif
stnode_t
Definition: syntax-tree.h:48
df_scanner_state_t
Definition: dfilter-int.h:50
syntax-tree.h
proto.h
epan_dfilter
Definition: dfilter-int.h:19
dfwork_t
Definition: dfilter-int.h:32