diff options
author | Pavel Machek <pavel@ucw.cz> | 1999-04-07 12:11:08 +0000 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 1999-04-07 12:11:08 +0000 |
commit | 23b1539bf90bfb6b35d9a2be0a2b6b1e311c1460 (patch) | |
tree | 1e14ad6211df41634cbd0e9cf9a638e36ec17060 /filter/filter.h | |
parent | 7976a574b692f747d833d899caf0fbbf702714c1 (diff) |
Filters upgraded - a bit. Moved code to filter.c because it is where
it belongs. (f-util.c stays there for auxiliary and non-important things.)
Diffstat (limited to 'filter/filter.h')
-rw-r--r-- | filter/filter.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/filter/filter.h b/filter/filter.h index d8ee7efa..12943425 100644 --- a/filter/filter.h +++ b/filter/filter.h @@ -10,6 +10,7 @@ #define _BIRD_FILT_H_ #include "lib/resource.h" +#include "lib/ip.h" struct f_inst { /* Instruction */ struct f_inst *next; /* Structure is 16 bytes, anyway */ @@ -17,10 +18,17 @@ struct f_inst { /* Instruction */ void *arg1, *arg2; }; +struct prefix { + ip_addr ip; + int len; +}; + struct f_val { int type; union { int i; + struct prefix *px; + char *s; } val; }; @@ -35,6 +43,8 @@ struct f_inst *f_new_inst(void); int f_run(struct filter *filter, struct rte **rte, struct ea_list **tmp_attrs, struct linpool *tmp_pool); char *filter_name(struct filter *filter); + +#define F_NOP 0 #define F_ACCEPT 1 /* Need to preserve ordering: accepts < rejects! */ #define F_MODIFY 2 /* FIXME: Introduce modification flags instead? */ #define F_REJECT 3 |