zmrt

package
v0.0.0-...-69b89b4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MrtPathIterate

func MrtPathIterate(raw io.Reader, cb mrtPathCallback) error

func MrtRawIterate

func MrtRawIterate(raw io.Reader, cb mrtMessageCallback) error

func MrtSubTypeToName

func MrtSubTypeToName(t uint16) string

func MrtTypeToName

func MrtTypeToName(t mrt.MRTType) string

Types

type Attributes

type Attributes struct {
	Origin           string                          `json:"origin,omitempty"`
	LocalPref        uint32                          `json:"local_pref,omitempty"`
	Communities      []string                        `json:"communities,omitempty"`
	NextHop          net.IP                          `json:"next_hop,omitempty"`
	OriginatorId     net.IP                          `json:"originator_id,omitempty"`
	ASPath           []uint32                        `json:"as_path,omitempty"`
	AtomicAggregate  bool                            `json:"atomic_aggregate"`
	Aggregator       *From                           `json:"aggregator,omitempty"`
	MultiExitDesc    uint32                          `json:"multi_exit_desc,omitempty"`
	MpReachNLRI      *bgp.PathAttributeMpReachNLRI   `json:"mp_reach_nlri,omitempty"`
	MpUnreachNLRI    *bgp.PathAttributeMpUnreachNLRI `json:"mp_unreach_nlri,omitempty"`
	LargeCommunities []string                        `json:"large_communities,omitempty"`
}

type From

type From struct {
	AS      uint32 `json:"as,omitempty"`
	ID      net.IP `json:"id,omitempty"`
	Address net.IP `json:"address,omitempty"`
}

type RIBEntry

type RIBEntry struct {
	Type           string `json:"type"`
	SubType        string `json:"sub_type"`
	SequenceNumber uint32 `json:"sequence_number"`
	Prefix         string `json:"prefix"`
	From           From   `json:"peer"`
	AFI            uint16
	//RouteFamily    bgp.RouteFamily `json:"route_family"`
	PeerIndex      uint16     `json:"peer_index"`
	OriginatedTime time.Time  `json:"orginated_time"`
	Timestamp      time.Time  `json:"timestamp"`
	PathIdentifier uint32     `json:"path_identifier"`
	Attributes     Attributes `json:"attributes"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL