summaryrefslogtreecommitdiffstats
path: root/filter/config.Y
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2000-04-12 15:07:53 +0200
committerPavel Machek <pavel@ucw.cz>2000-04-12 15:07:53 +0200
commitdcab78904794156483878b4b8cd924e30a71bcdd (patch)
tree3ee8c297a8ae5db2feb3a3368ba5e7b0177ba92a /filter/config.Y
parentc3edb89ec141355de58fbade353d4b2182c62c1e (diff)
downloadbird-dcab78904794156483878b4b8cd924e30a71bcdd.tar
bird-dcab78904794156483878b4b8cd924e30a71bcdd.zip
Renamed f_path to f_path_mask -- which is what it really is. Use
linklist instead of array of signed integers for path mask.
Diffstat (limited to 'filter/config.Y')
-rw-r--r--filter/config.Y15
1 files changed, 8 insertions, 7 deletions
diff --git a/filter/config.Y b/filter/config.Y
index b056297..953dfbc 100644
--- a/filter/config.Y
+++ b/filter/config.Y
@@ -106,7 +106,7 @@ type:
| PREFIX { $$ = T_PREFIX; }
| PAIR { $$ = T_PAIR; }
| STRING { $$ = T_STRING; }
- | BGP_PATH { $$ = T_PATH; }
+ | BGP_PATH { $$ = T_PATH_MASK; }
| type SET {
switch ($1) {
default:
@@ -313,8 +313,8 @@ bgp_one:
;
bgp_path:
- bgp_one { $$ = cfg_alloc(sizeof(struct f_path)); $$->next = NULL; $$->val = $1; }
- | bgp_one bgp_path { $$ = cfg_alloc(sizeof(struct f_path)); $$->next = $2; $$->val = $1; }
+ bgp_one { $$ = cfg_alloc(sizeof(struct f_path_mask)); $$->next = NULL; $$->val = $1; }
+ | bgp_one bgp_path { $$ = cfg_alloc(sizeof(struct f_path_mask)); $$->next = $2; $$->val = $1; }
;
constant:
@@ -327,7 +327,7 @@ constant:
| prefix_s {NEW_F_VAL; $$ = f_new_inst(); $$->code = 'C'; $$->a1.p = val; *val = $1; }
| '[' set_items ']' { DBG( "We've got a set here..." ); $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_SET; $$->a2.p = build_tree($2); DBG( "ook\n" ); }
| ENUM { $$ = f_new_inst(); $$->code = 'c'; $$->aux = $1 >> 16; $$->a2.i = $1 & 0xffff; }
- | '/' bgp_path '/' { $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_PATH; $$->a2.p = $2; }
+ | '/' bgp_path '/' { $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_PATH_MASK; $$->a2.p = $2; }
;
/*
@@ -384,7 +384,7 @@ term:
case SYM_VARIABLE | T_PAIR:
case SYM_VARIABLE | T_PREFIX:
case SYM_VARIABLE | T_IP:
- case SYM_VARIABLE | T_PATH:
+ case SYM_VARIABLE | T_PATH_MASK:
$$->code = 'C';
$$->a1.p = $1->aux2;
break;
@@ -413,8 +413,9 @@ term:
| term '.' RESET { }
/* Paths */
- | term '.' APPEND '(' term ')' { }
-/* | term '.' LEN { } Hmm, this would colide with ip.len. What to do with that? */
+ | rtadot PATH '~' term { }
+ | rtadot PATH '.' APPEND '(' term ')' { }
+ | rtadot PATH '.' LEN { $$->code = P('P','l'); }
/* function_call is inlined here */
| SYM '(' var_list ')' {