diff options
author | Pavel Machek <pavel@ucw.cz> | 1999-04-12 21:58:18 +0200 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 1999-04-12 21:58:18 +0200 |
commit | 38506f71b0bea5580987e999a7b1a69f58aec7ec (patch) | |
tree | f9779191375233fb91582d32eed2489c0e2032ce /filter/filter.h | |
parent | 01bd7759b260b379089acf28cc47bd49572ebd22 (diff) | |
download | bird-38506f71b0bea5580987e999a7b1a69f58aec7ec.tar bird-38506f71b0bea5580987e999a7b1a69f58aec7ec.zip |
Sets of integers now actually work. Sets of IP will work as soon as
compare function is ready.
Diffstat (limited to 'filter/filter.h')
-rw-r--r-- | filter/filter.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/filter/filter.h b/filter/filter.h index ffb50b3..cc3fef1 100644 --- a/filter/filter.h +++ b/filter/filter.h @@ -40,6 +40,7 @@ struct f_val { ip_addr ip; struct prefix px; char *s; + struct f_tree *t; } val; }; @@ -50,10 +51,16 @@ struct filter { void filters_postconfig(void); struct f_inst *f_new_inst(void); +struct f_tree *f_new_tree(void); + +struct f_tree *build_tree(struct f_tree *); +struct f_tree *find_tree(struct f_tree *t, struct f_val val); int f_run(struct filter *filter, struct rte **rte, struct ea_list **tmp_attrs, struct linpool *tmp_pool); char *filter_name(struct filter *filter); +int val_compare(struct f_val v1, struct f_val v2); +void val_print(struct f_val v); #define F_NOP 0 #define F_ACCEPT 1 /* Need to preserve ordering: accepts < rejects! */ @@ -85,4 +92,10 @@ char *filter_name(struct filter *filter); #define T_SET 0x80 +struct f_tree { + struct f_tree *left, *right; + struct f_val from, to; + void *data; +}; + #endif |