summaryrefslogtreecommitdiffhomepage
path: root/server/watcher.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-04-11 09:09:50 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-03-31 14:28:04 +0900
commit6d401bedf5a947444a66daf5312719f6dba8b381 (patch)
tree3372759000a7347cc96004602fcad2d683ef7c39 /server/watcher.go
parent59420a4c4623492085348e07fb78eaae51182782 (diff)
packet: create mrt package
move mrt stuff from bgp to mrt package. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/watcher.go')
-rw-r--r--server/watcher.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/watcher.go b/server/watcher.go
index d3befa0e..d08a6ef3 100644
--- a/server/watcher.go
+++ b/server/watcher.go
@@ -19,6 +19,7 @@ import (
"bytes"
log "github.com/Sirupsen/logrus"
"github.com/osrg/gobgp/packet/bgp"
+ "github.com/osrg/gobgp/packet/mrt"
"github.com/osrg/gobgp/table"
"gopkg.in/tomb.v2"
"net"
@@ -137,13 +138,13 @@ func (w *mrtWatcher) loop() error {
for {
serialize := func(ev watcherEvent) ([]byte, error) {
m := ev.(*watcherEventUpdateMsg)
- subtype := bgp.MESSAGE_AS4
- mp := bgp.NewBGP4MPMessage(m.peerAS, m.localAS, 0, m.peerAddress.String(), m.localAddress.String(), m.fourBytesAs, nil)
+ subtype := mrt.MESSAGE_AS4
+ mp := mrt.NewBGP4MPMessage(m.peerAS, m.localAS, 0, m.peerAddress.String(), m.localAddress.String(), m.fourBytesAs, nil)
mp.BGPMessagePayload = m.payload
if m.fourBytesAs == false {
- subtype = bgp.MESSAGE
+ subtype = mrt.MESSAGE
}
- bm, err := bgp.NewMRTMessage(uint32(m.timestamp.Unix()), bgp.BGP4MP, subtype, mp)
+ bm, err := mrt.NewMRTMessage(uint32(m.timestamp.Unix()), mrt.BGP4MP, subtype, mp)
if err != nil {
log.WithFields(log.Fields{
"Topic": "mrt",