]> git.ipfire.org Git - thirdparty/bird.git/blob - sysdep/bsd/krt-sock.Y
Renamed my past self in commit authorship and mentioned that in the contributing...
[thirdparty/bird.git] / sysdep / bsd / krt-sock.Y
1 /*
2 * BIRD -- BSD Kernel Syncer Configuration
3 *
4 * (c) 1999--2000 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 CF_DECLS
12
13 CF_KEYWORDS(KERNEL, TABLE, METRIC)
14
15 CF_GRAMMAR
16
17 kern_proto: kern_proto kern_sys_item ';' ;
18
19 kern_sys_item:
20 KERNEL TABLE expr {
21 if ($3 && (krt_max_tables == 1))
22 cf_error("Multiple kernel routing tables not supported");
23 if ($3 >= krt_max_tables)
24 cf_error("Kernel table id must be in range 0-%u", krt_max_tables - 1);
25
26 THIS_KRT->sys.table_id = $3;
27 }
28 | METRIC expr {
29 if ($2 && !krt_max_metric)
30 cf_error("Kernel route metric not supported");
31 if ($2 > krt_max_metric)
32 cf_error("Kernel table id must be in range 0-%u", krt_max_metric);
33
34 THIS_KRT->sys.metric = $2;
35 }
36 ;
37
38 CF_CODE
39
40 CF_END