Documentation ¶
Index ¶
- func NeighborName(peerAddr string, ASN uint32, vrfName string) string
- func NewSessionManager(l log.Logger, logLevel logging.Level) bgp.SessionManager
- func ParseRoutes(vtyshRes string) (map[string]Route, error)
- func ParseVRFs(vtyshRes string) ([]string, error)
- func RouterName(srcAddr string, myASN uint32, vrfName string) string
- type BFDPeer
- type BFDProfile
- type FRRNeighbor
- type FRRRoute
- type IPInfo
- type MessageStats
- type Neighbor
- type Route
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NeighborName ¶ added in v0.14.0
neighborName() defines the format of key of the 'Neighbors' map in the routerConfig struct.
func NewSessionManager ¶
func ParseRoutes ¶
parseRoute takes the result of a show bgp neighbor and parses the informations related to all the neighbours.
Types ¶
type BFDPeer ¶
type BFDPeer struct { Multihop bool `json:"multihop"` Peer string `json:"peer"` Local string `json:"local"` Vrf string `json:"vrf"` Interface string `json:"interface"` ID int `json:"id"` RemoteID int64 `json:"remote-id"` PassiveMode bool `json:"passive-mode"` Status string `json:"status"` Uptime int `json:"uptime"` Diagnostic string `json:"diagnostic"` RemoteDiagnostic string `json:"remote-diagnostic"` ReceiveInterval int `json:"receive-interval"` TransmitInterval int `json:"transmit-interval"` EchoReceiveInterval int `json:"echo-receive-interval"` EchoTransmitInterval int `json:"echo-transmit-interval"` DetectMultiplier int `json:"detect-multiplier"` RemoteReceiveInterval int `json:"remote-receive-interval"` RemoteTransmitInterval int `json:"remote-transmit-interval"` RemoteEchoInterval int `json:"remote-echo-interval"` RemoteEchoReceiveInterval int `json:"remote-echo-receive-interval"` RemoteDetectMultiplier int `json:"remote-detect-multiplier"` }
func ParseBFDPeers ¶
type BFDProfile ¶
type BFDProfile struct { Name string ReceiveInterval *uint32 TransmitInterval *uint32 DetectMultiplier *uint32 EchoInterval *uint32 EchoMode bool PassiveMode bool MinimumTTL *uint32 }
func ConfigBFDProfileToFRR ¶ added in v0.14.0
func ConfigBFDProfileToFRR(p *metallbconfig.BFDProfile) *BFDProfile
type FRRNeighbor ¶
type FRRNeighbor struct { RemoteAs int `json:"remoteAs"` LocalAs int `json:"localAs"` RemoteRouterID string `json:"remoteRouterId"` BgpVersion int `json:"bgpVersion"` BgpState string `json:"bgpState"` PortForeign int `json:"portForeign"` MsgStats MessageStats `json:"messageStats"` VRFName string `json:"vrf"` AddressFamilyInfo map[string]struct { SentPrefixCounter int `json:"sentPrefixCounter"` } `json:"addressFamilyInfo"` }
type MessageStats ¶ added in v0.13.8
type MessageStats struct { OpensSent int `json:"opensSent"` OpensReceived int `json:"opensRecv"` NotificationsSent int `json:"notificationsSent"` UpdatesSent int `json:"updatesSent"` UpdatesReceived int `json:"updatesRecv"` KeepalivesSent int `json:"keepalivesSent"` KeepalivesReceived int `json:"keepalivesRecv"` RouteRefreshSent int `json:"routeRefreshSent"` TotalSent int `json:"totalSent"` TotalReceived int `json:"totalRecv"` }
type Neighbor ¶
type Neighbor struct { IP net.IP VRF string Connected bool LocalAS string RemoteAS string PrefixSent int Port int RemoteRouterID string MsgStats MessageStats }
func ParseNeighbour ¶
parseNeighbour takes the result of a show bgp neighbor x.y.w.z and parses the informations related to the neighbour.
func ParseNeighbours ¶
parseNeighbour takes the result of a show bgp neighbor and parses the informations related to all the neighbours.
Click to show internal directories.
Click to hide internal directories.