Documentation ¶
Overview ¶
Package bgpls is a bgp link-state collector library for Go
Index ¶
- Variables
- type AsPathSegment
- type AsPathSegmentSequence
- type AsPathSegmentSet
- type AsPathSegmentType
- type BaseEvent
- type Collector
- type CollectorConfig
- type Event
- type EventNeighborErr
- type EventNeighborHoldTimerExpired
- type EventNeighborNotificationReceived
- type EventNeighborStateTransition
- type EventNeighborUpdateReceived
- type EventType
- type FSMState
- type LinkAttr
- type LinkAttrAdjSID
- type LinkAttrAdjSIDFlags
- type LinkAttrAdjSIDFlagsIsIs
- type LinkAttrAdjSIDFlagsOspf
- type LinkAttrAdjSIDFlagsType
- type LinkAttrAdminGroup
- type LinkAttrCode
- type LinkAttrIgpMetric
- type LinkAttrIgpMetricType
- type LinkAttrL2BundleMember
- type LinkAttrLanAdjSID
- type LinkAttrLanAdjSIDProtoSpecificID
- type LinkAttrLanAdjSIDProtoSpecificIDIsIs
- type LinkAttrLanAdjSIDProtoSpecificIDOspf
- type LinkAttrLanAdjSIDProtoSpecificIDType
- type LinkAttrLinkName
- type LinkAttrLinkProtectionType
- type LinkAttrMaxLinkBandwidth
- type LinkAttrMaxReservableLinkBandwidth
- type LinkAttrMinMaxUniLinkDelay
- type LinkAttrMplsProtocolMask
- type LinkAttrOpaqueLinkAttr
- type LinkAttrPeerAdjSID
- type LinkAttrPeerNodeSID
- type LinkAttrPeerSetSID
- type LinkAttrRemoteIPv4RouterID
- type LinkAttrRemoteIPv6RouterID
- type LinkAttrSharedRiskLinkGroup
- type LinkAttrTEDefaultMetric
- type LinkAttrUniAvailableBandwidth
- type LinkAttrUniBandwidthUtil
- type LinkAttrUniDelayVariation
- type LinkAttrUniLinkDelay
- type LinkAttrUniPacketLoss
- type LinkAttrUniResidualBandwidth
- type LinkAttrUnreservedBandwidth
- type LinkDescriptor
- type LinkDescriptorCode
- type LinkDescriptorIPv4InterfaceAddress
- type LinkDescriptorIPv4NeighborAddress
- type LinkDescriptorIPv6InterfaceAddress
- type LinkDescriptorIPv6NeighborAddress
- type LinkDescriptorLinkIDs
- type LinkDescriptorMultiTopologyID
- type LinkStateNlri
- type LinkStateNlriDescriptorCode
- type LinkStateNlriIPv4Prefix
- type LinkStateNlriIPv6Prefix
- type LinkStateNlriLink
- type LinkStateNlriNode
- type LinkStateNlriPrefix
- type LinkStateNlriProtocolID
- type LinkStateNlriType
- type Message
- type MessageType
- type MultiprotoAfi
- type MultiprotoSafi
- type NeighborConfig
- type NodeAttr
- type NodeAttrCode
- type NodeAttrIsIsAreaID
- type NodeAttrLocalIPv4RouterID
- type NodeAttrLocalIPv6RouterID
- type NodeAttrMultiTopologyID
- type NodeAttrNodeFlagBits
- type NodeAttrNodeName
- type NodeAttrOpaqueNodeAttr
- type NodeAttrSRAlgo
- type NodeAttrSRCaps
- type NodeAttrSRLocalBlock
- type NodeAttrSRMSPref
- type NodeDescriptor
- type NodeDescriptorASN
- type NodeDescriptorBgpLsID
- type NodeDescriptorBgpRouterID
- type NodeDescriptorCode
- type NodeDescriptorIgpRouterIDIsIsNonPseudo
- type NodeDescriptorIgpRouterIDIsIsPseudo
- type NodeDescriptorIgpRouterIDOspfNonPseudo
- type NodeDescriptorIgpRouterIDOspfPseudo
- type NodeDescriptorIgpRouterIDType
- type NodeDescriptorMemberASN
- type NodeDescriptorOspfAreaID
- type NotifErrCode
- type NotifErrSubcode
- type NotificationMessage
- type OriginCode
- type OspfRouteType
- type PathAttr
- type PathAttrAsPath
- type PathAttrFlags
- type PathAttrLinkState
- type PathAttrLocalPref
- type PathAttrMpReach
- type PathAttrMpUnreach
- type PathAttrOrigin
- type PathAttrType
- type PrefixAttr
- type PrefixAttrCode
- type PrefixAttrFlagsIsIs
- type PrefixAttrFlagsOSPFv2
- type PrefixAttrFlagsOSPFv3
- type PrefixAttrIgpExtendedRouteTag
- type PrefixAttrIgpFlags
- type PrefixAttrIgpRouteTag
- type PrefixAttrOpaquePrefixAttribute
- type PrefixAttrOspfForwardingAddress
- type PrefixAttrPrefixMetric
- type PrefixAttrPrefixSID
- type PrefixAttrPrefixSIDFlags
- type PrefixAttrPrefixSIDFlagsIsIs
- type PrefixAttrPrefixSIDFlagsOspf
- type PrefixAttrPrefixSIDFlagsType
- type PrefixAttrRange
- type PrefixAttrRangeFlags
- type PrefixAttrRangeFlagsIsIs
- type PrefixAttrRangeFlagsOspf
- type PrefixAttrRangeFlagsType
- type PrefixAttrSourceRouterID
- type PrefixDescriptor
- type PrefixDescriptorCode
- type PrefixDescriptorIPReachabilityInfo
- type PrefixDescriptorMultiTopologyID
- type PrefixDescriptorOspfRouteType
- type RangeSIDLabel
- type SIDIndexLabel
- type SIDIndexLabelLabel
- type SIDIndexLabelOffset
- type SIDIndexLabelType
- type SIDLabel
- type SIDLabelLabel
- type SIDLabelSID
- type SIDLabelType
- type UpdateMessage
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCollectorStopped = errors.New("collector is stopped")
ErrCollectorStopped is returned when an operation is not valid due to the collector being stopped
Functions ¶
This section is empty.
Types ¶
type AsPathSegment ¶
type AsPathSegment interface { Type() AsPathSegmentType // contains filtered or unexported methods }
AsPathSegment is contained in an as-path path attribute
type AsPathSegmentSequence ¶
type AsPathSegmentSequence struct {
Sequence []uint16
}
AsPathSegmentSequence is an ordered as-path segment
func (*AsPathSegmentSequence) Type ¶
func (a *AsPathSegmentSequence) Type() AsPathSegmentType
Type returns the appropriate AsPathSegmentType for AsPathSegmentSequence
type AsPathSegmentSet ¶
type AsPathSegmentSet struct {
Set []uint16
}
AsPathSegmentSet is an unordered as-path segment
func (*AsPathSegmentSet) Type ¶
func (a *AsPathSegmentSet) Type() AsPathSegmentType
Type returns the appropriate AsPathSegmentType for AsPathSegmentSet
type AsPathSegmentType ¶
type AsPathSegmentType uint8
AsPathSegmentType describes the type of AsPathSegment
const ( AsPathSegmentSetType AsPathSegmentType = 1 AsPathSegmentSequenceType AsPathSegmentType = 2 )
AsPathSegmentType values
type BaseEvent ¶
type BaseEvent struct {
// contains filtered or unexported fields
}
BaseEvent is included in every Event
func (*BaseEvent) Neighbor ¶
func (b *BaseEvent) Neighbor() *NeighborConfig
Neighbor returns the NeighborConfig associated with the event
type Collector ¶
type Collector interface { Events() (<-chan Event, error) Config() *CollectorConfig AddNeighbor(c *NeighborConfig) error DeleteNeighbor(address net.IP) error Neighbors() ([]*NeighborConfig, error) Stop() }
Collector is a BGP Link-State collector
Events() returns the events channel or an error if the collector has been stopped. The events channel is buffered, its size is configurable via CollectorConfig. The events channel should be read from in a loop. It will close only when Stop() is called.
Config() returns the configuration of the Collector.
AddNeighbor() initializes a new bgp-ls neighbor. An error is returned if the collector is stopped or the neighbor already exists.
DeleteNeighbor() shuts down and removes a neighbor from the collector. An error is returned if the collector is stopped or the neighbor does not exist.
Neighbors() returns the configuration of all neighbors.
Stop() stops the collector and all neighbors.
Example ¶
package main import ( "log" "net" "time" "github.com/jwhited/bgpls" ) func main() { collectorConfig := &bgpls.CollectorConfig{ ASN: uint32(64512), RouterID: net.ParseIP("1.2.3.4"), EventBufferSize: 1024, } collector, err := bgpls.NewCollector(collectorConfig) if err != nil { log.Fatal(err) } neighborConfig := &bgpls.NeighborConfig{ Address: net.ParseIP("172.16.1.201"), ASN: uint32(64512), HoldTime: time.Second * 30, } err = collector.AddNeighbor(neighborConfig) if err != nil { log.Fatal(err) } eventsChan, err := collector.Events() if err != nil { log.Fatal(err) } for { event := <-eventsChan // all Event types can be found in event.go (EventNeighbor**) switch e := event.(type) { case *bgpls.EventNeighborErr: log.Printf("neighbor %s, err: %v", e.Neighbor().Address, e.Err) case *bgpls.EventNeighborStateTransition: log.Printf("neighbor %s, state transition: %v", e.Neighbor().Address, e.State) case *bgpls.EventNeighborNotificationReceived: log.Printf("neighbor %s notification message code: %v", e.Neighbor().Address, e.Message.Code) case *bgpls.EventNeighborUpdateReceived: log.Printf("neighbor %s update message", e.Neighbor().Address) } } }
Output:
func NewCollector ¶
func NewCollector(config *CollectorConfig) (Collector, error)
NewCollector creates a Collector.
type CollectorConfig ¶
CollectorConfig is the configuration for the Collector. EventBufferSize is the size of the buffered events channel returned from the Events() Collector method. It should be set to a value appropriate from a memory consumption perspective. Setting this value too low can inhibit bgp io.
type Event ¶
type Event interface { Neighbor() *NeighborConfig Timestamp() time.Time Type() EventType }
Event is a Collector event associated with a neighbor.
Neighbor() returns the associated neighbor's configuration.
Timestamp() returns the time at which the event occurred.
Type() returns the event type.
type EventNeighborErr ¶
EventNeighborErr is generated when a neighbor encounters an error
func (*EventNeighborErr) Type ¶
func (e *EventNeighborErr) Type() EventType
Type returns the appropriate EventType for EventNeighborErr
type EventNeighborHoldTimerExpired ¶
type EventNeighborHoldTimerExpired struct {
BaseEvent
}
EventNeighborHoldTimerExpired is generated when a neighbor's hold timer expires
func (*EventNeighborHoldTimerExpired) Type ¶
func (e *EventNeighborHoldTimerExpired) Type() EventType
Type returns the appropriate EventType for EventNeighborHoldTimerExpired
type EventNeighborNotificationReceived ¶
type EventNeighborNotificationReceived struct { BaseEvent Message *NotificationMessage }
EventNeighborNotificationReceived is generated when a notification message is received
func (*EventNeighborNotificationReceived) Type ¶
func (e *EventNeighborNotificationReceived) Type() EventType
Type returns the appropriate EventType for EventNeighborNotificationReceived
type EventNeighborStateTransition ¶
EventNeighborStateTransition is generated when a neighbor's fsm transitions to a new state
func (*EventNeighborStateTransition) Type ¶
func (e *EventNeighborStateTransition) Type() EventType
Type returns the appropriate EventType for EventNeighborStateTransition
type EventNeighborUpdateReceived ¶
type EventNeighborUpdateReceived struct { BaseEvent Message *UpdateMessage }
EventNeighborUpdateReceived is generated when an update message is received
func (*EventNeighborUpdateReceived) Type ¶
func (e *EventNeighborUpdateReceived) Type() EventType
Type returns the appropriate EventType for EventNeighborUpdateReceived
type EventType ¶
type EventType int
EventType describes the type of event
const ( EventTypeNeighborErr EventType EventTypeNeighborHoldTimerExpired EventTypeNeighborStateTransition EventTypeNeighborUpdateReceived EventTypeNeighborNotificationReceived )
EventType values
type FSMState ¶
type FSMState uint8
FSMState describes the state of a neighbor's fsm
type LinkAttr ¶
type LinkAttr interface { Code() LinkAttrCode // contains filtered or unexported methods }
LinkAttr is a link attribute contained in a bgp-ls attribute.
type LinkAttrAdjSID ¶
type LinkAttrAdjSID struct { Flags LinkAttrAdjSIDFlags Weight uint8 SIDIndexLabel SIDIndexLabel }
LinkAttrAdjSID is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.2.1
func (*LinkAttrAdjSID) Code ¶
func (l *LinkAttrAdjSID) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrCodeAdjSID.
type LinkAttrAdjSIDFlags ¶
type LinkAttrAdjSIDFlags interface { Type() LinkAttrAdjSIDFlagsType // contains filtered or unexported methods }
LinkAttrAdjSIDFlags are contained in the LinkAttrAdjSID link attribute.
type LinkAttrAdjSIDFlagsIsIs ¶
type LinkAttrAdjSIDFlagsIsIs struct { AddressFamily bool Backup bool Value bool Local bool Set bool Persistent bool }
LinkAttrAdjSIDFlagsIsIs are contained in the LinkAttrAdjSID link attribute.
https://tools.ietf.org/html/draft-ietf-isis-segment-routing-extensions-15#section-2.2.1
func (*LinkAttrAdjSIDFlagsIsIs) Type ¶
func (l *LinkAttrAdjSIDFlagsIsIs) Type() LinkAttrAdjSIDFlagsType
Type returns the appropriate LinkAttrAdjSIDFlagsType for LinkAttrAdjSIDFlagsIsIs
type LinkAttrAdjSIDFlagsOspf ¶
type LinkAttrAdjSIDFlagsOspf struct { Backup bool Value bool Local bool Group bool Persistent bool }
LinkAttrAdjSIDFlagsOspf are contained in the LinkAttrAdjSID link attribute.
https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-24#section-6.1
func (*LinkAttrAdjSIDFlagsOspf) Type ¶
func (l *LinkAttrAdjSIDFlagsOspf) Type() LinkAttrAdjSIDFlagsType
Type returns the appropriate LinkAttrAdjSIDFlagsType for LinkAttrAdjSIDFlagsOspf
type LinkAttrAdjSIDFlagsType ¶
type LinkAttrAdjSIDFlagsType uint8
LinkAttrAdjSIDFlagsType describes the type of LinkAttrAdjSIDFlags
const ( LinkAttrAdjSIDFlagsTypeIsIs LinkAttrAdjSIDFlagsType = iota LinkAttrAdjSIDFlagsTypeOspf )
LinkAttrAdjSIDFlags values
type LinkAttrAdminGroup ¶
type LinkAttrAdminGroup struct {
Group [32]bool
}
LinkAttrAdminGroup is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc5305#section-3.1
func (*LinkAttrAdminGroup) Code ¶
func (l *LinkAttrAdminGroup) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrAdminGroup.
type LinkAttrCode ¶
type LinkAttrCode uint16
LinkAttrCode describes the type of node attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.2
const ( LinkAttrCodeRemoteIPv4RouterID LinkAttrCode = 1030 LinkAttrCodeRemoteIPv6RouterID LinkAttrCode = 1031 LinkAttrCodeAdminGroup LinkAttrCode = 1088 LinkAttrCodeMaxLinkBandwidth LinkAttrCode = 1089 LinkAttrCodeMaxReservableLinkBandwidth LinkAttrCode = 1090 LinkAttrCodeUnreservedBandwidth LinkAttrCode = 1091 LinkAttrCodeTEDefaultMetric LinkAttrCode = 1092 LinkAttrCodeLinkProtectionType LinkAttrCode = 1093 LinkAttrCodeMplsProtocolMask LinkAttrCode = 1094 LinkAttrCodeIgpMetric LinkAttrCode = 1095 LinkAttrCodeOpaqueLinkAttr LinkAttrCode = 1097 LinkAttrCodeLinkName LinkAttrCode = 1098 LinkAttrCodeAdjSID LinkAttrCode = 1099 LinkAttrCodeLanAdjSID LinkAttrCode = 1100 LinkAttrCodePeerNodeSID LinkAttrCode = 1101 LinkAttrCodePeerAdjSID LinkAttrCode = 1102 LinkAttrCodePeerSetSID LinkAttrCode = 1103 LinkAttrCodeUniLinkDelay LinkAttrCode = 1114 LinkAttrCodeMinMaxUniLinkDelay LinkAttrCode = 1115 LinkAttrCodeUniDelayVariation LinkAttrCode = 1116 LinkAttrCodeUniPacketLoss LinkAttrCode = 1117 LinkAttrCodeUniResidualBandwidth LinkAttrCode = 1118 LinkAttrCodeUniAvailableBandwidth LinkAttrCode = 1119 LinkAttrCodeUniBandwidthUtil LinkAttrCode = 1120 LinkAttrCodeL2BundleMember LinkAttrCode = 1172 )
LinkAttrCode values
type LinkAttrIgpMetric ¶
type LinkAttrIgpMetric struct { Metric uint32 Type LinkAttrIgpMetricType }
LinkAttrIgpMetric is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.2.4
func (*LinkAttrIgpMetric) Code ¶
func (l *LinkAttrIgpMetric) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrIgpMetric.
type LinkAttrIgpMetricType ¶
type LinkAttrIgpMetricType uint8
LinkAttrIgpMetricType describes the type of igp metric contained in a LinkAttrIgpMetric
https://tools.ietf.org/html/rfc7752#section-3.3.2.4
const ( LinkAttrIgpMetricIsIsSmallType LinkAttrIgpMetricType = iota LinkAttrIgpMetricOspfType LinkAttrIgpMetricIsIsWideType )
LinkAttrIgpMetricType values
type LinkAttrL2BundleMember ¶
LinkAttrL2BundleMember is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.2.3
func (*LinkAttrL2BundleMember) Code ¶
func (l *LinkAttrL2BundleMember) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrL2BundleMember
type LinkAttrLanAdjSID ¶
type LinkAttrLanAdjSID struct { Flags LinkAttrAdjSIDFlags Weight uint8 NeighborIDSystemID LinkAttrLanAdjSIDProtoSpecificID SIDIndexLabel SIDIndexLabel }
LinkAttrLanAdjSID is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.2.2
func (*LinkAttrLanAdjSID) Code ¶
func (l *LinkAttrLanAdjSID) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrLanAdjSID
type LinkAttrLanAdjSIDProtoSpecificID ¶
type LinkAttrLanAdjSIDProtoSpecificID interface { Type() LinkAttrLanAdjSIDProtoSpecificIDType // contains filtered or unexported methods }
LinkAttrLanAdjSIDProtoSpecificID is contained in the LinkAttrLanAdjSID link attribute.
type LinkAttrLanAdjSIDProtoSpecificIDIsIs ¶
type LinkAttrLanAdjSIDProtoSpecificIDIsIs struct {
SystemID [6]byte
}
LinkAttrLanAdjSIDProtoSpecificIDIsIs is contained in a LinkAttrLanAdjSID link attribute.
func (*LinkAttrLanAdjSIDProtoSpecificIDIsIs) Type ¶
func (l *LinkAttrLanAdjSIDProtoSpecificIDIsIs) Type() LinkAttrLanAdjSIDProtoSpecificIDType
Type returns the appropriate LinkAttrLanAdjSIDProtoSpecificIDType for LinkAttrLanAdjSIDProtoSpecificIDIsIs.
type LinkAttrLanAdjSIDProtoSpecificIDOspf ¶
type LinkAttrLanAdjSIDProtoSpecificIDOspf struct {
NeighborID uint32
}
LinkAttrLanAdjSIDProtoSpecificIDOspf is contained in a LinkAttrLanAdjSID link attribute.
func (*LinkAttrLanAdjSIDProtoSpecificIDOspf) Type ¶
func (l *LinkAttrLanAdjSIDProtoSpecificIDOspf) Type() LinkAttrLanAdjSIDProtoSpecificIDType
Type returns the appropriate LinkAttrLanAdjSIDProtoSpecificIDType for LinkAttrLanAdjSIDProtoSpecificIDOspf
type LinkAttrLanAdjSIDProtoSpecificIDType ¶
type LinkAttrLanAdjSIDProtoSpecificIDType uint8
LinkAttrLanAdjSIDProtoSpecificIDType describes the type of LinkAttrLanAdjSIDProtoSpecificID.
const ( LinkAttrLanAdjSIDProtoSpecificIDTypeIsIs LinkAttrLanAdjSIDProtoSpecificIDType = iota LinkAttrLanAdjSIDProtoSpecificIDTypeOspf )
LinkAttrLanAdjSIDProtoSpecificIDType values
type LinkAttrLinkName ¶
type LinkAttrLinkName struct {
Name string
}
LinkAttrLinkName is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.2.7
func (*LinkAttrLinkName) Code ¶
func (l *LinkAttrLinkName) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrLinkName.
type LinkAttrLinkProtectionType ¶
type LinkAttrLinkProtectionType struct { ExtraTraffic bool Unprotected bool DedicatedOneToOne bool DedicatedOnePlusOne bool Enhanced bool }
LinkAttrLinkProtectionType is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc5307#section-1.2
func (*LinkAttrLinkProtectionType) Code ¶
func (l *LinkAttrLinkProtectionType) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrLinkProtectionType.
type LinkAttrMaxLinkBandwidth ¶
type LinkAttrMaxLinkBandwidth struct {
BytesPerSecond float32
}
LinkAttrMaxLinkBandwidth is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc5305#section-3.4
func (*LinkAttrMaxLinkBandwidth) Code ¶
func (l *LinkAttrMaxLinkBandwidth) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrMaxLinkBandwidth.
type LinkAttrMaxReservableLinkBandwidth ¶
type LinkAttrMaxReservableLinkBandwidth struct {
BytesPerSecond float32
}
LinkAttrMaxReservableLinkBandwidth is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc5305#section-3.5
func (*LinkAttrMaxReservableLinkBandwidth) Code ¶
func (l *LinkAttrMaxReservableLinkBandwidth) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrMaxReservableLinkBandwidth.
type LinkAttrMinMaxUniLinkDelay ¶
type LinkAttrMinMaxUniLinkDelay struct { Anomalous bool MinDelay time.Duration MaxDelay time.Duration }
LinkAttrMinMaxUniLinkDelay is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-08#section-3.2
func (*LinkAttrMinMaxUniLinkDelay) Code ¶
func (l *LinkAttrMinMaxUniLinkDelay) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrMinMaxUniLinkDelay
type LinkAttrMplsProtocolMask ¶
LinkAttrMplsProtocolMask is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.2.2
func (*LinkAttrMplsProtocolMask) Code ¶
func (l *LinkAttrMplsProtocolMask) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrMplsProtocolMask.
type LinkAttrOpaqueLinkAttr ¶
type LinkAttrOpaqueLinkAttr struct {
Data []byte
}
LinkAttrOpaqueLinkAttr is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.2.6
func (*LinkAttrOpaqueLinkAttr) Code ¶
func (l *LinkAttrOpaqueLinkAttr) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrOpaqueLinkAttr.
type LinkAttrPeerAdjSID ¶
type LinkAttrPeerAdjSID struct { Value bool Local bool Backup bool Persistent bool Weight uint8 SIDIndexLabel SIDIndexLabel }
LinkAttrPeerAdjSID is a link attribute contained a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-15#section-4.4
func (*LinkAttrPeerAdjSID) Code ¶
func (l *LinkAttrPeerAdjSID) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrPeerAdjSID
type LinkAttrPeerNodeSID ¶
type LinkAttrPeerNodeSID struct { Weight uint8 SIDIndexLabel SIDIndexLabel }
LinkAttrPeerNodeSID is a link attribute contained a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-15#section-4.4
func (*LinkAttrPeerNodeSID) Code ¶
func (l *LinkAttrPeerNodeSID) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrPeerNodeSID.
type LinkAttrPeerSetSID ¶
type LinkAttrPeerSetSID struct { Weight uint8 SIDIndexLabel SIDIndexLabel }
LinkAttrPeerSetSID is a link attributed contained a bgp-ls attribute
https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-15#section-4.4
func (*LinkAttrPeerSetSID) Code ¶
func (l *LinkAttrPeerSetSID) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrPeerSetSID
type LinkAttrRemoteIPv4RouterID ¶
LinkAttrRemoteIPv4RouterID is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc5305#section-4.3
func (*LinkAttrRemoteIPv4RouterID) Code ¶
func (l *LinkAttrRemoteIPv4RouterID) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrRemoteIPv4RouterID.
type LinkAttrRemoteIPv6RouterID ¶
LinkAttrRemoteIPv6RouterID is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc6119#section-4.1
func (*LinkAttrRemoteIPv6RouterID) Code ¶
func (l *LinkAttrRemoteIPv6RouterID) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrRemoteIPv6RouterID.
type LinkAttrSharedRiskLinkGroup ¶
type LinkAttrSharedRiskLinkGroup struct {
}LinkAttrSharedRiskLinkGroup is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.2.5
func (*LinkAttrSharedRiskLinkGroup) Code ¶
func (l *LinkAttrSharedRiskLinkGroup) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrSharedRiskLinkGroups.
type LinkAttrTEDefaultMetric ¶
type LinkAttrTEDefaultMetric struct {
Metric uint32
}
LinkAttrTEDefaultMetric is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc5305#section-3.7
func (*LinkAttrTEDefaultMetric) Code ¶
func (l *LinkAttrTEDefaultMetric) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrTEDefaultMetric.
type LinkAttrUniAvailableBandwidth ¶
type LinkAttrUniAvailableBandwidth struct {
BytesPerSecond float32
}
LinkAttrUniAvailableBandwidth is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-08#section-3.6
func (*LinkAttrUniAvailableBandwidth) Code ¶
func (l *LinkAttrUniAvailableBandwidth) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrUniAvailableBandwidth
type LinkAttrUniBandwidthUtil ¶
type LinkAttrUniBandwidthUtil struct {
BytesPerSecond float32
}
LinkAttrUniBandwidthUtil is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-08#section-3.7
func (*LinkAttrUniBandwidthUtil) Code ¶
func (l *LinkAttrUniBandwidthUtil) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrUniBandwidthUtil
type LinkAttrUniDelayVariation ¶
LinkAttrUniDelayVariation is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-08#section-3.3
func (*LinkAttrUniDelayVariation) Code ¶
func (l *LinkAttrUniDelayVariation) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrUniDelayVariation
type LinkAttrUniLinkDelay ¶
LinkAttrUniLinkDelay is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-08#section-3.1
func (*LinkAttrUniLinkDelay) Code ¶
func (l *LinkAttrUniLinkDelay) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrUniLinkDelay
type LinkAttrUniPacketLoss ¶
LinkAttrUniPacketLoss is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-08#section-3.4
func (*LinkAttrUniPacketLoss) Code ¶
func (l *LinkAttrUniPacketLoss) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrUniPacketLoss
type LinkAttrUniResidualBandwidth ¶
type LinkAttrUniResidualBandwidth struct {
BytesPerSecond float32
}
LinkAttrUniResidualBandwidth is a link attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-08#section-3.5
func (*LinkAttrUniResidualBandwidth) Code ¶
func (l *LinkAttrUniResidualBandwidth) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrUniResidualBandwidth
type LinkAttrUnreservedBandwidth ¶
type LinkAttrUnreservedBandwidth struct {
BytesPerSecond [8]float32
}
LinkAttrUnreservedBandwidth is a link attribute contained in a bgp-ls attribute. The index number represents the priority level.
https://tools.ietf.org/html/rfc5305#section-3.6
func (*LinkAttrUnreservedBandwidth) Code ¶
func (l *LinkAttrUnreservedBandwidth) Code() LinkAttrCode
Code returns the appropriate LinkAttrCode for LinkAttrUnreservedBandwidth.
type LinkDescriptor ¶
type LinkDescriptor interface { Code() LinkDescriptorCode // contains filtered or unexported methods }
LinkDescriptor is a bgp-ls nlri.
type LinkDescriptorCode ¶
type LinkDescriptorCode uint16
LinkDescriptorCode describes the type of link descriptor.
https://tools.ietf.org/html/rfc7752#section-3.2.2 table 5
const ( LinkDescriptorCodeLinkIDs LinkDescriptorCode = 258 LinkDescriptorCodeIPv4InterfaceAddress LinkDescriptorCode = 259 LinkDescriptorCodeIPv4NeighborAddress LinkDescriptorCode = 260 LinkDescriptorCodeIPv6InterfaceAddress LinkDescriptorCode = 261 LinkDescriptorCodeIPv6NeighborAddress LinkDescriptorCode = 262 LinkDescriptorCodeMultiTopologyID LinkDescriptorCode = 263 )
LinkDescriptorCode values
type LinkDescriptorIPv4InterfaceAddress ¶
LinkDescriptorIPv4InterfaceAddress is a link descriptor contained in a bgp-ls link nlri.
https://tools.ietf.org/html/rfc5305#section-3.2
func (*LinkDescriptorIPv4InterfaceAddress) Code ¶
func (l *LinkDescriptorIPv4InterfaceAddress) Code() LinkDescriptorCode
Code returns the appropriate LinkDescriptorCode for LinkDescriptorIPv4InterfaceAddress.
type LinkDescriptorIPv4NeighborAddress ¶
LinkDescriptorIPv4NeighborAddress is a link descriptor contained in a bgp-ls link nlri.
https://tools.ietf.org/html/rfc5305#section-3.3
func (*LinkDescriptorIPv4NeighborAddress) Code ¶
func (l *LinkDescriptorIPv4NeighborAddress) Code() LinkDescriptorCode
Code returns the appropriate LinkDescriptorCode for LinkDescriptorIPv4NeighborAddress.
type LinkDescriptorIPv6InterfaceAddress ¶
LinkDescriptorIPv6InterfaceAddress is a link descriptor contained in a bgp-ls link nlri.
https://tools.ietf.org/html/rfc6119#section-4.2
func (*LinkDescriptorIPv6InterfaceAddress) Code ¶
func (l *LinkDescriptorIPv6InterfaceAddress) Code() LinkDescriptorCode
Code returns the appropriate LinkDescriptorCode for LinkDescriptorIPv6InterfaceAddress.
type LinkDescriptorIPv6NeighborAddress ¶
LinkDescriptorIPv6NeighborAddress is a link descriptor contained in a bgp-ls link nlri.
https://tools.ietf.org/html/rfc6119#section-4.3
func (*LinkDescriptorIPv6NeighborAddress) Code ¶
func (l *LinkDescriptorIPv6NeighborAddress) Code() LinkDescriptorCode
Code returns the appropriate LinkDescriptorCode for LinkDescriptorIPv6NeighborAddress.
type LinkDescriptorLinkIDs ¶
LinkDescriptorLinkIDs is a link descriptor contained in a bgp-ls link nlri.
https://tools.ietf.org/html/rfc5307#section-1.1
func (*LinkDescriptorLinkIDs) Code ¶
func (l *LinkDescriptorLinkIDs) Code() LinkDescriptorCode
Code returns the appropriate LinkDescriptorCode for LinkDescriptorLinkIDs.
type LinkDescriptorMultiTopologyID ¶
type LinkDescriptorMultiTopologyID struct {
IDs []uint16
}
LinkDescriptorMultiTopologyID is a link descriptor contained in a bgp-ls link nlri.
https://tools.ietf.org/html/rfc7752#section-3.2.1.5
func (*LinkDescriptorMultiTopologyID) Code ¶
func (l *LinkDescriptorMultiTopologyID) Code() LinkDescriptorCode
Code returns the appropriate LinkDescriptorCode for LinkDescriptorMultiTopologyID.
type LinkStateNlri ¶
type LinkStateNlri interface { Type() LinkStateNlriType Protocol() LinkStateNlriProtocolID Afi() MultiprotoAfi Safi() MultiprotoSafi // contains filtered or unexported methods }
LinkStateNlri contains nlri of link-state type.
type LinkStateNlriDescriptorCode ¶
type LinkStateNlriDescriptorCode uint16
LinkStateNlriDescriptorCode describes the type of link state nlri.
const ( LinkStateNlriLocalNodeDescriptorsDescriptorCode LinkStateNlriDescriptorCode = 256 LinkStateNlriRemoteNodeDescriptorsDescriptorCode LinkStateNlriDescriptorCode = 257 )
LinkStateNlriDescriptorCode values
type LinkStateNlriIPv4Prefix ¶
type LinkStateNlriIPv4Prefix struct {
LinkStateNlriPrefix
}
LinkStateNlriIPv4Prefix is a link state nlri.
https://tools.ietf.org/html/rfc7752#section-3.2 figure 9
func (*LinkStateNlriIPv4Prefix) Type ¶
func (l *LinkStateNlriIPv4Prefix) Type() LinkStateNlriType
Type returns the appropriate LinkStateNlriType for LinkStateNlriIPv4Prefix
type LinkStateNlriIPv6Prefix ¶
type LinkStateNlriIPv6Prefix struct {
LinkStateNlriPrefix
}
LinkStateNlriIPv6Prefix is a link state nlri.
https://tools.ietf.org/html/rfc7752#section-3.2 figure 9
func (*LinkStateNlriIPv6Prefix) Type ¶
func (l *LinkStateNlriIPv6Prefix) Type() LinkStateNlriType
Type returns the appropriate LinkStateNlriType for LinkStateNlriIPv6Prefix
type LinkStateNlriLink ¶
type LinkStateNlriLink struct { ProtocolID LinkStateNlriProtocolID ID uint64 LocalNodeDescriptors []NodeDescriptor RemoteNodeDescriptors []NodeDescriptor LinkDescriptors []LinkDescriptor }
LinkStateNlriLink is a link state nlri.
https://tools.ietf.org/html/rfc7752#section-3.2 figure 8
func (*LinkStateNlriLink) Afi ¶
func (l *LinkStateNlriLink) Afi() MultiprotoAfi
Afi returns the appropriate MultiprotoAfi for LinkStateNlriLink
func (*LinkStateNlriLink) Protocol ¶
func (l *LinkStateNlriLink) Protocol() LinkStateNlriProtocolID
Protocol returns the appropriate LinkStateNlriProtocolID for LinkStateNlriLink
func (*LinkStateNlriLink) Safi ¶
func (l *LinkStateNlriLink) Safi() MultiprotoSafi
Safi returns the appropriate MultiprotoAfi for LinkStateNlriLink
func (*LinkStateNlriLink) Type ¶
func (l *LinkStateNlriLink) Type() LinkStateNlriType
Type returns the appropriate LinkStateNlriType for LinkStateNlriLink
type LinkStateNlriNode ¶
type LinkStateNlriNode struct { ProtocolID LinkStateNlriProtocolID ID uint64 LocalNodeDescriptors []NodeDescriptor }
LinkStateNlriNode is a link state nlri.
https://tools.ietf.org/html/rfc7752#section-3.2 figure 7
func (*LinkStateNlriNode) Afi ¶
func (n *LinkStateNlriNode) Afi() MultiprotoAfi
Afi returns the appropriate MultiprotoAfi for LinkStateNlriNode
func (*LinkStateNlriNode) Protocol ¶
func (n *LinkStateNlriNode) Protocol() LinkStateNlriProtocolID
Protocol returns the appropriate LinkStateNlriProtocolID for LinkStateNlriNode
func (*LinkStateNlriNode) Safi ¶
func (n *LinkStateNlriNode) Safi() MultiprotoSafi
Safi returns the appropriate MultiprotoAfi for LinkStateNlriNode
func (*LinkStateNlriNode) Type ¶
func (n *LinkStateNlriNode) Type() LinkStateNlriType
Type returns the appropriate LinkStateNlriType for LinkStateNlriNode
type LinkStateNlriPrefix ¶
type LinkStateNlriPrefix struct { ProtocolID LinkStateNlriProtocolID ID uint64 LocalNodeDescriptors []NodeDescriptor PrefixDescriptors []PrefixDescriptor }
LinkStateNlriPrefix is a link state nlri.
https://tools.ietf.org/html/rfc7752#section-3.2 figure 9
func (*LinkStateNlriPrefix) Afi ¶
func (l *LinkStateNlriPrefix) Afi() MultiprotoAfi
Afi returns the appropriate MultiprotoAfi for LinkStateNlriPrefix
func (*LinkStateNlriPrefix) Protocol ¶
func (l *LinkStateNlriPrefix) Protocol() LinkStateNlriProtocolID
Protocol returns the appropriate LinkStateNlriProtocolID for LinkStateNlriPrefix
func (*LinkStateNlriPrefix) Safi ¶
func (l *LinkStateNlriPrefix) Safi() MultiprotoSafi
Safi returns the appropriate MultiprotoAfi for LinkStateNlriPrefix
type LinkStateNlriProtocolID ¶
type LinkStateNlriProtocolID uint8
LinkStateNlriProtocolID describes the protocol of the link state nlri.
https://tools.ietf.org/html/rfc7752#section-3.2 table 2
const ( LinkStateNlriIsIsL1ProtocolID LinkStateNlriProtocolID LinkStateNlriIsIsL2ProtocolID LinkStateNlriOSPFv2ProtocolID LinkStateNlriDirectProtocolID LinkStateNlriStaticProtocolID LinkStateNlriOSPFv3ProtocolID LinkStateNlriBgpProtocolID )
LinkStateNlriProtocolID values
type LinkStateNlriType ¶
type LinkStateNlriType uint16
LinkStateNlriType describes the type of bgp-ls nlri.
https://tools.ietf.org/html/rfc7752#section-3.2 figure 6
const ( LinkStateNlriNodeType LinkStateNlriType LinkStateNlriLinkType LinkStateNlriIPv4PrefixType LinkStateNlriIPv6PrefixType )
LinkStateNlriType values
type Message ¶
type Message interface { MessageType() MessageType // contains filtered or unexported methods }
Message is a bgp message.
type MessageType ¶
type MessageType uint8
MessageType describes the type of bgp message.
const ( OpenMessageType MessageType = 1 UpdateMessageType MessageType = 2 NotificationMessageType MessageType = 3 KeepAliveMessageType MessageType = 4 )
MessageType values
func (MessageType) String ¶
func (t MessageType) String() string
type MultiprotoAfi ¶
type MultiprotoAfi uint16
MultiprotoAfi identifies the address family for multiprotocol bgp.
const (
BgpLsAfi MultiprotoAfi = 16388
)
MultiprotoAfi values
type MultiprotoSafi ¶
type MultiprotoSafi uint8
MultiprotoSafi identifies the subsequent address family for multiprotocol bgp.
const (
BgpLsSafi MultiprotoSafi = 71
)
MultiprotoSafi values
type NeighborConfig ¶
NeighborConfig is the configuration for a BGP-LS neighbor.
type NodeAttr ¶
type NodeAttr interface { Code() NodeAttrCode // contains filtered or unexported methods }
NodeAttr is a node attribute contained in a bgp-ls attribute.
type NodeAttrCode ¶
type NodeAttrCode uint16
NodeAttrCode describes the type of node attribute contained in a bgp-ls attribute
https://tools.ietf.org/html/rfc7752#section-3.3.1
const ( NodeAttrCodeMultiTopologyID NodeAttrCode = 263 NodeAttrCodeNodeFlagBits NodeAttrCode = 1024 NodeAttrCodeOpaqueNodeAttr NodeAttrCode = 1025 NodeAttrCodeNodeName NodeAttrCode = 1026 NodeAttrCodeIsIsAreaID NodeAttrCode = 1027 NodeAttrCodeLocalIPv4RouterID NodeAttrCode = 1028 NodeAttrCodeLocalIPv6RouterID NodeAttrCode = 1029 NodeAttrCodeSRCaps NodeAttrCode = 1034 NodeAttrCodeSRAlgo NodeAttrCode = 1035 NodeAttrCodeSRLocalBlock NodeAttrCode = 1036 NodeAttrCodeSRMSPref NodeAttrCode = 1037 )
NodeAttrCode values
type NodeAttrIsIsAreaID ¶
type NodeAttrIsIsAreaID struct {
AreaID uint32
}
NodeAttrIsIsAreaID is a node attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.1.2
func (*NodeAttrIsIsAreaID) Code ¶
func (n *NodeAttrIsIsAreaID) Code() NodeAttrCode
Code returns the appropriate NodeAttrCode for NodeAttrIsIsAreaID.
type NodeAttrLocalIPv4RouterID ¶
NodeAttrLocalIPv4RouterID is a node attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc5305#section-4.3
func (*NodeAttrLocalIPv4RouterID) Code ¶
func (n *NodeAttrLocalIPv4RouterID) Code() NodeAttrCode
Code returns the appropriate NodeAttrCode for NodeAttrLocalIPv4RouterID.
type NodeAttrLocalIPv6RouterID ¶
NodeAttrLocalIPv6RouterID is a node attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc5305#section-4.1
func (*NodeAttrLocalIPv6RouterID) Code ¶
func (n *NodeAttrLocalIPv6RouterID) Code() NodeAttrCode
Code returns the appropriate NodeAttrCode for NodeAttrLocalIPv6RouterID.
type NodeAttrMultiTopologyID ¶
type NodeAttrMultiTopologyID struct {
IDs []uint16
}
NodeAttrMultiTopologyID is a node attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.2.1.5
func (*NodeAttrMultiTopologyID) Code ¶
func (n *NodeAttrMultiTopologyID) Code() NodeAttrCode
Code returns the appropriate NodeAttrCode for NodeAttrMultiTopologyID.
type NodeAttrNodeFlagBits ¶
type NodeAttrNodeFlagBits struct { Overload bool Attached bool External bool ABR bool Router bool V6 bool }
NodeAttrNodeFlagBits is a node attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.1.1
func (*NodeAttrNodeFlagBits) Code ¶
func (n *NodeAttrNodeFlagBits) Code() NodeAttrCode
Code returns the appropriate NodeAttrCode for NodeAttrNodeFlagBits.
type NodeAttrNodeName ¶
type NodeAttrNodeName struct {
Name string
}
NodeAttrNodeName is a node attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.1.3
func (*NodeAttrNodeName) Code ¶
func (n *NodeAttrNodeName) Code() NodeAttrCode
Code returns the appropriate NodeAttrCode for NodeAttrNodeName.
type NodeAttrOpaqueNodeAttr ¶
type NodeAttrOpaqueNodeAttr struct {
Data []byte
}
NodeAttrOpaqueNodeAttr is a node attribute contained a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.1.5
func (*NodeAttrOpaqueNodeAttr) Code ¶
func (n *NodeAttrOpaqueNodeAttr) Code() NodeAttrCode
Code returns the appropriate NodeAttrCode for NodeAttrOpaqueNodeAttr.
type NodeAttrSRAlgo ¶
type NodeAttrSRAlgo struct {
Algos []uint8
}
NodeAttrSRAlgo is a node attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext#section-2.1.3
func (*NodeAttrSRAlgo) Code ¶
func (n *NodeAttrSRAlgo) Code() NodeAttrCode
Code returns the appropriate NodeAttrCode for NodeAttrSRAlgo
type NodeAttrSRCaps ¶
type NodeAttrSRCaps struct { MplsIPv4 bool MplsIPv6 bool RangeSIDLabel []RangeSIDLabel }
NodeAttrSRCaps is a node attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.1.2
func (*NodeAttrSRCaps) Code ¶
func (n *NodeAttrSRCaps) Code() NodeAttrCode
Code returns the appropriate NodeAttrCode for NodeAttrSRCaps
type NodeAttrSRLocalBlock ¶
type NodeAttrSRLocalBlock struct {
RangeSIDLabel []RangeSIDLabel
}
NodeAttrSRLocalBlock is a node attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.1.4
func (*NodeAttrSRLocalBlock) Code ¶
func (n *NodeAttrSRLocalBlock) Code() NodeAttrCode
Code returns the appropriate NodeAttrCode for NodeAttrSRLocalBlock
type NodeAttrSRMSPref ¶
type NodeAttrSRMSPref struct {
Preference uint8
}
NodeAttrSRMSPref is a node attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.1.5
func (*NodeAttrSRMSPref) Code ¶
func (n *NodeAttrSRMSPref) Code() NodeAttrCode
Code returns the appropriate NodeAttrCode for NodeAttrSRMSPref
type NodeDescriptor ¶
type NodeDescriptor interface { Code() NodeDescriptorCode // contains filtered or unexported methods }
NodeDescriptor is a bgp-ls nlri node descriptor.
type NodeDescriptorASN ¶
type NodeDescriptorASN struct {
ASN uint32
}
NodeDescriptorASN is a node descriptor contained in a bgp-ls node nlri.
https://tools.ietf.org/html/rfc7752#section-3.2.1.4
func (*NodeDescriptorASN) Code ¶
func (n *NodeDescriptorASN) Code() NodeDescriptorCode
Code returns the appropriate NodeDescriptorCode for NodeDescriptorASN.
type NodeDescriptorBgpLsID ¶
type NodeDescriptorBgpLsID struct {
ID uint32
}
NodeDescriptorBgpLsID is a node descriptor contained in a bgp-ls node nlri.
https://tools.ietf.org/html/rfc7752#section-3.2.1.4
func (*NodeDescriptorBgpLsID) Code ¶
func (n *NodeDescriptorBgpLsID) Code() NodeDescriptorCode
Code returns the appropriate NodeDescriptorCode for NodeDescriptorBgpLsID.
type NodeDescriptorBgpRouterID ¶
NodeDescriptorBgpRouterID is a node descriptor contained in a bgp-ls node nlri
https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-15#section-4.1
func (*NodeDescriptorBgpRouterID) Code ¶
func (n *NodeDescriptorBgpRouterID) Code() NodeDescriptorCode
Code returns the appropriate NodeDescriptorCode for NodeDescriptorBgpRouterID
type NodeDescriptorCode ¶
type NodeDescriptorCode uint16
NodeDescriptorCode describes the type of node descriptor.
https://tools.ietf.org/html/rfc7752#section-3.2.1.4
const ( NodeDescriptorCodeASN NodeDescriptorCode = 512 NodeDescriptorCodeBgpLsID NodeDescriptorCode = 513 NodeDescriptorCodeOspfAreaID NodeDescriptorCode = 514 NodeDescriptorCodeIgpRouterID NodeDescriptorCode = 515 NodeDescriptorCodeBgpRouterID NodeDescriptorCode = 516 NodeDescriptorCodeMemberASN NodeDescriptorCode = 517 )
NodeDescriptorCode values
type NodeDescriptorIgpRouterIDIsIsNonPseudo ¶
type NodeDescriptorIgpRouterIDIsIsNonPseudo struct {
IsoNodeID uint64
}
NodeDescriptorIgpRouterIDIsIsNonPseudo is a node descriptor contained in a bgp-ls node nlri.
https://tools.ietf.org/html/rfc7752#section-3.2.1.4
func (*NodeDescriptorIgpRouterIDIsIsNonPseudo) Code ¶
func (n *NodeDescriptorIgpRouterIDIsIsNonPseudo) Code() NodeDescriptorCode
Code returns the appropriate NodeDescriptorCode for NodeDescriptorIgpRouterIDIsIsNonPseudo.
type NodeDescriptorIgpRouterIDIsIsPseudo ¶
NodeDescriptorIgpRouterIDIsIsPseudo is a node descriptor contained in a bgp-ls node nlri.
https://tools.ietf.org/html/rfc7752#section-3.2.1.4
func (*NodeDescriptorIgpRouterIDIsIsPseudo) Code ¶
func (n *NodeDescriptorIgpRouterIDIsIsPseudo) Code() NodeDescriptorCode
Code returns the appropriate NodeDescriptorCode for NodeDescriptorIgpRouterIDIsIsPseudo.
type NodeDescriptorIgpRouterIDOspfNonPseudo ¶
NodeDescriptorIgpRouterIDOspfNonPseudo is a node descriptor contained in a bgp-ls node nlri.
https://tools.ietf.org/html/rfc7752#section-3.2.1.4
func (*NodeDescriptorIgpRouterIDOspfNonPseudo) Code ¶
func (n *NodeDescriptorIgpRouterIDOspfNonPseudo) Code() NodeDescriptorCode
Code returns the appropriate NodeDescriptorCode for NodeDescriptorIgpRouterIDOspfNonPseudo.
type NodeDescriptorIgpRouterIDOspfPseudo ¶
NodeDescriptorIgpRouterIDOspfPseudo is a node descriptor contained in a bgp-ls node nlri.
https://tools.ietf.org/html/rfc7752#section-3.2.1.4
func (*NodeDescriptorIgpRouterIDOspfPseudo) Code ¶
func (n *NodeDescriptorIgpRouterIDOspfPseudo) Code() NodeDescriptorCode
Code returns the appropriate NodeDescriptorCode for NodeDescriptorIgpRouterIDOspfPseudo.
type NodeDescriptorIgpRouterIDType ¶
type NodeDescriptorIgpRouterIDType uint8
NodeDescriptorIgpRouterIDType describes the type of igp router id.
https://tools.ietf.org/html/rfc7752#section-3.2.1.4
const ( NodeDescriptorIgpRouterIDIsIsNonPseudoType NodeDescriptorIgpRouterIDType = iota NodeDescriptorIgpRouterIDIsIsPseudoType NodeDescriptorIgpRouterIDOspfNonPseudoType NodeDescriptorIgpRouterIDOspfPseudoType )
NodeDescriptorIgRouterIDType values
type NodeDescriptorMemberASN ¶
type NodeDescriptorMemberASN struct {
ASN uint32
}
NodeDescriptorMemberASN is a node descriptor contained in a bgp-ls node nlri
https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-15#section-4.1
func (*NodeDescriptorMemberASN) Code ¶
func (n *NodeDescriptorMemberASN) Code() NodeDescriptorCode
Code returns the appropriate NodeDescriptorCode for NodeDescriptorMemberASN
type NodeDescriptorOspfAreaID ¶
type NodeDescriptorOspfAreaID struct {
ID uint32
}
NodeDescriptorOspfAreaID is a node descriptor contained in a bgp-ls node nlri.
https://tools.ietf.org/html/rfc7752#section-3.2.1.4
func (*NodeDescriptorOspfAreaID) Code ¶
func (n *NodeDescriptorOspfAreaID) Code() NodeDescriptorCode
Code returns the appropriate NodeDescriptorCode for NodeDescriptorOspfAreaID.
type NotifErrCode ¶
type NotifErrCode uint8
NotifErrCode is a notifcation message error code.
const ( NotifErrCodeMessageHeader NotifErrCode NotifErrCodeOpenMessage NotifErrCodeUpdateMessage NotifErrCodeHoldTimerExpired NotifErrCodeFsmError NotifErrCodeCease )
NotifErrCode values
type NotifErrSubcode ¶
type NotifErrSubcode uint8
NotifErrSubcode is a notification message error subcode.
const ( NotifErrSubcodeConnNotSynch NotifErrSubcode NotifErrSubcodeBadLength NotifErrSubcodeBadType )
message header subcodes
const ( NotifErrSubcodeUnsupportedVersionNumber NotifErrSubcode NotifErrSubcodeBadPeerAS NotifErrSubcodeBadBgpID NotifErrSubcodeUnsupportedOptParam NotifErrSubcodeUnacceptableHoldTime NotifErrSubcodeUnsupportedCapability )
open message subcodes
const ( NotifErrSubcodeMalformedAttr NotifErrSubcode NotifErrSubcodeUnrecognizedWellKnownAttr NotifErrSubcodeMissingWellKnownAttr NotifErrSubcodeAttrFlagsError NotifErrSubcodeAttrLenError NotifErrSubcodeInvalidOrigin NotifErrSubcodeInvalidNextHop NotifErrSubcodeOptionalAttrError NotifErrSubcodeInvalidNetworkField NotifErrSubcodeMalformedAsPath )
update message subcodes
type NotificationMessage ¶
type NotificationMessage struct { Code NotifErrCode Subcode NotifErrSubcode Data []byte }
NotificationMessage is a bgp message.
https://tools.ietf.org/html/rfc4271#section-4.5
func (*NotificationMessage) MessageType ¶
func (n *NotificationMessage) MessageType() MessageType
MessageType returns the appropriate MessageType for NotificationMessage.
type OriginCode ¶
type OriginCode uint8
OriginCode describes the type of origin in the origin attribute.
https://tools.ietf.org/html/rfc4271#section-5.1.1
const ( OriginCodeIGP OriginCode = iota OriginCodeEGP OriginCodeIncomplete )
OriginCode values
func (OriginCode) String ¶
func (o OriginCode) String() string
type OspfRouteType ¶
type OspfRouteType uint8
OspfRouteType describes the type of ospf route.
https://tools.ietf.org/html/rfc7752#section-3.2.3.1
const ( OspfRouteTypeIntraArea OspfRouteType OspfRouteTypeInterArea OspfRouteTypeExternal1 OspfRouteTypeExternal2 OspfRouteTypeNSSA1 OspfRouteTypeNSSA2 )
OspfRouteType values
type PathAttr ¶
type PathAttr interface { Flags() PathAttrFlags Type() PathAttrType // contains filtered or unexported methods }
PathAttr is a bgp path attribute.
type PathAttrAsPath ¶
type PathAttrAsPath struct { Segments []AsPathSegment // contains filtered or unexported fields }
PathAttrAsPath is a path attribute.
https://tools.ietf.org/html/rfc4271#section-5.1.2
func (*PathAttrAsPath) Flags ¶
func (a *PathAttrAsPath) Flags() PathAttrFlags
Flags returns the appropriate PathAttrFlags for PathAttrAsPath.
func (*PathAttrAsPath) Type ¶
func (a *PathAttrAsPath) Type() PathAttrType
Type returns the appropriate PathAttrType for PathAttrAsPath.
type PathAttrFlags ¶
PathAttrFlags contains the flags for a bgp path attribute.
type PathAttrLinkState ¶
type PathAttrLinkState struct { NodeAttrs []NodeAttr LinkAttrs []LinkAttr PrefixAttrs []PrefixAttr // contains filtered or unexported fields }
PathAttrLinkState is a bgp path attribute.
https://tools.ietf.org/html/rfc7752#section-3.3
func (*PathAttrLinkState) Flags ¶
func (p *PathAttrLinkState) Flags() PathAttrFlags
Flags returns the flags for a link state path attribute.
func (*PathAttrLinkState) Type ¶
func (p *PathAttrLinkState) Type() PathAttrType
Type returns the appropriate PathAttrType for PathAttrLinkState.
type PathAttrLocalPref ¶
type PathAttrLocalPref struct { Preference uint32 // contains filtered or unexported fields }
PathAttrLocalPref is a path attribute.
https://tools.ietf.org/html/rfc4271#section-5.1.5
func (*PathAttrLocalPref) Flags ¶
func (p *PathAttrLocalPref) Flags() PathAttrFlags
Flags returns the PathAttrFlags for PathAttrLocalPref.
func (*PathAttrLocalPref) Type ¶
func (p *PathAttrLocalPref) Type() PathAttrType
Type returns the appropriate PathAttrType for PathAttrLocalPref.
type PathAttrMpReach ¶
type PathAttrMpReach struct { Afi MultiprotoAfi Safi MultiprotoSafi Nlri []LinkStateNlri // contains filtered or unexported fields }
PathAttrMpReach is a path attribute.
https://tools.ietf.org/html/rfc4760#section-3
func (*PathAttrMpReach) Flags ¶
func (p *PathAttrMpReach) Flags() PathAttrFlags
Flags returns the PathAttrFlags for PathAttrMpReach.
func (*PathAttrMpReach) Type ¶
func (p *PathAttrMpReach) Type() PathAttrType
Type returns the appropriate PathAttrType for PathAttrMpReach.
type PathAttrMpUnreach ¶
type PathAttrMpUnreach struct { Afi MultiprotoAfi Safi MultiprotoSafi Nlri []LinkStateNlri // contains filtered or unexported fields }
PathAttrMpUnreach is a path attribute.
https://tools.ietf.org/html/rfc4760#section-4
func (*PathAttrMpUnreach) Flags ¶
func (p *PathAttrMpUnreach) Flags() PathAttrFlags
Flags returns the PathAttrFlags for PathAttrMpUnreach.
func (*PathAttrMpUnreach) Type ¶
func (p *PathAttrMpUnreach) Type() PathAttrType
Type returns the appropriate PathAttrType for PathAttrMpUnreach.
type PathAttrOrigin ¶
type PathAttrOrigin struct { Origin OriginCode // contains filtered or unexported fields }
PathAttrOrigin is a path attribute.
https://tools.ietf.org/html/rfc4271#section-5.1.1
func (*PathAttrOrigin) Flags ¶
func (o *PathAttrOrigin) Flags() PathAttrFlags
Flags returns the PathAttrFlags for PathAttrOrigin.
func (*PathAttrOrigin) Type ¶
func (o *PathAttrOrigin) Type() PathAttrType
Type returns the appropriate PathAttrType for PathAttrOrigin.
type PathAttrType ¶
type PathAttrType uint8
PathAttrType describes the type of a bgp path attribute.
const ( PathAttrOriginType PathAttrType = 1 PathAttrAsPathType PathAttrType = 2 PathAttrLocalPrefType PathAttrType = 5 PathAttrMpReachType PathAttrType = 14 PathAttrMpUnreachType PathAttrType = 15 PathAttrLinkStateType PathAttrType = 29 )
PathAttrType values
type PrefixAttr ¶
type PrefixAttr interface { Code() PrefixAttrCode // contains filtered or unexported methods }
PrefixAttr is a prefix attribute contained in a bgp-ls attribute.
type PrefixAttrCode ¶
type PrefixAttrCode uint16
PrefixAttrCode describes the type of prefix attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.3
const ( PrefixAttrCodeIgpFlags PrefixAttrCode = 1152 PrefixAttrCodeIgpRouteTag PrefixAttrCode = 1153 PrefixAttrCodeIgpExtendedRouteTag PrefixAttrCode = 1154 PrefixAttrCodePrefixMetric PrefixAttrCode = 1155 PrefixAttrCodeOspfForwardingAddress PrefixAttrCode = 1156 PrefixAttrCodeOpaquePrefixAttribute PrefixAttrCode = 1157 PrefixAttrCodePrefixSID PrefixAttrCode = 1158 PrefixAttrCodeRange PrefixAttrCode = 1159 PrefixAttrCodeFlags PrefixAttrCode = 1170 PrefixAttrCodeSourceRouterID PrefixAttrCode = 1171 )
PrefixAttrCode values
type PrefixAttrFlagsIsIs ¶
PrefixAttrFlagsIsIs is a prefix attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.3.2
https://tools.ietf.org/html/rfc7794#section-2.1
func (*PrefixAttrFlagsIsIs) Code ¶
func (p *PrefixAttrFlagsIsIs) Code() PrefixAttrCode
Code returns the appropriate PrefixAttrCode for PrefixAttrFlagsIsIs
type PrefixAttrFlagsOSPFv2 ¶
PrefixAttrFlagsOSPFv2 is a prefix attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.3.2
https://tools.ietf.org/html/rfc7684#section-2.1
func (*PrefixAttrFlagsOSPFv2) Code ¶
func (p *PrefixAttrFlagsOSPFv2) Code() PrefixAttrCode
Code returns the appropriate PrefixAttrCode for PrefixAttrFlagsOSPFv2
type PrefixAttrFlagsOSPFv3 ¶
PrefixAttrFlagsOSPFv3 is a prefix attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.3.2
https://tools.ietf.org/html/rfc5340#appendix-A.4.1.1
func (*PrefixAttrFlagsOSPFv3) Code ¶
func (p *PrefixAttrFlagsOSPFv3) Code() PrefixAttrCode
Code returns the appropriate PrefixAttrCode for PrefixAttrFlagsOSPFv3
type PrefixAttrIgpExtendedRouteTag ¶
type PrefixAttrIgpExtendedRouteTag struct {
Tags []uint64
}
PrefixAttrIgpExtendedRouteTag is a prefix attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.3.3
func (*PrefixAttrIgpExtendedRouteTag) Code ¶
func (p *PrefixAttrIgpExtendedRouteTag) Code() PrefixAttrCode
Code returns the appropriate PrefixAttrCode for PrefixAttrIgpExtendedRouteTag.
type PrefixAttrIgpFlags ¶
type PrefixAttrIgpFlags struct { IsIsDown bool OspfNoUnicast bool OspfLocalAddress bool OspfPropagateNssa bool }
PrefixAttrIgpFlags is a prefix attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.3.1
func (*PrefixAttrIgpFlags) Code ¶
func (p *PrefixAttrIgpFlags) Code() PrefixAttrCode
Code returns the appropriate PrefixAttrCode for PrefixAttrIgpFlags.
type PrefixAttrIgpRouteTag ¶
type PrefixAttrIgpRouteTag struct {
Tags []uint32
}
PrefixAttrIgpRouteTag is a prefix attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.3.2
func (*PrefixAttrIgpRouteTag) Code ¶
func (p *PrefixAttrIgpRouteTag) Code() PrefixAttrCode
Code returns the appropriate PrefixAttrCode for PrefixAttrIgpRouteTag.
type PrefixAttrOpaquePrefixAttribute ¶
type PrefixAttrOpaquePrefixAttribute struct {
Data []byte
}
PrefixAttrOpaquePrefixAttribute is a prefix attribute contained in a bgp-ls attribute.
func (*PrefixAttrOpaquePrefixAttribute) Code ¶
func (p *PrefixAttrOpaquePrefixAttribute) Code() PrefixAttrCode
Code returns the appropriate PrefixAttrCode for PrefixAttrOpaquePrefixAttribute.
type PrefixAttrOspfForwardingAddress ¶
PrefixAttrOspfForwardingAddress is a prefix attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.3.5
func (*PrefixAttrOspfForwardingAddress) Code ¶
func (p *PrefixAttrOspfForwardingAddress) Code() PrefixAttrCode
Code returns the appropriate PrefixAttrCode for PrefixAttrOspfForwardingAddress.
type PrefixAttrPrefixMetric ¶
type PrefixAttrPrefixMetric struct {
Metric uint32
}
PrefixAttrPrefixMetric is a prefix attributed contained in a bgp-ls attribute.
https://tools.ietf.org/html/rfc7752#section-3.3.3.4
func (*PrefixAttrPrefixMetric) Code ¶
func (p *PrefixAttrPrefixMetric) Code() PrefixAttrCode
Code returns the appropriate PrefixAttrCode for PrefixAttrPrefixMetric.
type PrefixAttrPrefixSID ¶
type PrefixAttrPrefixSID struct { Flags PrefixAttrPrefixSIDFlags Algorithm uint8 SIDIndexLabel SIDIndexLabel }
PrefixAttrPrefixSID is a prefix attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.3.1
func (*PrefixAttrPrefixSID) Code ¶
func (p *PrefixAttrPrefixSID) Code() PrefixAttrCode
Code returns the appropriate PrefixAttrCode for PrefixAttrPrefixSID
type PrefixAttrPrefixSIDFlags ¶
type PrefixAttrPrefixSIDFlags interface { Type() PrefixAttrPrefixSIDFlagsType // contains filtered or unexported methods }
PrefixAttrPrefixSIDFlags are contained in a PrefixAttrPrefixSID prefix attribute.
type PrefixAttrPrefixSIDFlagsIsIs ¶
type PrefixAttrPrefixSIDFlagsIsIs struct { Readvertisement bool NodeSID bool NoPHP bool ExplicitNull bool Value bool Local bool }
PrefixAttrPrefixSIDFlagsIsIs are contained in a PrefixAttrPrefixSID prefix attribute.
https://tools.ietf.org/html/draft-ietf-isis-segment-routing-extensions-15#section-2.1
func (*PrefixAttrPrefixSIDFlagsIsIs) Type ¶
func (p *PrefixAttrPrefixSIDFlagsIsIs) Type() PrefixAttrPrefixSIDFlagsType
Type returns the appropriate PrefixAttrPrefixSIDFlagsType for PrefixAttrPrefixSIDFlagsIsIs.
type PrefixAttrPrefixSIDFlagsOspf ¶
type PrefixAttrPrefixSIDFlagsOspf struct { NoPHP bool MappingServer bool ExplicitNull bool Value bool Local bool }
PrefixAttrPrefixSIDFlagsOspf are contained in a PrefixAttrPrefixSID prefix attribute.
https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-24#section-5
func (*PrefixAttrPrefixSIDFlagsOspf) Type ¶
func (p *PrefixAttrPrefixSIDFlagsOspf) Type() PrefixAttrPrefixSIDFlagsType
Type returns the appropriate PrefixAttrPrefixSIDFlagsType for PrefixAttrPrefixSIDFlagsOspf.
type PrefixAttrPrefixSIDFlagsType ¶
type PrefixAttrPrefixSIDFlagsType uint8
PrefixAttrPrefixSIDFlagsType describes the type of PrefixAttrPrefixSIDFlags contained in a PrefixAttrPrefixSID prefix attribute.
const ( PrefixAttrPrefixSIDFlagsTypeIsIs PrefixAttrPrefixSIDFlagsType = iota PrefixAttrPrefixSIDFlagsTypeOspf )
PrefixAttrPrefixSIDFlagsType values
type PrefixAttrRange ¶
type PrefixAttrRange struct { Flags PrefixAttrRangeFlags RangeSize uint16 PrefixSID []*PrefixAttrPrefixSID }
PrefixAttrRange is a prefix attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.3.4
func (*PrefixAttrRange) Code ¶
func (p *PrefixAttrRange) Code() PrefixAttrCode
Code returns the appropriate PrefixAttrCode for PrefixAttrRange
type PrefixAttrRangeFlags ¶
type PrefixAttrRangeFlags interface { Type() PrefixAttrRangeFlagsType // contains filtered or unexported methods }
PrefixAttrRangeFlags are contained in a PrefixAttrRange prefix attribute.
type PrefixAttrRangeFlagsIsIs ¶
type PrefixAttrRangeFlagsIsIs struct { AddressFamily bool Mirror bool SFlag bool DFlag bool Attached bool }
PrefixAttrRangeFlagsIsIs are contained in a PrefixAttrRange prefix attribute.
func (*PrefixAttrRangeFlagsIsIs) Type ¶
func (p *PrefixAttrRangeFlagsIsIs) Type() PrefixAttrRangeFlagsType
Type returns the appropriate PrefixAttrRangeFlagsType for PrefixAttrRangeFlagsIsIs.
type PrefixAttrRangeFlagsOspf ¶
type PrefixAttrRangeFlagsOspf struct {
InterArea bool
}
PrefixAttrRangeFlagsOspf are contained in a PrefixAttrRange prefix attribute.
https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-24#section-4
func (*PrefixAttrRangeFlagsOspf) Type ¶
func (p *PrefixAttrRangeFlagsOspf) Type() PrefixAttrRangeFlagsType
Type returns the appropriate PrefixAttrRangeFlagsType for PrefixAttrRangeFlagsOspf.
type PrefixAttrRangeFlagsType ¶
type PrefixAttrRangeFlagsType uint8
PrefixAttrRangeFlagsType describes the type of PrefixAttrRangeFlags.
const ( PrefixAttrRangeFlagsTypeIsIs PrefixAttrRangeFlagsType = iota PrefixAttrRangeFlagsTypeOspf )
PrefixAttrRangeFlagsType values
type PrefixAttrSourceRouterID ¶
PrefixAttrSourceRouterID is a prefix attribute contained in a bgp-ls attribute.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.3.3
func (*PrefixAttrSourceRouterID) Code ¶
func (p *PrefixAttrSourceRouterID) Code() PrefixAttrCode
Code returns the appropriate PrefixAttrCode for PrefixAttrSourceRouterID
type PrefixDescriptor ¶
type PrefixDescriptor interface { Code() PrefixDescriptorCode // contains filtered or unexported methods }
PrefixDescriptor is a bgp-ls prefix descriptor.
type PrefixDescriptorCode ¶
type PrefixDescriptorCode uint16
PrefixDescriptorCode describes the type of prefix descriptor.
https://tools.ietf.org/html/rfc7752#section-3.2.3
const ( PrefixDescriptorCodeMultiTopologyID PrefixDescriptorCode = 263 PrefixDescriptorCodeOspfRouteType PrefixDescriptorCode = 264 PrefixDescriptorCodeIPReachabilityInfo PrefixDescriptorCode = 265 )
PrefixDescriptorCode values
type PrefixDescriptorIPReachabilityInfo ¶
PrefixDescriptorIPReachabilityInfo is a prefix descriptor contained in a bgp-ls nlri.
https://tools.ietf.org/html/rfc7752#section-3.2.3.2
func (*PrefixDescriptorIPReachabilityInfo) Code ¶
func (p *PrefixDescriptorIPReachabilityInfo) Code() PrefixDescriptorCode
Code returns the appropriate PrefixDescriptorCode for PrefixDescriptorIPReachabilityInfo.
type PrefixDescriptorMultiTopologyID ¶
type PrefixDescriptorMultiTopologyID struct {
IDs []uint16
}
PrefixDescriptorMultiTopologyID is a prefix descriptor contained in a bgp-ls nlri.
https://tools.ietf.org/html/rfc7752#section-3.2.1.5
func (*PrefixDescriptorMultiTopologyID) Code ¶
func (p *PrefixDescriptorMultiTopologyID) Code() PrefixDescriptorCode
Code returns the appropriate PrefixDescriptorCode for PrefixDescriptorMultiTopologyID.
type PrefixDescriptorOspfRouteType ¶
type PrefixDescriptorOspfRouteType struct {
RouteType OspfRouteType
}
PrefixDescriptorOspfRouteType is a prefix descriptor contained in a bgp-ls nlri.
https://tools.ietf.org/html/rfc7752#section-3.2.3.1
func (*PrefixDescriptorOspfRouteType) Code ¶
func (p *PrefixDescriptorOspfRouteType) Code() PrefixDescriptorCode
Code returns the appropriate PrefixDescriptorCode for PrefixDescriptorOspfRouteType.
type RangeSIDLabel ¶
RangeSIDLabel is contained in the NodeAttrSRCaps and NodeAttrSRLocalBlock node attributes.
type SIDIndexLabel ¶
type SIDIndexLabel interface { Type() SIDIndexLabelType // contains filtered or unexported methods }
SIDIndexLabel is a common, variable field in SR-related attrs and contains either an mpls label or a 4 octet index defining an offset. Drafts refer to this as SID/Index/Label or SID/Label/Index.
type SIDIndexLabelLabel ¶
type SIDIndexLabelLabel struct {
Label uint32
}
SIDIndexLabelLabel is an mpls label contained in a SIDIndexLabel
func (*SIDIndexLabelLabel) Type ¶
func (l *SIDIndexLabelLabel) Type() SIDIndexLabelType
Type returns the appropriate SIDIndexLabelType for SIDIndexLabelLabel
type SIDIndexLabelOffset ¶
type SIDIndexLabelOffset struct {
Offset uint32
}
SIDIndexLabelOffset represents an offset is contained in a SIDIndexLabel.
func (*SIDIndexLabelOffset) Type ¶
func (l *SIDIndexLabelOffset) Type() SIDIndexLabelType
Type returns the appropriate SIDIndexLabelType for SIDIndexLabelOffset
type SIDIndexLabelType ¶
type SIDIndexLabelType uint8
SIDIndexLabelType describes the type of variable SR field.
const ( SIDIndexLabelTypeLabel SIDIndexLabelType = 3 SIDIndexLabelTypeOffset SIDIndexLabelType = 4 )
SIDIndexLabelType values
type SIDLabel ¶
type SIDLabel interface { Type() SIDLabelType // contains filtered or unexported methods }
SIDLabel is contained in the NodeAttrSRCaps and NodeAttrSRLocalBlock node attributes.
https://tools.ietf.org/html/draft-ietf-idr-bgp-ls-segment-routing-ext-04#section-2.1.1
type SIDLabelLabel ¶
type SIDLabelLabel struct {
Label uint32
}
SIDLabelLabel contains a 3 octet label.
func (*SIDLabelLabel) Type ¶
func (s *SIDLabelLabel) Type() SIDLabelType
Type returns the appropriate SIDLabelType for SIDLabeLabel.
type SIDLabelSID ¶
type SIDLabelSID struct {
SID uint32
}
SIDLabelSID contains a 4 octet SID.
func (*SIDLabelSID) Type ¶
func (s *SIDLabelSID) Type() SIDLabelType
Type returns the appropriate SIDLabelType for SIDLabelSID.
type SIDLabelType ¶
type SIDLabelType uint8
SIDLabelType describes the type of SIDLabel attribute.
const ( SIDLabelTypeSID SIDLabelType = iota SIDLabelTypeLabel )
SIDLabelType values
type UpdateMessage ¶
type UpdateMessage struct {
PathAttrs []PathAttr
}
UpdateMessage is a bgp message.
func (*UpdateMessage) MessageType ¶
func (u *UpdateMessage) MessageType() MessageType
MessageType returns the appropriate MessageType for UpdateMessage.