Statistics
| Branch: | Revision:

iof-bird-daemon / sysdep / linux / netlink / krt.Y @ bdb95a21

History | View | Annotate | Download (852 Bytes)

1 bdb95a21 Martin Mares
/*
2
 *	BIRD -- Netlink Interface Configuration
3
 *
4
 *	(c) 1999 Martin Mares <mj@ucw.cz>
5
 *
6
 *	Can be freely distributed and used under the terms of the GNU GPL.
7
 */
8
9
CF_HDR
10
11
#include "lib/krt.h"
12
13
#define KRT_PROTO ((struct krt_config *) this_proto)
14
15
CF_DECLS
16
17
CF_KEYWORDS(KERNEL, PERSIST, ROUTE, SCAN, TIME, LEARN)
18
19
CF_GRAMMAR
20
21
/* Kernel protocol */
22
23
CF_ADDTO(proto, kern_proto '}')
24
25
kern_proto_start: proto_start KERNEL {
26
     if (!(this_proto = cf_krt)) cf_error("Kernel protocol already defined");
27
     cf_krt = NULL;
28
   }
29
 ;
30
31
kern_proto:
32
   kern_proto_start '{'
33
 | kern_proto proto_item ';'
34
 | kern_proto kern_item ';'
35
 ;
36
37
kern_item:
38
   PERSIST bool { KRT_PROTO->persist = $2; }
39
 | SCAN TIME expr { KRT_PROTO->scan_time = $3; }
40
 | LEARN bool { KRT_PROTO->learn = $2; }
41
 | ROUTE SCAN TIME expr { KRT_PROTO->route_scan_time = $4; }
42
 ;
43
44
CF_CODE
45
46
CF_END