From 23b1539bf90bfb6b35d9a2be0a2b6b1e311c1460 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Wed, 7 Apr 1999 12:11:08 +0000 Subject: 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.) --- filter/filter.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'filter/filter.h') diff --git a/filter/filter.h b/filter/filter.h index d8ee7ef..1294342 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 -- cgit v1.2.3