aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter/dfilter-int.h
blob: e3bd84325e6afe8ad746ab20421c621d635fe17e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* dfilter-int.h
 * Header information for use by multiple files in the dfilter submodule.
 *
 * $Id: dfilter-int.h,v 1.1 2001/02/01 20:21:18 gram Exp $
 *
 */

#ifndef DFILTER_INT_H
#define DFILTER_INT_H

#include "dfilter.h"
#include "syntax-tree.h"

#include "proto.h"

/* Passed back to user */
struct _dfilter_t {
	GPtrArray	*insns;
	int		num_registers;
	GList		**registers;
	gboolean	*attempted_load;
};

typedef struct {
	/* Syntax Tree stuff */
	stnode_t	*st_root;
	gboolean	syntax_error;
	GPtrArray	*insns;
	GHashTable	*loaded_fields;
	int		next_insn_id;
	int		next_register;
} dfwork_t;

/* Constructor/Destructor prototypes for Lemon Parser */
void *DfilterAlloc(void* (*)());
void DfilterFree(void*, void (*)());
void Dfilter(void*, int, stnode_t*, dfwork_t*);

/* Scanner's lval */
extern stnode_t *df_lval;

/* Given a field abbreviation, returns the proto ID, or -1 if
 * it doesn't exist. */
header_field_info*
dfilter_lookup_token(char *abbrev);

/* Set dfilter_error_msg_buf and dfilter_error_msg */
void
dfilter_fail(char *format, ...);


#endif