summaryrefslogtreecommitdiffstats
path: root/nest/config.Y
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>1999-05-26 16:24:57 +0200
committerPavel Machek <pavel@ucw.cz>1999-05-26 16:24:57 +0200
commit1a2ded450ecfbb8ccb7f459d7265fc5333d13420 (patch)
tree8c52c62051105b6aa974965bf2baa21e20f15fb2 /nest/config.Y
parent9d79fec8dc7c5a3b7e590c00df7eadcef9e80144 (diff)
downloadbird-1a2ded450ecfbb8ccb7f459d7265fc5333d13420.tar
bird-1a2ded450ecfbb8ccb7f459d7265fc5333d13420.zip
Skeleton for password handling, currently I only build structures and
do nothing more advanced for them
Diffstat (limited to 'nest/config.Y')
-rw-r--r--nest/config.Y29
1 files changed, 29 insertions, 0 deletions
diff --git a/nest/config.Y b/nest/config.Y
index 667f435..c13a6ae 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -11,6 +11,7 @@ CF_HDR
static struct proto_config *this_proto;
#include "nest/rt-dev.h"
+#include "nest/password.h"
void rt_dev_add_iface(char *);
@@ -18,10 +19,12 @@ CF_DECLS
CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE, TABLE)
+CF_KEYWORDS(PASSWORD, FROM, TO, ID)
%type <i> idval
%type <f> imexport
%type <r> rtable
+%type <p> password_list password_begin
CF_GRAMMAR
@@ -129,6 +132,32 @@ dev_iface_list:
| dev_iface_list ',' TEXT { rt_dev_add_iface($3); }
;
+password_begin:
+ PASSWORD TEXT {
+ last_password_item = cfg_alloc(sizeof (struct password_item));
+ last_password_item->password = $2;
+ last_password_item->from = 0;
+ last_password_item->to = ~0;
+ last_password_item->id = 0;
+ last_password_item->next = NULL;
+ $$=last_password_item;
+ }
+ ;
+
+password_items:
+ /* empty */ { }
+ | FROM datetime ';' password_items { last_password_item->from = $2; }
+ | TO datetime ';' password_items { last_password_item->to = $2; }
+ | ID NUM ';' password_items { last_password_item->id = $2; }
+ ;
+
+password_list:
+ /* empty */ { $$ = NULL; }
+ | '{' password_begin ';' password_items '}' password_list {
+ last_password_item->next = $6;
+ }
+ ;
+
CF_CODE
void