diff --git a/protocols/bmp/packet/BUILD.bazel b/protocols/bmp/packet/BUILD.bazel index 4f2b195ecf31c771122c40cfde3036e9b8538c45..2d2f9e66c8def79ee141970e484a0fe222be523d 100644 --- a/protocols/bmp/packet/BUILD.bazel +++ b/protocols/bmp/packet/BUILD.bazel @@ -19,7 +19,7 @@ go_library( visibility = ["//visibility:public"], deps = [ "//util/decoder:go_default_library", - "@com_github_bio_routing_tflow2//convert:go_default_library", + "//vendor/github.com/taktv6/tflow2/convert:go_default_library", ], ) diff --git a/protocols/bmp/packet/common_header.go b/protocols/bmp/packet/common_header.go index 17d9a95e8da948f6b9cb90785c09a5ec0866ab86..5b268355fb07c67ddb619fc5c1f04702bb338035 100644 --- a/protocols/bmp/packet/common_header.go +++ b/protocols/bmp/packet/common_header.go @@ -4,19 +4,22 @@ import ( "bytes" "github.com/bio-routing/bio-rd/util/decoder" - "github.com/bio-routing/tflow2/convert" + "github.com/taktv6/tflow2/convert" ) const ( + // CommonHeaderLen is the length of a common header CommonHeaderLen = 6 ) +// CommonHeader represents a common header type CommonHeader struct { Version uint8 MsgLength uint32 MsgType uint8 } +// Serialize serializes a common header func (c *CommonHeader) Serialize(buf *bytes.Buffer) { buf.WriteByte(c.Version) buf.Write(convert.Uint32Byte(c.MsgLength)) diff --git a/protocols/bmp/packet/per_peer_header.go b/protocols/bmp/packet/per_peer_header.go index f17a92014a496f68d6f1af280f854c6b434ac01a..d03f8b43d5d52b6dd705329c0bb10f834d39a15d 100644 --- a/protocols/bmp/packet/per_peer_header.go +++ b/protocols/bmp/packet/per_peer_header.go @@ -4,7 +4,7 @@ import ( "bytes" "github.com/bio-routing/bio-rd/util/decoder" - "github.com/bio-routing/tflow2/convert" + "github.com/taktv6/tflow2/convert" ) const ( diff --git a/protocols/bmp/server/router.go b/protocols/bmp/server/router.go index b720750f00724ae9d6b1ee3a56c513c756f2f7af..8e12f604e16fe21b51e170e20c887b511141f05b 100644 --- a/protocols/bmp/server/router.go +++ b/protocols/bmp/server/router.go @@ -1,6 +1,7 @@ package server import ( + "fmt" "net" "time" @@ -33,6 +34,8 @@ func (r *router) serve() { return } + // TODO: Finish implementation + fmt.Printf("%v\n", bmpMsg) } }