summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/bmp.go
diff options
context:
space:
mode:
authorJieJhih Jhang <aawer12345tw@yahoo.com.tw>2019-03-23 21:52:06 +0800
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2019-03-25 20:11:44 +0900
commit80ff3a325cbced352489fa4ea4b570e5f08062ef (patch)
tree86ecd1732490a907cda674b10de71d52c4df42b0 /pkg/server/bmp.go
parenta61191604194e0ab1a4500ba57ecbec5de88b2e3 (diff)
support BMP sysName and sysDescr configuration
Diffstat (limited to 'pkg/server/bmp.go')
-rw-r--r--pkg/server/bmp.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/server/bmp.go b/pkg/server/bmp.go
index 724101ff..f96143c7 100644
--- a/pkg/server/bmp.go
+++ b/pkg/server/bmp.go
@@ -154,7 +154,12 @@ func (b *bmpClient) loop() {
return err
}
- if err := write(bmp.NewBMPInitiation([]bmp.BMPInfoTLVInterface{})); err != nil {
+ tlv := []bmp.BMPInfoTLVInterface{
+ bmp.NewBMPInfoTLVString(bmp.BMP_INIT_TLV_TYPE_SYS_NAME, b.c.SysName),
+ bmp.NewBMPInfoTLVString(bmp.BMP_INIT_TLV_TYPE_SYS_DESCR, b.c.SysDescr),
+ }
+
+ if err := write(bmp.NewBMPInitiation(tlv)); err != nil {
return false
}