]>
Commit | Line | Data |
---|---|---|
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 | ||
9 | CF_HDR | |
10 | ||
11 | #include "proto/ospf/ospf.h" | |
12 | ||
13 | CF_DECLS | |
14 | ||
5919c66e | 15 | CF_KEYWORDS(OSPF, AREA, OSPF_METRIC1, OSPF_METRIC2, OSPF_TAG) |
a783e259 | 16 | CF_KEYWORDS(NEIGHBORS) |
c1f8dc91 OF |
17 | |
18 | CF_GRAMMAR | |
19 | ||
20 | CF_ADDTO(proto, ospf_proto '}') | |
21 | ||
22 | ospf_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 | ||
28 | ospf_proto: | |
29 | ospf_proto_start proto_name '{' | |
30 | | ospf_proto proto_item ';' | |
31 | | ospf_proto ospf_area ';' | |
32 | ; | |
33 | ||
55e7732a | 34 | ospf_area: AREA idval { |
c1f8dc91 OF |
35 | ((struct ospf_config *)this_proto)->area = $2; |
36 | } | |
37 | ; | |
38 | ||
5919c66e MM |
39 | CF_ADDTO(dynamic_attr, OSPF_METRIC1 { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, T_INT, EA_OSPF_METRIC1); }) |
40 | CF_ADDTO(dynamic_attr, OSPF_METRIC2 { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, T_INT, EA_OSPF_METRIC2); }) | |
41 | CF_ADDTO(dynamic_attr, OSPF_TAG { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, T_INT, EA_OSPF_TAG); }) | |
42 | ||
4ab4e977 OF |
43 | CF_CLI(SHOW OSPF, optsym, [<name>], [[Show information about ospf protocol]]) |
44 | { ospf_sh(proto_get_named($3, &proto_ospf)); } ; | |
45 | ||
a783e259 OF |
46 | CF_CLI(SHOW OSPF NEIGHBORS, optsym, [<name>], [[Show information about ospf neighbors]]) |
47 | { ospf_sh_neigh(proto_get_named($4, &proto_ospf)); } ; | |
48 | ||
c1f8dc91 OF |
49 | CF_CODE |
50 | ||
51 | CF_END |