diff options
author | Martin Mares <mj@ucw.cz> | 2000-01-17 00:30:06 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-01-17 00:30:06 +0100 |
commit | f14a4becbe77cfb3c2e4243d6fc383b0acd8956f (patch) | |
tree | ce2f157ef5571f3089939c9a442abf4e92676ada /nest/config.Y | |
parent | 30a6108cccac93048440113211df2eed1fb541b1 (diff) | |
download | bird-f14a4becbe77cfb3c2e4243d6fc383b0acd8956f.tar bird-f14a4becbe77cfb3c2e4243d6fc383b0acd8956f.zip |
Reworked proto lists -- each proto is now in two lists: the global one
(proto_list) and per-type one (original lists). A lot of things simplified.
Implemented `disable', `enable' and `restart' CLI commands.
Diffstat (limited to 'nest/config.Y')
-rw-r--r-- | nest/config.Y | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nest/config.Y b/nest/config.Y index b90b77d..0cb1108 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -30,6 +30,7 @@ CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIREC %type <s> optsym %type <ra> r_args %type <i> echo_mask echo_size +%type <t> proto_patt CF_GRAMMAR @@ -287,6 +288,19 @@ echo_size: } ; +CF_CLI(DISABLE, proto_patt, <protocol> | <pattern> | all, [[Disable protocol]]) +{ proto_xxable($2, 0); } ; +CF_CLI(ENABLE, proto_patt, <protocol> | <pattern> | all, [[Enable protocol]]) +{ proto_xxable($2, 1); } ; +CF_CLI(RESTART, proto_patt, <protocol> | <pattern> | all, [[Restart protocol]]) +{ proto_xxable($2, 2); } ; + +proto_patt: + SYM { $$ = $1->name; } + | ALL { $$ = "*"; } + | TEXT + ; + CF_CODE CF_END |