]>
Commit | Line | Data |
---|---|---|
b9d70dc8 | 1 | /* |
e0f2e42f | 2 | * BIRD Internet Routing Daemon -- Filters |
b9d70dc8 | 3 | * |
e0f2e42f | 4 | * (c) 1999 Pavel Machek <pavel@ucw.cz> |
b9d70dc8 PM |
5 | * |
6 | * Can be freely distributed and used under the terms of the GNU GPL. | |
7 | */ | |
8 | ||
9 | #ifndef _BIRD_FILT_H_ | |
10 | #define _BIRD_FILT_H_ | |
11 | ||
12 | #include "lib/resource.h" | |
13 | ||
b7005824 PM |
14 | struct f_inst { /* Instruction */ |
15 | struct f_inst *next; /* Structure is 16 bytes, anyway */ | |
b9d70dc8 PM |
16 | int code; |
17 | void *arg1, *arg2; | |
18 | }; | |
19 | ||
b7005824 PM |
20 | struct f_val { |
21 | int type; | |
22 | union { | |
23 | int i; | |
24 | } val; | |
25 | }; | |
26 | ||
e0f2e42f MM |
27 | struct filter { |
28 | char *name; | |
29 | struct f_inst *root; | |
30 | }; | |
31 | ||
ca3d562b | 32 | void filters_postconfig(void); |
b7005824 | 33 | struct f_inst *f_new_inst(void); |
84c7e194 | 34 | |
e0f2e42f MM |
35 | int f_run(struct filter *filter, struct rte *rtein, struct rte **rteout); |
36 | ||
84c7e194 PM |
37 | #define F_ACCEPT 1 |
38 | #define F_REJECT 2 | |
39 | #define F_MODIFY 3 | |
d36d838d PM |
40 | #define F_ERROR 4 |
41 | #define F_QUITBIRD 5 | |
ca3d562b | 42 | |
b7005824 | 43 | #define T_VOID 0 |
d36d838d PM |
44 | #define T_RETURN 1 |
45 | #define T_INT 10 | |
46 | #define T_PX 11 /* prefix */ | |
47 | #define T_INTLIST 12 | |
48 | ||
b9d70dc8 | 49 | #endif |