From 4bce52c3f37d2e69b5184c6be472565cd6bea483 Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Wed, 24 May 2017 13:18:47 +0900 Subject: config: Add counter for BMP statistics Signed-off-by: IWASE Yusuke --- config/bgp_configs.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'config/bgp_configs.go') diff --git a/config/bgp_configs.go b/config/bgp_configs.go index 4df1503d..ab5be7f9 100644 --- a/config/bgp_configs.go +++ b/config/bgp_configs.go @@ -2168,6 +2168,10 @@ type Received struct { Keepalive uint64 `mapstructure:"keepalive" json:"keepalive,omitempty"` // original -> gobgp:DYNAMIC-CAP DynamicCap uint64 `mapstructure:"dynamic-cap" json:"dynamic-cap,omitempty"` + // original -> gobgp:WITHDRAW-UPDATE + WithdrawUpdate uint32 `mapstructure:"withdraw-update" json:"withdraw-update,omitempty"` + // original -> gobgp:WITHDRAW-PREFIX + WithdrawPrefix uint32 `mapstructure:"withdraw-prefix" json:"withdraw-prefix,omitempty"` // original -> gobgp:DISCARDED Discarded uint64 `mapstructure:"discarded" json:"discarded,omitempty"` // original -> gobgp:TOTAL @@ -2196,6 +2200,12 @@ func (lhs *Received) Equal(rhs *Received) bool { if lhs.DynamicCap != rhs.DynamicCap { return false } + if lhs.WithdrawUpdate != rhs.WithdrawUpdate { + return false + } + if lhs.WithdrawPrefix != rhs.WithdrawPrefix { + return false + } if lhs.Discarded != rhs.Discarded { return false } @@ -2219,6 +2229,10 @@ type Sent struct { Keepalive uint64 `mapstructure:"keepalive" json:"keepalive,omitempty"` // original -> gobgp:DYNAMIC-CAP DynamicCap uint64 `mapstructure:"dynamic-cap" json:"dynamic-cap,omitempty"` + // original -> gobgp:WITHDRAW-UPDATE + WithdrawUpdate uint32 `mapstructure:"withdraw-update" json:"withdraw-update,omitempty"` + // original -> gobgp:WITHDRAW-PREFIX + WithdrawPrefix uint32 `mapstructure:"withdraw-prefix" json:"withdraw-prefix,omitempty"` // original -> gobgp:DISCARDED Discarded uint64 `mapstructure:"discarded" json:"discarded,omitempty"` // original -> gobgp:TOTAL @@ -2247,6 +2261,12 @@ func (lhs *Sent) Equal(rhs *Sent) bool { if lhs.DynamicCap != rhs.DynamicCap { return false } + if lhs.WithdrawUpdate != rhs.WithdrawUpdate { + return false + } + if lhs.WithdrawPrefix != rhs.WithdrawPrefix { + return false + } if lhs.Discarded != rhs.Discarded { return false } -- cgit v1.2.3