Documentation
¶
Index ¶
- func AddrOrEmpty(addr netip.Addr) string
- func GetNativeNlri(p *api.Path) (bgp.NLRI, error)
- func GetNativePathAttributes(p *api.Path) ([]bgp.PathAttributeInterface, error)
- func MarshalCapabilities(values []bgp.ParameterCapabilityInterface) ([]*api.Capability, error)
- func MarshalCapability(value bgp.ParameterCapabilityInterface) (*api.Capability, error)
- func MarshalFlowSpecRules(values []bgp.FlowSpecComponentInterface) ([]*api.FlowSpecRule, error)
- func MarshalLsAttributeSrPolicy(sp *bgp.LsAttributeSrPolicy) *api.LsAttributeSrPolicy
- func MarshalLsBgpPeerSegmentSid(n *bgp.LsBgpPeerSegmentSID) (*api.LsBgpPeerSegmentSID, error)
- func MarshalLsLinkDescriptor(n *bgp.LsLinkDescriptor) (*api.LsLinkDescriptor, error)
- func MarshalLsLinkNLRI(n *bgp.LsLinkNLRI) (*api.LsAddrPrefix_LsNLRI, error)
- func MarshalLsNodeDescriptor(d *bgp.LsNodeDescriptor) (*api.LsNodeDescriptor, error)
- func MarshalLsNodeNLRI(n *bgp.LsNodeNLRI) (*api.LsAddrPrefix_LsNLRI, error)
- func MarshalLsPrefixDescriptor(d *bgp.LsPrefixDescriptor) (*api.LsPrefixDescriptor, error)
- func MarshalLsPrefixV4NLRI(n *bgp.LsPrefixV4NLRI) (*api.LsAddrPrefix_LsNLRI, error)
- func MarshalLsPrefixV6NLRI(n *bgp.LsPrefixV6NLRI) (*api.LsAddrPrefix_LsNLRI, error)
- func MarshalLsSRv6SIDNLRI(n *bgp.LsSrv6SIDNLRI) (*api.LsAddrPrefix_LsNLRI, error)
- func MarshalLsSrBindingSID(b *bgp.LsSrBindingSID) *api.LsSrBindingSID
- func MarshalLsSrCandidatePathConstraints(c *bgp.LsSrCandidatePathConstraints) *api.LsSrCandidatePathConstraints
- func MarshalLsSrCandidatePathState(s *bgp.LsSrCandidatePathState) *api.LsSrCandidatePathState
- func MarshalLsSrPolicyCandidatePathDescriptor(d *bgp.LsSrPolicyCandidatePathDescriptor) *api.LsSrPolicyCandidatePathDescriptor
- func MarshalLsSrPolicyCandidatePathNLRI(n *bgp.LsSrPolicyCandidatePathNLRI) (*api.LsAddrPrefix_LsNLRI, error)
- func MarshalLsSrSegment(s *bgp.LsSrSegment) *api.LsSrSegment
- func MarshalLsSrSegmentList(sl *bgp.LsSrSegmentList) *api.LsSrSegmentList
- func MarshalLsSrSegmentListMetric(m *bgp.LsSrSegmentListMetric) *api.LsSrSegmentListMetric
- func MarshalLsSrv6BindingSID(b *bgp.LsSrv6BindingSID) *api.LsSrv6BindingSID
- func MarshalLsTLVMultiTopoID(mti *bgp.LsTLVMultiTopoID) (*api.LsMultiTopologyIdentifier, error)
- func MarshalLsTLVSrv6SIDInfo(info *bgp.LsTLVSrv6SIDInfo) (*api.LsSrv6SIDInformation, error)
- func MarshalMUPTLVs(tlvs []bgp.MUPTLVInterface) ([]*api.MUPTLV, error)
- func MarshalNLRI(value bgp.NLRI) (*api.NLRI, error)
- func MarshalNLRIs(values []bgp.NLRI) ([]*api.NLRI, error)
- func MarshalPathAttributes(attrList []bgp.PathAttributeInterface) ([]*api.Attribute, error)
- func MarshalRD(rd bgp.RouteDistinguisherInterface) (*api.RouteDistinguisher, error)
- func MarshalRT(rt bgp.ExtendedCommunityInterface) (*api.RouteTarget, error)
- func MarshalRTs(values []bgp.ExtendedCommunityInterface) ([]*api.RouteTarget, error)
- func MarshalSRBSID(bsid *bgp.TunnelEncapSubTLVSRBSID) (*api.SRBindingSID, error)
- func MarshalSRSegments(segs []bgp.TunnelEncapSubTLVInterface) ([]*api.TunnelEncapSubTLVSRSegmentList_Segment, error)
- func MarshalSRv6SubSubTLVs(tlvs []bgp.PrefixSIDTLVInterface) (map[uint32]*api.SRv6SubSubTLVs, error)
- func MarshalSRv6SubTLVs(tlvs []bgp.PrefixSIDTLVInterface) (map[uint32]*api.SRv6SubTLVs, error)
- func MarshalSRv6TLVs(tlvs []bgp.PrefixSIDTLVInterface) ([]*api.PrefixSID_TLV, error)
- func NewAddPathCapability(a *bgp.CapAddPath) *api.AddPathCapability
- func NewAggregatorAttributeFromNative(a *bgp.PathAttributeAggregator) (*api.AggregatorAttribute, error)
- func NewAigpAttributeFromNative(a *bgp.PathAttributeAigp) (*api.AigpAttribute, error)
- func NewAs4AggregatorAttributeFromNative(a *bgp.PathAttributeAs4Aggregator) (*api.As4AggregatorAttribute, error)
- func NewAs4PathAttributeFromNative(a *bgp.PathAttributeAs4Path) (*api.As4PathAttribute, error)
- func NewAsPathAttributeFromNative(a *bgp.PathAttributeAsPath) (*api.AsPathAttribute, error)
- func NewAtomicAggregateAttributeFromNative(a *bgp.PathAttributeAtomicAggregate) (*api.AtomicAggregateAttribute, error)
- func NewCarryingLabelInfoCapability(a *bgp.CapCarryingLabelInfo) *api.CarryingLabelInfoCapability
- func NewClusterListAttributeFromNative(a *bgp.PathAttributeClusterList) (*api.ClusterListAttribute, error)
- func NewCommunitiesAttributeFromNative(a *bgp.PathAttributeCommunities) (*api.CommunitiesAttribute, error)
- func NewEnhancedRouteRefreshCapability(a *bgp.CapEnhancedRouteRefresh) *api.EnhancedRouteRefreshCapability
- func NewEthernetSegmentIdentifierFromNative(a *bgp.EthernetSegmentIdentifier) (*api.EthernetSegmentIdentifier, error)
- func NewExtendedCommunitiesAttributeFromNative(a *bgp.PathAttributeExtendedCommunities) (*api.ExtendedCommunitiesAttribute, error)
- func NewExtendedMessageCapability(a *bgp.CapExtendedMessage) *api.ExtendedMessageCapability
- func NewExtendedNexthopCapability(a *bgp.CapExtendedNexthop) *api.ExtendedNexthopCapability
- func NewFQDNCapability(a *bgp.CapFQDN) *api.FqdnCapability
- func NewFourOctetASNumberCapability(a *bgp.CapFourOctetASNumber) *api.FourOctetASNCapability
- func NewGracefulRestartCapability(a *bgp.CapGracefulRestart) *api.GracefulRestartCapability
- func NewIP6ExtendedCommunitiesAttributeFromNative(a *bgp.PathAttributeIP6ExtendedCommunities) (*api.IP6ExtendedCommunitiesAttribute, error)
- func NewLargeCommunitiesAttributeFromNative(a *bgp.PathAttributeLargeCommunities) (*api.LargeCommunitiesAttribute, error)
- func NewLocalPrefAttributeFromNative(a *bgp.PathAttributeLocalPref) (*api.LocalPrefAttribute, error)
- func NewLongLivedGracefulRestartCapability(a *bgp.CapLongLivedGracefulRestart) *api.LongLivedGracefulRestartCapability
- func NewLsAttributeFromNative(a *bgp.PathAttributeLs) (*api.LsAttribute, error)
- func NewMpReachNLRIAttributeFromNative(a *bgp.PathAttributeMpReachNLRI) (*api.MpReachNLRIAttribute, error)
- func NewMpUnreachNLRIAttributeFromNative(a *bgp.PathAttributeMpUnreachNLRI) (*api.MpUnreachNLRIAttribute, error)
- func NewMultiExitDiscAttributeFromNative(a *bgp.PathAttributeMultiExitDisc) (*api.MultiExitDiscAttribute, error)
- func NewMultiProtocolCapability(a *bgp.CapMultiProtocol) *api.MultiProtocolCapability
- func NewNextHopAttributeFromNative(a *bgp.PathAttributeNextHop) (*api.NextHopAttribute, error)
- func NewOriginAttributeFromNative(a *bgp.PathAttributeOrigin) (*api.OriginAttribute, error)
- func NewOriginatorIdAttributeFromNative(a *bgp.PathAttributeOriginatorId) (*api.OriginatorIdAttribute, error)
- func NewPath(family bgp.Family, nlri bgp.NLRI, isWithdraw bool, ...) (*api.Path, error)
- func NewPmsiTunnelAttributeFromNative(a *bgp.PathAttributePmsiTunnel) (*api.PmsiTunnelAttribute, error)
- func NewPrefixSIDAttributeFromNative(a *bgp.PathAttributePrefixSID) (*api.PrefixSID, error)
- func NewRouteRefreshCapability(a *bgp.CapRouteRefresh) *api.RouteRefreshCapability
- func NewRouteRefreshCiscoCapability(a *bgp.CapRouteRefreshCisco) *api.RouteRefreshCiscoCapability
- func NewSoftwareVersionCapability(a *bgp.CapSoftwareVersion) *api.SoftwareVersionCapability
- func NewTunnelEncapAttributeFromNative(a *bgp.PathAttributeTunnelEncap) (*api.TunnelEncapAttribute, error)
- func NewUnknownAttributeFromNative(a *bgp.PathAttributeUnknown) (*api.UnknownAttribute, error)
- func NewUnknownCapability(a *bgp.CapUnknown) *api.UnknownCapability
- func StringToNetIPLsTLVSrv6SIDInfo(s []string) ([]netip.Addr, uint16, error)
- func ToApiFamily(afi uint16, safi uint8) *api.Family
- func ToFamily(f *api.Family) bgp.Family
- func UnmarshalAttribute(attr *api.Attribute) (bgp.PathAttributeInterface, error)
- func UnmarshalCapabilities(values []*api.Capability) ([]bgp.ParameterCapabilityInterface, error)
- func UnmarshalFlowSpecRules(values []*api.FlowSpecRule) ([]bgp.FlowSpecComponentInterface, error)
- func UnmarshalLsAttribute(a *api.LsAttribute) (*bgp.LsAttribute, error)
- func UnmarshalLsAttributeSrPolicy(sp *api.LsAttributeSrPolicy) (*bgp.LsAttributeSrPolicy, error)
- func UnmarshalLsBgpPeerSegmentSid(a *api.LsBgpPeerSegmentSID) (*bgp.LsBgpPeerSegmentSID, error)
- func UnmarshalLsLinkDescriptor(ld *api.LsLinkDescriptor) (*bgp.LsLinkDescriptor, error)
- func UnmarshalLsNodeDescriptor(nd *api.LsNodeDescriptor) (*bgp.LsNodeDescriptor, error)
- func UnmarshalLsSrBindingSID(b *api.LsSrBindingSID) (*bgp.LsSrBindingSID, error)
- func UnmarshalLsSrCandidatePathConstraints(c *api.LsSrCandidatePathConstraints) (*bgp.LsSrCandidatePathConstraints, error)
- func UnmarshalLsSrCandidatePathState(s *api.LsSrCandidatePathState) (*bgp.LsSrCandidatePathState, error)
- func UnmarshalLsSrPolicyCandidatePathDescriptor(d *api.LsSrPolicyCandidatePathDescriptor) (*bgp.LsSrPolicyCandidatePathDescriptor, error)
- func UnmarshalLsSrPolicyCandidatePathNLRI(n *api.LsSrPolicyCandidatePathNLRI, protocolID bgp.LsProtocolID, ...) (*bgp.LsAddrPrefix, error)
- func UnmarshalLsSrSegment(s *api.LsSrSegment) (*bgp.LsSrSegment, error)
- func UnmarshalLsSrSegmentList(sl *api.LsSrSegmentList) (*bgp.LsSrSegmentList, error)
- func UnmarshalLsSrSegmentListMetric(m *api.LsSrSegmentListMetric) (*bgp.LsSrSegmentListMetric, error)
- func UnmarshalLsSrv6BindingSID(b *api.LsSrv6BindingSID) (*bgp.LsSrv6BindingSID, error)
- func UnmarshalLsTLVMultiTopoID(mti *api.LsMultiTopologyIdentifier) (*bgp.LsTLVMultiTopoID, error)
- func UnmarshalLsTLVSrv6SIDInfo(ssi *api.LsSrv6SIDInformation) (*bgp.LsTLVSrv6SIDInfo, error)
- func UnmarshalMUPTLVs(tlvs []*api.MUPTLV) ([]bgp.MUPTLVInterface, error)
- func UnmarshalNLRI(rf bgp.Family, an *api.NLRI) (bgp.NLRI, error)
- func UnmarshalNLRIs(rf bgp.Family, values []*api.NLRI) ([]bgp.NLRI, error)
- func UnmarshalPathAttributes(values []*api.Attribute) ([]bgp.PathAttributeInterface, error)
- func UnmarshalPrefixDescriptor(pd *api.LsPrefixDescriptor) (*bgp.LsPrefixDescriptor, error)
- func UnmarshalPrefixSID(psid *api.PrefixSID) (*bgp.PathAttributePrefixSID, error)
- func UnmarshalRD(rd *api.RouteDistinguisher) (bgp.RouteDistinguisherInterface, error)
- func UnmarshalRT(rt *api.RouteTarget) (bgp.ExtendedCommunityInterface, error)
- func UnmarshalRTs(values []*api.RouteTarget) ([]bgp.ExtendedCommunityInterface, error)
- func UnmarshalSRBSID(bsid *api.TunnelEncapSubTLVSRBindingSID) (bgp.TunnelEncapSubTLVInterface, error)
- func UnmarshalSRSegments(s []*api.TunnelEncapSubTLVSRSegmentList_Segment) ([]bgp.TunnelEncapSubTLVInterface, error)
- func UnmarshalSubSubTLVs(stlvs map[uint32]*api.SRv6SubSubTLVs) (uint16, []bgp.PrefixSIDTLVInterface, error)
- func UnmarshalSubTLVs(stlvs map[uint32]*api.SRv6SubTLVs) (uint16, []bgp.PrefixSIDTLVInterface, error)
- type AddPathRequest
- type AddPathResponse
- type DeletePathRequest
- type Destination
- type ListPathRequest
- type LookupOption
- type LookupPrefix
- type Path
- type Peer
- type PeerConf
- type PeerEventType
- type PeerState
- type Transport
- type WatchEventMessage_PeerEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddrOrEmpty ¶ added in v4.10.0
AddrOrEmpty renders an optional address. An absent address must come out as an empty string, not as the zero Addr's "invalid IP" text, which would be rejected as a malformed address if the value were fed back in.
func GetNativePathAttributes ¶
func GetNativePathAttributes(p *api.Path) ([]bgp.PathAttributeInterface, error)
func MarshalCapabilities ¶
func MarshalCapabilities(values []bgp.ParameterCapabilityInterface) ([]*api.Capability, error)
func MarshalCapability ¶
func MarshalCapability(value bgp.ParameterCapabilityInterface) (*api.Capability, error)
func MarshalFlowSpecRules ¶
func MarshalFlowSpecRules(values []bgp.FlowSpecComponentInterface) ([]*api.FlowSpecRule, error)
func MarshalLsAttributeSrPolicy ¶ added in v4.10.0
func MarshalLsAttributeSrPolicy(sp *bgp.LsAttributeSrPolicy) *api.LsAttributeSrPolicy
func MarshalLsBgpPeerSegmentSid ¶
func MarshalLsBgpPeerSegmentSid(n *bgp.LsBgpPeerSegmentSID) (*api.LsBgpPeerSegmentSID, error)
func MarshalLsLinkDescriptor ¶
func MarshalLsLinkDescriptor(n *bgp.LsLinkDescriptor) (*api.LsLinkDescriptor, error)
func MarshalLsLinkNLRI ¶
func MarshalLsLinkNLRI(n *bgp.LsLinkNLRI) (*api.LsAddrPrefix_LsNLRI, error)
func MarshalLsNodeDescriptor ¶
func MarshalLsNodeDescriptor(d *bgp.LsNodeDescriptor) (*api.LsNodeDescriptor, error)
func MarshalLsNodeNLRI ¶
func MarshalLsNodeNLRI(n *bgp.LsNodeNLRI) (*api.LsAddrPrefix_LsNLRI, error)
func MarshalLsPrefixDescriptor ¶
func MarshalLsPrefixDescriptor(d *bgp.LsPrefixDescriptor) (*api.LsPrefixDescriptor, error)
func MarshalLsPrefixV4NLRI ¶
func MarshalLsPrefixV4NLRI(n *bgp.LsPrefixV4NLRI) (*api.LsAddrPrefix_LsNLRI, error)
func MarshalLsPrefixV6NLRI ¶
func MarshalLsPrefixV6NLRI(n *bgp.LsPrefixV6NLRI) (*api.LsAddrPrefix_LsNLRI, error)
func MarshalLsSRv6SIDNLRI ¶
func MarshalLsSRv6SIDNLRI(n *bgp.LsSrv6SIDNLRI) (*api.LsAddrPrefix_LsNLRI, error)
func MarshalLsSrBindingSID ¶ added in v4.10.0
func MarshalLsSrBindingSID(b *bgp.LsSrBindingSID) *api.LsSrBindingSID
func MarshalLsSrCandidatePathConstraints ¶ added in v4.10.0
func MarshalLsSrCandidatePathConstraints(c *bgp.LsSrCandidatePathConstraints) *api.LsSrCandidatePathConstraints
func MarshalLsSrCandidatePathState ¶ added in v4.10.0
func MarshalLsSrCandidatePathState(s *bgp.LsSrCandidatePathState) *api.LsSrCandidatePathState
func MarshalLsSrPolicyCandidatePathDescriptor ¶ added in v4.10.0
func MarshalLsSrPolicyCandidatePathDescriptor(d *bgp.LsSrPolicyCandidatePathDescriptor) *api.LsSrPolicyCandidatePathDescriptor
func MarshalLsSrPolicyCandidatePathNLRI ¶ added in v4.10.0
func MarshalLsSrPolicyCandidatePathNLRI(n *bgp.LsSrPolicyCandidatePathNLRI) (*api.LsAddrPrefix_LsNLRI, error)
func MarshalLsSrSegment ¶ added in v4.10.0
func MarshalLsSrSegment(s *bgp.LsSrSegment) *api.LsSrSegment
func MarshalLsSrSegmentList ¶ added in v4.10.0
func MarshalLsSrSegmentList(sl *bgp.LsSrSegmentList) *api.LsSrSegmentList
func MarshalLsSrSegmentListMetric ¶ added in v4.10.0
func MarshalLsSrSegmentListMetric(m *bgp.LsSrSegmentListMetric) *api.LsSrSegmentListMetric
func MarshalLsSrv6BindingSID ¶ added in v4.10.0
func MarshalLsSrv6BindingSID(b *bgp.LsSrv6BindingSID) *api.LsSrv6BindingSID
func MarshalLsTLVMultiTopoID ¶
func MarshalLsTLVMultiTopoID(mti *bgp.LsTLVMultiTopoID) (*api.LsMultiTopologyIdentifier, error)
func MarshalLsTLVSrv6SIDInfo ¶
func MarshalLsTLVSrv6SIDInfo(info *bgp.LsTLVSrv6SIDInfo) (*api.LsSrv6SIDInformation, error)
func MarshalMUPTLVs ¶ added in v4.8.0
func MarshalMUPTLVs(tlvs []bgp.MUPTLVInterface) ([]*api.MUPTLV, error)
func MarshalPathAttributes ¶
func MarshalPathAttributes(attrList []bgp.PathAttributeInterface) ([]*api.Attribute, error)
func MarshalRD ¶
func MarshalRD(rd bgp.RouteDistinguisherInterface) (*api.RouteDistinguisher, error)
func MarshalRT ¶
func MarshalRT(rt bgp.ExtendedCommunityInterface) (*api.RouteTarget, error)
func MarshalRTs ¶
func MarshalRTs(values []bgp.ExtendedCommunityInterface) ([]*api.RouteTarget, error)
func MarshalSRBSID ¶
func MarshalSRBSID(bsid *bgp.TunnelEncapSubTLVSRBSID) (*api.SRBindingSID, error)
MarshalSRBSID marshals SR Policy Binding SID Sub TLV structure
func MarshalSRSegments ¶
func MarshalSRSegments(segs []bgp.TunnelEncapSubTLVInterface) ([]*api.TunnelEncapSubTLVSRSegmentList_Segment, error)
MarshalSRSegments marshals a slice of SR Policy Segment List
func MarshalSRv6SubSubTLVs ¶
func MarshalSRv6SubSubTLVs(tlvs []bgp.PrefixSIDTLVInterface) (map[uint32]*api.SRv6SubSubTLVs, error)
func MarshalSRv6SubTLVs ¶
func MarshalSRv6SubTLVs(tlvs []bgp.PrefixSIDTLVInterface) (map[uint32]*api.SRv6SubTLVs, error)
func MarshalSRv6TLVs ¶
func MarshalSRv6TLVs(tlvs []bgp.PrefixSIDTLVInterface) ([]*api.PrefixSID_TLV, error)
func NewAddPathCapability ¶
func NewAddPathCapability(a *bgp.CapAddPath) *api.AddPathCapability
func NewAggregatorAttributeFromNative ¶
func NewAggregatorAttributeFromNative(a *bgp.PathAttributeAggregator) (*api.AggregatorAttribute, error)
func NewAigpAttributeFromNative ¶
func NewAigpAttributeFromNative(a *bgp.PathAttributeAigp) (*api.AigpAttribute, error)
func NewAs4AggregatorAttributeFromNative ¶
func NewAs4AggregatorAttributeFromNative(a *bgp.PathAttributeAs4Aggregator) (*api.As4AggregatorAttribute, error)
func NewAs4PathAttributeFromNative ¶
func NewAs4PathAttributeFromNative(a *bgp.PathAttributeAs4Path) (*api.As4PathAttribute, error)
func NewAsPathAttributeFromNative ¶
func NewAsPathAttributeFromNative(a *bgp.PathAttributeAsPath) (*api.AsPathAttribute, error)
func NewAtomicAggregateAttributeFromNative ¶
func NewAtomicAggregateAttributeFromNative(a *bgp.PathAttributeAtomicAggregate) (*api.AtomicAggregateAttribute, error)
func NewCarryingLabelInfoCapability ¶
func NewCarryingLabelInfoCapability(a *bgp.CapCarryingLabelInfo) *api.CarryingLabelInfoCapability
func NewClusterListAttributeFromNative ¶
func NewClusterListAttributeFromNative(a *bgp.PathAttributeClusterList) (*api.ClusterListAttribute, error)
func NewCommunitiesAttributeFromNative ¶
func NewCommunitiesAttributeFromNative(a *bgp.PathAttributeCommunities) (*api.CommunitiesAttribute, error)
func NewEnhancedRouteRefreshCapability ¶
func NewEnhancedRouteRefreshCapability(a *bgp.CapEnhancedRouteRefresh) *api.EnhancedRouteRefreshCapability
func NewEthernetSegmentIdentifierFromNative ¶
func NewEthernetSegmentIdentifierFromNative(a *bgp.EthernetSegmentIdentifier) (*api.EthernetSegmentIdentifier, error)
func NewExtendedCommunitiesAttributeFromNative ¶
func NewExtendedCommunitiesAttributeFromNative(a *bgp.PathAttributeExtendedCommunities) (*api.ExtendedCommunitiesAttribute, error)
func NewExtendedMessageCapability ¶ added in v4.7.0
func NewExtendedMessageCapability(a *bgp.CapExtendedMessage) *api.ExtendedMessageCapability
NewExtendedMessageCapability mirrors the empty-TLV shape RFC 8654 gives the BGP Extended Message capability. There is no payload to project; the API consumer just needs to know the peer advertised the capability.
func NewExtendedNexthopCapability ¶
func NewExtendedNexthopCapability(a *bgp.CapExtendedNexthop) *api.ExtendedNexthopCapability
func NewFQDNCapability ¶
func NewFQDNCapability(a *bgp.CapFQDN) *api.FqdnCapability
func NewFourOctetASNumberCapability ¶
func NewFourOctetASNumberCapability(a *bgp.CapFourOctetASNumber) *api.FourOctetASNCapability
func NewGracefulRestartCapability ¶
func NewGracefulRestartCapability(a *bgp.CapGracefulRestart) *api.GracefulRestartCapability
func NewIP6ExtendedCommunitiesAttributeFromNative ¶
func NewIP6ExtendedCommunitiesAttributeFromNative(a *bgp.PathAttributeIP6ExtendedCommunities) (*api.IP6ExtendedCommunitiesAttribute, error)
func NewLargeCommunitiesAttributeFromNative ¶
func NewLargeCommunitiesAttributeFromNative(a *bgp.PathAttributeLargeCommunities) (*api.LargeCommunitiesAttribute, error)
func NewLocalPrefAttributeFromNative ¶
func NewLocalPrefAttributeFromNative(a *bgp.PathAttributeLocalPref) (*api.LocalPrefAttribute, error)
func NewLongLivedGracefulRestartCapability ¶
func NewLongLivedGracefulRestartCapability(a *bgp.CapLongLivedGracefulRestart) *api.LongLivedGracefulRestartCapability
func NewLsAttributeFromNative ¶
func NewLsAttributeFromNative(a *bgp.PathAttributeLs) (*api.LsAttribute, error)
func NewMpReachNLRIAttributeFromNative ¶
func NewMpReachNLRIAttributeFromNative(a *bgp.PathAttributeMpReachNLRI) (*api.MpReachNLRIAttribute, error)
func NewMpUnreachNLRIAttributeFromNative ¶
func NewMpUnreachNLRIAttributeFromNative(a *bgp.PathAttributeMpUnreachNLRI) (*api.MpUnreachNLRIAttribute, error)
func NewMultiExitDiscAttributeFromNative ¶
func NewMultiExitDiscAttributeFromNative(a *bgp.PathAttributeMultiExitDisc) (*api.MultiExitDiscAttribute, error)
func NewMultiProtocolCapability ¶
func NewMultiProtocolCapability(a *bgp.CapMultiProtocol) *api.MultiProtocolCapability
func NewNextHopAttributeFromNative ¶
func NewNextHopAttributeFromNative(a *bgp.PathAttributeNextHop) (*api.NextHopAttribute, error)
func NewOriginAttributeFromNative ¶
func NewOriginAttributeFromNative(a *bgp.PathAttributeOrigin) (*api.OriginAttribute, error)
func NewOriginatorIdAttributeFromNative ¶
func NewOriginatorIdAttributeFromNative(a *bgp.PathAttributeOriginatorId) (*api.OriginatorIdAttribute, error)
func NewPmsiTunnelAttributeFromNative ¶
func NewPmsiTunnelAttributeFromNative(a *bgp.PathAttributePmsiTunnel) (*api.PmsiTunnelAttribute, error)
func NewPrefixSIDAttributeFromNative ¶
func NewPrefixSIDAttributeFromNative(a *bgp.PathAttributePrefixSID) (*api.PrefixSID, error)
func NewRouteRefreshCapability ¶
func NewRouteRefreshCapability(a *bgp.CapRouteRefresh) *api.RouteRefreshCapability
func NewRouteRefreshCiscoCapability ¶
func NewRouteRefreshCiscoCapability(a *bgp.CapRouteRefreshCisco) *api.RouteRefreshCiscoCapability
func NewSoftwareVersionCapability ¶
func NewSoftwareVersionCapability(a *bgp.CapSoftwareVersion) *api.SoftwareVersionCapability
func NewTunnelEncapAttributeFromNative ¶
func NewTunnelEncapAttributeFromNative(a *bgp.PathAttributeTunnelEncap) (*api.TunnelEncapAttribute, error)
func NewUnknownAttributeFromNative ¶
func NewUnknownAttributeFromNative(a *bgp.PathAttributeUnknown) (*api.UnknownAttribute, error)
func NewUnknownCapability ¶
func NewUnknownCapability(a *bgp.CapUnknown) *api.UnknownCapability
func UnmarshalAttribute ¶
func UnmarshalAttribute(attr *api.Attribute) (bgp.PathAttributeInterface, error)
func UnmarshalCapabilities ¶
func UnmarshalCapabilities(values []*api.Capability) ([]bgp.ParameterCapabilityInterface, error)
func UnmarshalFlowSpecRules ¶
func UnmarshalFlowSpecRules(values []*api.FlowSpecRule) ([]bgp.FlowSpecComponentInterface, error)
func UnmarshalLsAttribute ¶
func UnmarshalLsAttribute(a *api.LsAttribute) (*bgp.LsAttribute, error)
func UnmarshalLsAttributeSrPolicy ¶ added in v4.10.0
func UnmarshalLsAttributeSrPolicy(sp *api.LsAttributeSrPolicy) (*bgp.LsAttributeSrPolicy, error)
func UnmarshalLsBgpPeerSegmentSid ¶
func UnmarshalLsBgpPeerSegmentSid(a *api.LsBgpPeerSegmentSID) (*bgp.LsBgpPeerSegmentSID, error)
func UnmarshalLsLinkDescriptor ¶
func UnmarshalLsLinkDescriptor(ld *api.LsLinkDescriptor) (*bgp.LsLinkDescriptor, error)
func UnmarshalLsNodeDescriptor ¶
func UnmarshalLsNodeDescriptor(nd *api.LsNodeDescriptor) (*bgp.LsNodeDescriptor, error)
func UnmarshalLsSrBindingSID ¶ added in v4.10.0
func UnmarshalLsSrBindingSID(b *api.LsSrBindingSID) (*bgp.LsSrBindingSID, error)
func UnmarshalLsSrCandidatePathConstraints ¶ added in v4.10.0
func UnmarshalLsSrCandidatePathConstraints(c *api.LsSrCandidatePathConstraints) (*bgp.LsSrCandidatePathConstraints, error)
func UnmarshalLsSrCandidatePathState ¶ added in v4.10.0
func UnmarshalLsSrCandidatePathState(s *api.LsSrCandidatePathState) (*bgp.LsSrCandidatePathState, error)
func UnmarshalLsSrPolicyCandidatePathDescriptor ¶ added in v4.10.0
func UnmarshalLsSrPolicyCandidatePathDescriptor(d *api.LsSrPolicyCandidatePathDescriptor) (*bgp.LsSrPolicyCandidatePathDescriptor, error)
func UnmarshalLsSrPolicyCandidatePathNLRI ¶ added in v4.10.0
func UnmarshalLsSrPolicyCandidatePathNLRI(n *api.LsSrPolicyCandidatePathNLRI, protocolID bgp.LsProtocolID, identifier uint64) (*bgp.LsAddrPrefix, error)
UnmarshalLsSrPolicyCandidatePathNLRI builds the native NLRI. The NLRI length is computed from the descriptors, so callers need not provide it. The conversion accepts whatever the wire decoder accepts (RFC 9552 section 8.2.2), so a route learned from a peer always converts back; the RFC 9857 rules for originating a candidate path are enforced by the gobgp command instead.
func UnmarshalLsSrSegment ¶ added in v4.10.0
func UnmarshalLsSrSegment(s *api.LsSrSegment) (*bgp.LsSrSegment, error)
func UnmarshalLsSrSegmentList ¶ added in v4.10.0
func UnmarshalLsSrSegmentList(sl *api.LsSrSegmentList) (*bgp.LsSrSegmentList, error)
func UnmarshalLsSrSegmentListMetric ¶ added in v4.10.0
func UnmarshalLsSrSegmentListMetric(m *api.LsSrSegmentListMetric) (*bgp.LsSrSegmentListMetric, error)
func UnmarshalLsSrv6BindingSID ¶ added in v4.10.0
func UnmarshalLsSrv6BindingSID(b *api.LsSrv6BindingSID) (*bgp.LsSrv6BindingSID, error)
func UnmarshalLsTLVMultiTopoID ¶
func UnmarshalLsTLVMultiTopoID(mti *api.LsMultiTopologyIdentifier) (*bgp.LsTLVMultiTopoID, error)
func UnmarshalLsTLVSrv6SIDInfo ¶
func UnmarshalLsTLVSrv6SIDInfo(ssi *api.LsSrv6SIDInformation) (*bgp.LsTLVSrv6SIDInfo, error)
func UnmarshalMUPTLVs ¶ added in v4.8.0
func UnmarshalMUPTLVs(tlvs []*api.MUPTLV) ([]bgp.MUPTLVInterface, error)
func UnmarshalPathAttributes ¶
func UnmarshalPathAttributes(values []*api.Attribute) ([]bgp.PathAttributeInterface, error)
func UnmarshalPrefixDescriptor ¶
func UnmarshalPrefixDescriptor(pd *api.LsPrefixDescriptor) (*bgp.LsPrefixDescriptor, error)
func UnmarshalPrefixSID ¶
func UnmarshalPrefixSID(psid *api.PrefixSID) (*bgp.PathAttributePrefixSID, error)
func UnmarshalRD ¶
func UnmarshalRD(rd *api.RouteDistinguisher) (bgp.RouteDistinguisherInterface, error)
func UnmarshalRT ¶
func UnmarshalRT(rt *api.RouteTarget) (bgp.ExtendedCommunityInterface, error)
func UnmarshalRTs ¶
func UnmarshalRTs(values []*api.RouteTarget) ([]bgp.ExtendedCommunityInterface, error)
func UnmarshalSRBSID ¶
func UnmarshalSRBSID(bsid *api.TunnelEncapSubTLVSRBindingSID) (bgp.TunnelEncapSubTLVInterface, error)
UnmarshalSRBSID unmarshals SR Policy Binding SID Sub TLV and returns native TunnelEncapSubTLVInterface interface
func UnmarshalSRSegments ¶
func UnmarshalSRSegments(s []*api.TunnelEncapSubTLVSRSegmentList_Segment) ([]bgp.TunnelEncapSubTLVInterface, error)
UnmarshalSRSegments unmarshals SR Policy Segments slice of structs
func UnmarshalSubSubTLVs ¶
func UnmarshalSubSubTLVs(stlvs map[uint32]*api.SRv6SubSubTLVs) (uint16, []bgp.PrefixSIDTLVInterface, error)
func UnmarshalSubTLVs ¶
func UnmarshalSubTLVs(stlvs map[uint32]*api.SRv6SubTLVs) (uint16, []bgp.PrefixSIDTLVInterface, error)
Types ¶
type AddPathRequest ¶
AddPathRequest is used by server.AddPath API
type AddPathResponse ¶
AddPathResponse is used by server.AddPath API
type DeletePathRequest ¶
type Destination ¶
type Destination struct {
Paths []*Path
}
func NewDestination ¶
func NewDestination(dst *api.Destination) *Destination
func (*Destination) MarshalJSON ¶
func (d *Destination) MarshalJSON() ([]byte, error)
type ListPathRequest ¶
type ListPathRequest struct {
TableType api.TableType
Name string
Family bgp.Family
Prefixes []*LookupPrefix
SortType api.ListPathRequest_SortType
EnableFiltered bool
}
ListPathRequest is used by server.ListPath API
type LookupOption ¶
type LookupOption uint8
const ( LOOKUP_EXACT LookupOption = iota LOOKUP_LONGER LOOKUP_SHORTER )
func LookupOptionFromAPI ¶ added in v4.5.0
func LookupOptionFromAPI(t api.TableLookupPrefix_Type) LookupOption
LookupOptionFromAPI converts a protobuf TableLookupPrefix_Type to a LookupOption. A direct cast is wrong because the proto enum reserves 0 for UNSPECIFIED and starts meaningful values at 1, while LookupOption's iota starts at 0 (EXACT).
type LookupPrefix ¶
type LookupPrefix struct {
Prefix string
RD string
LookupOption
}
type Path ¶
type Path struct {
Family bgp.Family
Nlri bgp.NLRI `json:"nlri"`
Age int64 `json:"age"`
Best bool `json:"best"`
Attrs []bgp.PathAttributeInterface `json:"attrs"`
Stale bool `json:"stale"`
Withdrawal bool `json:"withdrawal,omitempty"`
PeerASN uint32 `json:"peer-asn,omitempty"`
PeerID netip.Addr `json:"peer-id,omitzero"`
PeerAddress netip.Addr `json:"peer-address,omitzero"`
IsFromExternal bool `json:"is-from-external,omitempty"`
NoImplicitWithdraw bool `json:"no-implicit-withdraw,omitempty"`
IsNexthopInvalid bool `json:"is-nexthop-invalid,omitempty"`
// the following fields are used only repoted by GetList() API
SendMaxFiltered bool `json:"send-max-filtered,omitempty"` // true if the path has been filtered out due to max path count reached
Filtered bool `json:"filtered,omitempty"`
Validation *api.Validation `json:"validation,omitempty"`
RemoteID uint32
LocalID uint32
}
used by server.WatchEventMessages API
type PeerEventType ¶
type PeerEventType uint32
const ( PEER_EVENT_UNKNOWN PeerEventType = 0 PEER_EVENT_INIT PeerEventType = 1 PEER_EVENT_END_OF_INIT PeerEventType = 2 PEER_EVENT_STATE PeerEventType = 3 )
type PeerState ¶
type PeerState struct {
PeerASN uint32
LocalASN uint32
NeighborAddress netip.Addr
SessionState bgp.FSMState
AdminState api.PeerState_AdminState
RouterID netip.Addr
PeerGroup string
RemoteCap []bgp.ParameterCapabilityInterface
LocalCap []bgp.ParameterCapabilityInterface
DisconnectReason api.PeerState_DisconnectReason
DisconnectMessage string
}
type WatchEventMessage_PeerEvent ¶
type WatchEventMessage_PeerEvent struct {
Type PeerEventType
Peer Peer
}
WatchEventMessages API type