summaryrefslogtreecommitdiffstats
path: root/proto/bgp/config.Y
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-03-20 22:50:17 +0100
committerMartin Mares <mj@ucw.cz>2000-03-20 22:50:17 +0100
commitc01e37416d09a92bf838250a15fe99fdc48bc010 (patch)
treec10e7963b18993c97a3f33746677d6814477ea9a /proto/bgp/config.Y
parent1cf716f0751ce1d146d6d5114cb36686844d4817 (diff)
downloadbird-c01e37416d09a92bf838250a15fe99fdc48bc010.tar
bird-c01e37416d09a92bf838250a15fe99fdc48bc010.zip
Started work on BGP. Wrote main part of the connection handling code.
Diffstat (limited to 'proto/bgp/config.Y')
-rw-r--r--proto/bgp/config.Y10
1 files changed, 9 insertions, 1 deletions
diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y
index f66f358..f50b060 100644
--- a/proto/bgp/config.Y
+++ b/proto/bgp/config.Y
@@ -14,7 +14,8 @@ CF_HDR
CF_DECLS
-CF_KEYWORDS(BGP, LOCAL, NEIGHBOR, AS)
+CF_KEYWORDS(BGP, LOCAL, NEIGHBOR, AS, HOLD, TIME, CONNECT, RETRY, KEEPALIVE,
+ MULTIHOP)
CF_GRAMMAR
@@ -23,6 +24,9 @@ CF_ADDTO(proto, bgp_proto '}' { bgp_check(BGP_CFG); } )
bgp_proto_start: proto_start BGP {
this_proto = proto_config_new(&proto_bgp, sizeof(struct bgp_config));
this_proto->preference = DEF_PREF_BGP;
+ BGP_CFG->hold_time = 240;
+ BGP_CFG->connect_retry_time = 120;
+ BGP_CFG->keepalive_time = 30;
}
;
@@ -38,6 +42,10 @@ bgp_proto:
BGP_CFG->remote_ip = $3;
BGP_CFG->remote_as = $5;
}
+ | bgp_proto HOLD TIME NUM ';' { BGP_CFG->hold_time = $4; }
+ | bgp_proto CONNECT RETRY TIME NUM ';' { BGP_CFG->connect_retry_time = $5; }
+ | bgp_proto KEEPALIVE TIME NUM ';' { BGP_CFG->connect_retry_time = $4; }
+ | bgp_proto MULTIHOP NUM ';' { BGP_CFG->multihop = $3; }
;
CF_CODE