diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-04-12 09:39:09 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-04-12 09:39:09 +0900 |
commit | 9c3e5b159c6c9cc2f42302045006af721e33e2e9 (patch) | |
tree | 1162f97a33fd4dd67cd06f087bac29c81348d7b4 /gobmpd/main.go | |
parent | 8daa5116576b3e3582e6c8e05ae1b64f56197ec6 (diff) |
packet: create bmp package
move bmp stuff from bgp to bmp package.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'gobmpd/main.go')
-rw-r--r-- | gobmpd/main.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gobmpd/main.go b/gobmpd/main.go index c6cf99a4..a91d3752 100644 --- a/gobmpd/main.go +++ b/gobmpd/main.go @@ -20,7 +20,7 @@ import ( "encoding/json" "fmt" log "github.com/Sirupsen/logrus" - "github.com/osrg/gobgp/packet/bgp" + "github.com/osrg/gobgp/packet/bmp" "net" "os" "strconv" @@ -29,10 +29,10 @@ import ( func connLoop(conn *net.TCPConn) { addr := conn.RemoteAddr() scanner := bufio.NewScanner(bufio.NewReader(conn)) - scanner.Split(bgp.SplitBMP) + scanner.Split(bmp.SplitBMP) for scanner.Scan() { - msg, err := bgp.ParseBMPMessage(scanner.Bytes()) + msg, err := bmp.ParseBMPMessage(scanner.Bytes()) if err != nil { log.Info(err) continue @@ -44,7 +44,7 @@ func connLoop(conn *net.TCPConn) { } func main() { - service := ":" + strconv.Itoa(bgp.BMP_DEFAULT_PORT) + service := ":" + strconv.Itoa(bmp.BMP_DEFAULT_PORT) addr, _ := net.ResolveTCPAddr("tcp", service) l, err := net.ListenTCP("tcp", addr) |