summaryrefslogtreecommitdiffhomepage
path: root/bgpd.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-03 12:23:43 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-03 12:23:43 +0900
commitf0ae221b894fdd02f697f4fb6994623082e2175e (patch)
treea75e87baad198d843e5201099563713886edfb28 /bgpd.go
parentd387fd92e71a42e243cedef32f0812c72474c418 (diff)
update the whole code for the latest openconfig yang files
The modified openconfig yang files are available at: https://github.com/osrg/yang/tree/gobgp Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'bgpd.go')
-rw-r--r--bgpd.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/bgpd.go b/bgpd.go
index 3f296e98..7053783b 100644
--- a/bgpd.go
+++ b/bgpd.go
@@ -136,7 +136,7 @@ func main() {
opts.ConfigFile = "gobgpd.conf"
}
- configCh := make(chan config.BgpType)
+ configCh := make(chan config.Bgp)
reloadCh := make(chan bool)
go config.ReadConfigfileServe(opts.ConfigFile, configCh, reloadCh)
reloadCh <- true
@@ -148,18 +148,18 @@ func main() {
restServer := api.NewRestServer(api.REST_PORT, bgpServer.RestReqCh)
go restServer.Serve()
- var bgpConfig *config.BgpType = nil
+ var bgpConfig *config.Bgp = nil
for {
select {
case newConfig := <-configCh:
- var added []config.NeighborType
- var deleted []config.NeighborType
+ var added []config.Neighbor
+ var deleted []config.Neighbor
if bgpConfig == nil {
bgpServer.SetGlobalType(newConfig.Global)
bgpConfig = &newConfig
added = newConfig.NeighborList
- deleted = []config.NeighborType{}
+ deleted = []config.Neighbor{}
} else {
bgpConfig, added, deleted = config.UpdateConfig(bgpConfig, &newConfig)
}