Documentation ¶
Index ¶
- Constants
- func SplitMrt(data []byte, atEOF bool) (advance int, token []byte, err error)
- type BGP4MPHeader
- type BGP4MPMessage
- func NewBGP4MPMessage(peeras, localas uint32, intfindex uint16, peerip, localip string, isAS4 bool, ...) *BGP4MPMessage
- func NewBGP4MPMessageAddPath(peeras, localas uint32, intfindex uint16, peerip, localip string, isAS4 bool, ...) *BGP4MPMessage
- func NewBGP4MPMessageLocal(peeras, localas uint32, intfindex uint16, peerip, localip string, isAS4 bool, ...) *BGP4MPMessage
- func NewBGP4MPMessageLocalAddPath(peeras, localas uint32, intfindex uint16, peerip, localip string, isAS4 bool, ...) *BGP4MPMessage
- type BGP4MPStateChange
- type BGPState
- type Body
- type MRTHeader
- type MRTMessage
- type MRTSubTypeBGP4MP
- type MRTSubTypeTableDumpv2
- type MRTSubTyper
- type MRTType
- type Peer
- type PeerIndexTable
- type Rib
- type RibEntry
Constants ¶
View Source
const (
MRT_COMMON_HEADER_LEN = 12
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BGP4MPHeader ¶
type BGP4MPMessage ¶
type BGP4MPMessage struct { *BGP4MPHeader BGPMessage *bgp.BGPMessage BGPMessagePayload []byte // contains filtered or unexported fields }
func NewBGP4MPMessage ¶
func NewBGP4MPMessage(peeras, localas uint32, intfindex uint16, peerip, localip string, isAS4 bool, msg *bgp.BGPMessage) *BGP4MPMessage
func NewBGP4MPMessageAddPath ¶
func NewBGP4MPMessageAddPath(peeras, localas uint32, intfindex uint16, peerip, localip string, isAS4 bool, msg *bgp.BGPMessage) *BGP4MPMessage
func NewBGP4MPMessageLocal ¶
func NewBGP4MPMessageLocal(peeras, localas uint32, intfindex uint16, peerip, localip string, isAS4 bool, msg *bgp.BGPMessage) *BGP4MPMessage
func NewBGP4MPMessageLocalAddPath ¶
func NewBGP4MPMessageLocalAddPath(peeras, localas uint32, intfindex uint16, peerip, localip string, isAS4 bool, msg *bgp.BGPMessage) *BGP4MPMessage
func (*BGP4MPMessage) DecodeFromBytes ¶
func (m *BGP4MPMessage) DecodeFromBytes(data []byte) error
func (*BGP4MPMessage) Serialize ¶
func (m *BGP4MPMessage) Serialize() ([]byte, error)
func (*BGP4MPMessage) String ¶
func (m *BGP4MPMessage) String() string
type BGP4MPStateChange ¶
type BGP4MPStateChange struct { *BGP4MPHeader OldState BGPState NewState BGPState }
func NewBGP4MPStateChange ¶
func (*BGP4MPStateChange) DecodeFromBytes ¶
func (m *BGP4MPStateChange) DecodeFromBytes(data []byte) error
func (*BGP4MPStateChange) Serialize ¶
func (m *BGP4MPStateChange) Serialize() ([]byte, error)
type MRTMessage ¶
func NewMRTMessage ¶
func NewMRTMessage(timestamp uint32, t MRTType, subtype MRTSubTyper, body Body) (*MRTMessage, error)
func ParseMRTBody ¶
func ParseMRTBody(h *MRTHeader, data []byte) (*MRTMessage, error)
func (*MRTMessage) Serialize ¶
func (m *MRTMessage) Serialize() ([]byte, error)
type MRTSubTypeBGP4MP ¶
type MRTSubTypeBGP4MP uint16
const ( STATE_CHANGE MRTSubTypeBGP4MP = 0 MESSAGE MRTSubTypeBGP4MP = 1 MESSAGE_AS4 MRTSubTypeBGP4MP = 4 STATE_CHANGE_AS4 MRTSubTypeBGP4MP = 5 MESSAGE_LOCAL MRTSubTypeBGP4MP = 6 MESSAGE_AS4_LOCAL MRTSubTypeBGP4MP = 7 MESSAGE_ADDPATH MRTSubTypeBGP4MP = 8 // RFC8050 MESSAGE_AS4_ADDPATH MRTSubTypeBGP4MP = 9 // RFC8050 MESSAGE_LOCAL_ADDPATH MRTSubTypeBGP4MP = 10 // RFC8050 MESSAGE_AS4_LOCAL_ADDPATH MRTSubTypeBGP4MP = 11 // RFC8050 )
func (MRTSubTypeBGP4MP) ToUint16 ¶
func (t MRTSubTypeBGP4MP) ToUint16() uint16
type MRTSubTypeTableDumpv2 ¶
type MRTSubTypeTableDumpv2 uint16
const ( PEER_INDEX_TABLE MRTSubTypeTableDumpv2 = 1 RIB_IPV4_UNICAST MRTSubTypeTableDumpv2 = 2 RIB_IPV4_MULTICAST MRTSubTypeTableDumpv2 = 3 RIB_IPV6_UNICAST MRTSubTypeTableDumpv2 = 4 RIB_IPV6_MULTICAST MRTSubTypeTableDumpv2 = 5 RIB_GENERIC MRTSubTypeTableDumpv2 = 6 RIB_IPV4_UNICAST_ADDPATH MRTSubTypeTableDumpv2 = 8 // RFC8050 RIB_IPV4_MULTICAST_ADDPATH MRTSubTypeTableDumpv2 = 9 // RFC8050 RIB_IPV6_UNICAST_ADDPATH MRTSubTypeTableDumpv2 = 10 // RFC8050 RIB_IPV6_MULTICAST_ADDPATH MRTSubTypeTableDumpv2 = 11 // RFC8050 RIB_GENERIC_ADDPATH MRTSubTypeTableDumpv2 = 12 // RFC8050 )
func (MRTSubTypeTableDumpv2) ToUint16 ¶
func (t MRTSubTypeTableDumpv2) ToUint16() uint16
type MRTSubTyper ¶
type MRTSubTyper interface {
ToUint16() uint16
}
type MRTType ¶
type MRTType uint16
const ( NULL MRTType = 0 // deprecated START MRTType = 1 // deprecated DIE MRTType = 2 // deprecated I_AM_DEAD MRTType = 3 // deprecated PEER_DOWN MRTType = 4 // deprecated BGP MRTType = 5 // deprecated RIP MRTType = 6 // deprecated IDRP MRTType = 7 // deprecated RIPNG MRTType = 8 // deprecated BGP4PLUS MRTType = 9 // deprecated BGP4PLUS01 MRTType = 10 // deprecated OSPFv2 MRTType = 11 TABLE_DUMP MRTType = 12 TABLE_DUMPv2 MRTType = 13 BGP4MP MRTType = 16 BGP4MP_ET MRTType = 17 ISIS MRTType = 32 ISIS_ET MRTType = 33 OSPFv3 MRTType = 48 OSPFv3_ET MRTType = 49 )
type PeerIndexTable ¶
func NewPeerIndexTable ¶
func NewPeerIndexTable(bgpid string, viewname string, peers []*Peer) *PeerIndexTable
func (*PeerIndexTable) DecodeFromBytes ¶
func (t *PeerIndexTable) DecodeFromBytes(data []byte) error
func (*PeerIndexTable) Serialize ¶
func (t *PeerIndexTable) Serialize() ([]byte, error)
func (*PeerIndexTable) String ¶
func (t *PeerIndexTable) String() string
type Rib ¶
type Rib struct { SequenceNumber uint32 Prefix bgp.AddrPrefixInterface Entries []*RibEntry RouteFamily bgp.RouteFamily // contains filtered or unexported fields }
func (*Rib) DecodeFromBytes ¶
type RibEntry ¶
type RibEntry struct { PeerIndex uint16 OriginatedTime uint32 PathIdentifier uint32 PathAttributes []bgp.PathAttributeInterface // contains filtered or unexported fields }
func NewRibEntry ¶
Click to show internal directories.
Click to hide internal directories.