Documentation ¶
Index ¶
Constants ¶
const ( // CommonHeaderLength defines the length of BMP's Common header CommonHeaderLength = 6 // PerPeerHeaderLength defines the length of BMP's Per Peer Header PerPeerHeaderLength = 42 // RouteMonitorMsg defines BMP Route Monitor message type RouteMonitorMsg = 0 // StatsReportMsg defines BMP Statistics Report message StatsReportMsg = 1 // PeerDownMsg defines BMP Peer Down message PeerDownMsg = 2 // PeerUpMsg defines BMP Peer Up message PeerUpMsg = 3 // InitiationMsg defines BMP Initiation message InitiationMsg = 4 // TerminationMsg defines BMP Termination message TerminationMsg = 5 // RouteMirrorMsg defines BMP Route Mirror message type RouteMirrorMsg = 6 // UnicastPrefixMsg defines a subtype of BMP Route Monitoring message UnicastPrefixMsg = 7 // LSNodeMsg defines a subtype of BMP Route Monitoring message LSNodeMsg = 8 // LSLinkMsg defines a subtype of BMP Route Monitoring message LSLinkMsg = 9 // PeerStateChangeMsg defines BMP Peer Up/Down message PeerStateChangeMsg = 10 // L3VPNMsg defines BMP Peer Layer 3 VPN message L3VPNMsg = 11 // LSPrefixMsg defines BMP Route Monitoring message carrying Prefix NLRI LSPrefixMsg = 12 // LSSRv6SIDMsg defines BMP Route Monitoring message carrying SRv6 SID NLRI LSSRv6SIDMsg = 13 // EVPNMsg defines BMP Route Monitoring message carrying EVPN NLRI EVPNMsg = 14 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonHeader ¶
CommonHeader defines BMP message Common Header per rfc7854
func UnmarshalCommonHeader ¶
func UnmarshalCommonHeader(b []byte) (*CommonHeader, error)
UnmarshalCommonHeader processes Common Header and returns BMPCommonHeader object
type InformationalTLV ¶
InformationalTLV defines Informational TLV per rfc7854
func UnmarshalTLV ¶
func UnmarshalTLV(b []byte) ([]InformationalTLV, error)
UnmarshalTLV builds a slice of Informational TLVs
type InitiationMessage ¶
type InitiationMessage struct {
TLV []InformationalTLV
}
InitiationMessage defines BMP Initiation Message per rfc7854
func UnmarshalInitiationMessage ¶
func UnmarshalInitiationMessage(b []byte) (*InitiationMessage, error)
UnmarshalInitiationMessage processes Initiation Message and returns BMPInitiationMessage object
type Message ¶
type Message struct { PeerHeader *PerPeerHeader Payload interface{} }
Message defines a message used to transfer BMP messages for further processing for BMP messages which do not carry PerPeerHeader, it will be set to nil.
type PeerDistinguisher ¶
type PeerDistinguisher struct {
// contains filtered or unexported fields
}
PeerDistinguisher defines an object for Peer's Distinguisher manipulations
func (*PeerDistinguisher) String ¶
func (pd *PeerDistinguisher) String() string
type PeerDownMessage ¶
PeerDownMessage defines BMPPeerDownMessage per rfc7854
func UnmarshalPeerDownMessage ¶
func UnmarshalPeerDownMessage(b []byte) (*PeerDownMessage, error)
UnmarshalPeerDownMessage processes Peer Down message and returns BMPPeerDownMessage object
type PeerUpMessage ¶
type PeerUpMessage struct { LocalAddress []byte LocalPort uint16 RemotePort uint16 SentOpen *bgp.OpenMessage ReceivedOpen *bgp.OpenMessage Information []InformationalTLV }
PeerUpMessage defines BMPPeerUpMessage per rfc7854
func UnmarshalPeerUpMessage ¶
func UnmarshalPeerUpMessage(b []byte) (*PeerUpMessage, error)
UnmarshalPeerUpMessage processes Peer Up message and returns BMPPeerUpMessage object
type PerPeerHeader ¶
type PerPeerHeader struct { PeerType byte FlagV bool FlagL bool FlagA bool PeerDistinguisher *PeerDistinguisher PeerAddress []byte PeerAS int32 PeerBGPID []byte PeerTimestamp string }
PerPeerHeader defines BMP Per-Peer Header per rfc7854
func UnmarshalPerPeerHeader ¶
func UnmarshalPerPeerHeader(b []byte) (*PerPeerHeader, error)
UnmarshalPerPeerHeader processes Per-Peer header
func (*PerPeerHeader) GetPeerAddrString ¶
func (p *PerPeerHeader) GetPeerAddrString() string
GetPeerAddrString returns a string representation of Peer address
func (*PerPeerHeader) GetPeerHash ¶
func (p *PerPeerHeader) GetPeerHash() string
GetPeerHash calculates Peer Hash and returns as a hex string
type RouteMonitor ¶
RouteMonitor defines a structure of BMP Route Monitoring message
func UnmarshalBMPRouteMonitorMessage ¶
func UnmarshalBMPRouteMonitorMessage(b []byte) (*RouteMonitor, error)
UnmarshalBMPRouteMonitorMessage builds BMP Route Monitor object
type StatsReport ¶
type StatsReport struct { StatsCount int32 StatsTLV []InformationalTLV }
StatsReport defines BMP Stats message structure
func UnmarshalBMPStatsReportMessage ¶
func UnmarshalBMPStatsReportMessage(b []byte) (*StatsReport, error)
UnmarshalBMPStatsReportMessage builds BMP Stats Reports object