Revision 56a2bed4 proto/bgp/config.Y

View differences:

proto/bgp/config.Y
15 15
CF_DECLS
16 16

  
17 17
CF_KEYWORDS(BGP, LOCAL, NEIGHBOR, AS, HOLD, TIME, CONNECT, RETRY, KEEPALIVE,
18
	MULTIHOP, STARTUP, VIA, NEXT, HOP, SELF, BGP_PATH)
18
	MULTIHOP, STARTUP, VIA, NEXT, HOP, SELF, DEFAULT, PATH, METRIC,
19
	BGP_PATH, BGP_LOCAL_PREF, BGP_MED, BGP_ORIGIN, BGP_NEXT_HOP,
20
	BGP_ATOMIC_AGGR, BGP_AGGREGATOR, BGP_COMMUNITY)
19 21

  
20 22
CF_GRAMMAR
21 23

  
......
27 29
     BGP_CFG->hold_time = 240;
28 30
     BGP_CFG->connect_retry_time = 120;
29 31
     BGP_CFG->initial_hold_time = 240;
32
     BGP_CFG->default_med = ~0;
33
     BGP_CFG->compare_path_lengths = 1;
30 34
  }
31 35
 ;
32 36

  
......
48 52
 | bgp_proto KEEPALIVE TIME NUM ';' { BGP_CFG->connect_retry_time = $4; }
49 53
 | bgp_proto MULTIHOP NUM VIA IPA ';' { BGP_CFG->multihop = $3; BGP_CFG->multihop_via = $5; }
50 54
 | bgp_proto NEXT HOP SELF ';' { BGP_CFG->next_hop_self = 1; }
55
 | bgp_proto PATH METRIC NUM ';' { BGP_CFG->compare_path_lengths = $4; }
56
 | bgp_proto DEFAULT BGP_MED NUM ';' { BGP_CFG->default_med = $4; }
57
 | bgp_proto DEFAULT BGP_LOCAL_PREF NUM ';' { BGP_CFG->default_local_pref = $4; }
51 58
 ;
52 59

  
53
CF_ADDTO(dynamic_attr, BGP_PATH { $$ = f_new_dynamic_attr(EAF_TYPE_AS_PATH, T_PATH, EA_CODE(EAP_BGP, BA_AS_PATH)); })
60
CF_ADDTO(dynamic_attr, BGP_PATH
61
	{ $$ = f_new_dynamic_attr(EAF_TYPE_AS_PATH, T_PATH, EA_CODE(EAP_BGP, BA_AS_PATH)); })
62
CF_ADDTO(dynamic_attr, BGP_LOCAL_PREF
63
	{ $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_CODE(EAP_BGP, BA_LOCAL_PREF)); })
64
CF_ADDTO(dynamic_attr, BGP_MED
65
	{ $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_CODE(EAP_BGP, BA_MULTI_EXIT_DISC)); })
66
CF_ADDTO(dynamic_attr, BGP_ORIGIN
67
	{ $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_CODE(EAP_BGP, BA_ORIGIN)); })
68
CF_ADDTO(dynamic_attr, BGP_NEXT_HOP
69
	{ $$ = f_new_dynamic_attr(EAF_TYPE_IP_ADDRESS, T_IP, EA_CODE(EAP_BGP, BA_NEXT_HOP)); })
70
CF_ADDTO(dynamic_attr, BGP_ATOMIC_AGGR
71
	{ $$ = f_new_dynamic_attr(EAF_TYPE_OPAQUE, T_ENUM_EMPTY, EA_CODE(EAP_BGP, BA_ATOMIC_AGGR)); })
72
CF_ADDTO(dynamic_attr, BGP_AGGREGATOR
73
	{ $$ = f_new_dynamic_attr(EAF_TYPE_INT, T_INT, EA_CODE(EAP_BGP, BA_AGGREGATOR)); })
74
CF_ADDTO(dynamic_attr, BGP_COMMUNITY
75
	{ $$ = f_new_dynamic_attr(EAF_TYPE_INT_SET, T_CLIST, EA_CODE(EAP_BGP, BA_COMMUNITY)); })
54 76

  
55 77
CF_CODE
56 78

  

Also available in: Unified diff