Documentation ¶
Index ¶
- Constants
- func SplitBMP(data []byte, atEOF bool) (advance int, token []byte, err error)
- type BMPBody
- type BMPHeader
- type BMPInitiation
- type BMPMessage
- func NewBMPInitiation(info []BMPTLV) *BMPMessage
- func NewBMPPeerDownNotification(p BMPPeerHeader, reason uint8, notification *bgp.BGPMessage, data []byte) *BMPMessage
- func NewBMPPeerUpNotification(p BMPPeerHeader, lAddr string, lPort, rPort uint16, sent, recv *bgp.BGPMessage) *BMPMessage
- func NewBMPRouteMonitoring(p BMPPeerHeader, update *bgp.BGPMessage) *BMPMessage
- func NewBMPTermination(info []BMPTLV) *BMPMessage
- func ParseBMPMessage(data []byte) (msg *BMPMessage, err error)
- type BMPPeerDownNotification
- type BMPPeerHeader
- type BMPPeerUpNotification
- type BMPRouteMonitoring
- type BMPStatisticsReport
- type BMPStatsTLV
- type BMPTLV
- type BMPTermination
Constants ¶
View Source
const ( BMP_VERSION = 3 BMP_HEADER_SIZE = 6 BMP_PEER_HEADER_SIZE = 42 )
View Source
const ( BMP_PEER_TYPE_GLOBAL uint8 = iota BMP_PEER_TYPE_L3VPN )
View Source
const ( BMP_STAT_TYPE_REJECTED = iota BMP_STAT_TYPE_DUPLICATE_PREFIX BMP_STAT_TYPE_DUPLICATE_WITHDRAW BMP_STAT_TYPE_INV_UPDATE_DUE_TO_CLUSTER_LIST_LOOP BMP_STAT_TYPE_INV_UPDATE_DUE_TO_AS_PATH_LOOP BMP_STAT_TYPE_INV_UPDATE_DUE_TO_ORIGINATOR_ID BMP_STAT_TYPE_INV_UPDATE_DUE_TO_AS_CONFED_LOOP BMP_STAT_TYPE_ADJ_RIB_IN BMP_STAT_TYPE_LOC_RIB )
View Source
const ( BMP_PEER_DOWN_REASON_UNKNOWN = iota BMP_PEER_DOWN_REASON_LOCAL_BGP_NOTIFICATION BMP_PEER_DOWN_REASON_LOCAL_NO_NOTIFICATION BMP_PEER_DOWN_REASON_REMOTE_BGP_NOTIFICATION BMP_PEER_DOWN_REASON_REMOTE_NO_NOTIFICATION )
View Source
const ( BMP_MSG_ROUTE_MONITORING = iota BMP_MSG_STATISTICS_REPORT BMP_MSG_PEER_DOWN_NOTIFICATION BMP_MSG_PEER_UP_NOTIFICATION BMP_MSG_INITIATION BMP_MSG_TERMINATION )
View Source
const (
BMP_DEFAULT_PORT = 11019
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BMPBody ¶
type BMPBody interface { // Sigh, some body messages need a BMPHeader to parse the body // data so we need to pass BMPHeader (avoid DecodeFromBytes // function name). ParseBody(*BMPMessage, []byte) error Serialize() ([]byte, error) }
type BMPHeader ¶
func (*BMPHeader) DecodeFromBytes ¶
type BMPInitiation ¶
type BMPInitiation struct {
Info []BMPTLV
}
func (*BMPInitiation) ParseBody ¶
func (body *BMPInitiation) ParseBody(msg *BMPMessage, data []byte) error
func (*BMPInitiation) Serialize ¶
func (body *BMPInitiation) Serialize() ([]byte, error)
type BMPMessage ¶
type BMPMessage struct { Header BMPHeader PeerHeader BMPPeerHeader Body BMPBody }
func NewBMPInitiation ¶
func NewBMPInitiation(info []BMPTLV) *BMPMessage
func NewBMPPeerDownNotification ¶
func NewBMPPeerDownNotification(p BMPPeerHeader, reason uint8, notification *bgp.BGPMessage, data []byte) *BMPMessage
func NewBMPPeerUpNotification ¶
func NewBMPPeerUpNotification(p BMPPeerHeader, lAddr string, lPort, rPort uint16, sent, recv *bgp.BGPMessage) *BMPMessage
func NewBMPRouteMonitoring ¶
func NewBMPRouteMonitoring(p BMPPeerHeader, update *bgp.BGPMessage) *BMPMessage
func NewBMPTermination ¶
func NewBMPTermination(info []BMPTLV) *BMPMessage
func ParseBMPMessage ¶
func ParseBMPMessage(data []byte) (msg *BMPMessage, err error)
func (*BMPMessage) Len ¶
func (msg *BMPMessage) Len() int
func (*BMPMessage) Serialize ¶
func (msg *BMPMessage) Serialize() ([]byte, error)
type BMPPeerDownNotification ¶
type BMPPeerDownNotification struct { Reason uint8 BGPNotification *bgp.BGPMessage Data []byte }
func (*BMPPeerDownNotification) ParseBody ¶
func (body *BMPPeerDownNotification) ParseBody(msg *BMPMessage, data []byte) error
func (*BMPPeerDownNotification) Serialize ¶
func (body *BMPPeerDownNotification) Serialize() ([]byte, error)
type BMPPeerHeader ¶
type BMPPeerHeader struct { PeerType uint8 IsPostPolicy bool PeerDistinguisher uint64 PeerAddress net.IP PeerAS uint32 PeerBGPID net.IP Timestamp float64 Flags uint8 }
func NewBMPPeerHeader ¶
func (*BMPPeerHeader) DecodeFromBytes ¶
func (h *BMPPeerHeader) DecodeFromBytes(data []byte) error
func (*BMPPeerHeader) Serialize ¶
func (h *BMPPeerHeader) Serialize() ([]byte, error)
type BMPPeerUpNotification ¶
type BMPPeerUpNotification struct { LocalAddress net.IP LocalPort uint16 RemotePort uint16 SentOpenMsg *bgp.BGPMessage ReceivedOpenMsg *bgp.BGPMessage }
func (*BMPPeerUpNotification) ParseBody ¶
func (body *BMPPeerUpNotification) ParseBody(msg *BMPMessage, data []byte) error
func (*BMPPeerUpNotification) Serialize ¶
func (body *BMPPeerUpNotification) Serialize() ([]byte, error)
type BMPRouteMonitoring ¶
type BMPRouteMonitoring struct { BGPUpdate *bgp.BGPMessage BGPUpdatePayload []byte }
func (*BMPRouteMonitoring) ParseBody ¶
func (body *BMPRouteMonitoring) ParseBody(msg *BMPMessage, data []byte) error
func (*BMPRouteMonitoring) Serialize ¶
func (body *BMPRouteMonitoring) Serialize() ([]byte, error)
type BMPStatisticsReport ¶
type BMPStatisticsReport struct { Count uint32 Stats []BMPStatsTLV }
func (*BMPStatisticsReport) ParseBody ¶
func (body *BMPStatisticsReport) ParseBody(msg *BMPMessage, data []byte) error
func (*BMPStatisticsReport) Serialize ¶
func (body *BMPStatisticsReport) Serialize() ([]byte, error)
type BMPStatsTLV ¶
type BMPTLV ¶
func (*BMPTLV) DecodeFromBytes ¶
type BMPTermination ¶
type BMPTermination struct {
Info []BMPTLV
}
func (*BMPTermination) ParseBody ¶
func (body *BMPTermination) ParseBody(msg *BMPMessage, data []byte) error
func (*BMPTermination) Serialize ¶
func (body *BMPTermination) Serialize() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.