]> git.ipfire.org Git - thirdparty/bird.git/blame - proto/ospf/config.Y
Documentation.
[thirdparty/bird.git] / proto / ospf / config.Y
CommitLineData
c1f8dc91
OF
1/*
2 * BIRD -- OSPF Configuration
3 *
4 * (c) 1999 Ondrej Filip <feela@network.cz>
5 *
6 * Can be freely distributed and used under the terms of the GNU GPL.
7 */
8
9CF_HDR
10
11#include "proto/ospf/ospf.h"
12
13CF_DECLS
14
5919c66e 15CF_KEYWORDS(OSPF, AREA, OSPF_METRIC1, OSPF_METRIC2, OSPF_TAG)
a783e259 16CF_KEYWORDS(NEIGHBORS)
c1f8dc91
OF
17
18CF_GRAMMAR
19
20CF_ADDTO(proto, ospf_proto '}')
21
22ospf_proto_start: proto_start OSPF {
23 this_proto = proto_config_new(&proto_ospf, sizeof(struct ospf_config));
916c8c0a 24 this_proto->preference = DEF_PREF_OSPF;
c1f8dc91
OF
25 }
26 ;
27
28ospf_proto:
29 ospf_proto_start proto_name '{'
30 | ospf_proto proto_item ';'
31 | ospf_proto ospf_area ';'
32 ;
33
55e7732a 34ospf_area: AREA idval {
c1f8dc91
OF
35 ((struct ospf_config *)this_proto)->area = $2;
36 }
37 ;
38
5919c66e
MM
39CF_ADDTO(dynamic_attr, OSPF_METRIC1 { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, T_INT, EA_OSPF_METRIC1); })
40CF_ADDTO(dynamic_attr, OSPF_METRIC2 { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, T_INT, EA_OSPF_METRIC2); })
41CF_ADDTO(dynamic_attr, OSPF_TAG { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, T_INT, EA_OSPF_TAG); })
42
4ab4e977
OF
43CF_CLI(SHOW OSPF, optsym, [<name>], [[Show information about ospf protocol]])
44{ ospf_sh(proto_get_named($3, &proto_ospf)); } ;
45
a783e259
OF
46CF_CLI(SHOW OSPF NEIGHBORS, optsym, [<name>], [[Show information about ospf neighbors]])
47{ ospf_sh_neigh(proto_get_named($4, &proto_ospf)); } ;
48
c1f8dc91
OF
49CF_CODE
50
51CF_END