Documentation ¶
Index ¶
- func GetNativeNlri(p *api.Path) (bgp.AddrPrefixInterface, error)
- func GetNativePathAttributes(p *api.Path) ([]bgp.PathAttributeInterface, error)
- func MarshalCapabilities(values []bgp.ParameterCapabilityInterface) ([]*any.Any, error)
- func MarshalCapability(value bgp.ParameterCapabilityInterface) (*any.Any, error)
- func MarshalFlowSpecRules(values []bgp.FlowSpecComponentInterface) []*any.Any
- func MarshalNLRI(value bgp.AddrPrefixInterface) *any.Any
- func MarshalNLRIs(values []bgp.AddrPrefixInterface) []*any.Any
- func MarshalPathAttributes(attrList []bgp.PathAttributeInterface) []*any.Any
- func MarshalRD(rd bgp.RouteDistinguisherInterface) *any.Any
- func MarshalRT(rt bgp.ExtendedCommunityInterface) *any.Any
- func MarshalRTs(values []bgp.ExtendedCommunityInterface) []*any.Any
- func NewAddPathCapability(a *bgp.CapAddPath) *api.AddPathCapability
- func NewAggregatorAttributeFromNative(a *bgp.PathAttributeAggregator) *api.AggregatorAttribute
- func NewAigpAttributeFromNative(a *bgp.PathAttributeAigp) *api.AigpAttribute
- func NewAs4AggregatorAttributeFromNative(a *bgp.PathAttributeAs4Aggregator) *api.As4AggregatorAttribute
- func NewAs4PathAttributeFromNative(a *bgp.PathAttributeAs4Path) *api.As4PathAttribute
- func NewAsPathAttributeFromNative(a *bgp.PathAttributeAsPath) *api.AsPathAttribute
- func NewAtomicAggregateAttributeFromNative(a *bgp.PathAttributeAtomicAggregate) *api.AtomicAggregateAttribute
- func NewCarryingLabelInfoCapability(a *bgp.CapCarryingLabelInfo) *api.CarryingLabelInfoCapability
- func NewClusterListAttributeFromNative(a *bgp.PathAttributeClusterList) *api.ClusterListAttribute
- func NewCommunitiesAttributeFromNative(a *bgp.PathAttributeCommunities) *api.CommunitiesAttribute
- func NewEnhancedRouteRefreshCapability(a *bgp.CapEnhancedRouteRefresh) *api.EnhancedRouteRefreshCapability
- func NewEthernetSegmentIdentifierFromNative(a *bgp.EthernetSegmentIdentifier) *api.EthernetSegmentIdentifier
- func NewExtendedCommunitiesAttributeFromNative(a *bgp.PathAttributeExtendedCommunities) *api.ExtendedCommunitiesAttribute
- func NewExtendedNexthopCapability(a *bgp.CapExtendedNexthop) *api.ExtendedNexthopCapability
- func NewFourOctetASNumberCapability(a *bgp.CapFourOctetASNumber) *api.FourOctetASNumberCapability
- func NewGracefulRestartCapability(a *bgp.CapGracefulRestart) *api.GracefulRestartCapability
- func NewIP6ExtendedCommunitiesAttributeFromNative(a *bgp.PathAttributeIP6ExtendedCommunities) *api.IP6ExtendedCommunitiesAttribute
- func NewLargeCommunitiesAttributeFromNative(a *bgp.PathAttributeLargeCommunities) *api.LargeCommunitiesAttribute
- func NewLocalPrefAttributeFromNative(a *bgp.PathAttributeLocalPref) *api.LocalPrefAttribute
- func NewLongLivedGracefulRestartCapability(a *bgp.CapLongLivedGracefulRestart) *api.LongLivedGracefulRestartCapability
- func NewMpReachNLRIAttributeFromNative(a *bgp.PathAttributeMpReachNLRI) *api.MpReachNLRIAttribute
- func NewMpUnreachNLRIAttributeFromNative(a *bgp.PathAttributeMpUnreachNLRI) *api.MpUnreachNLRIAttribute
- func NewMultiExitDiscAttributeFromNative(a *bgp.PathAttributeMultiExitDisc) *api.MultiExitDiscAttribute
- func NewMultiProtocolCapability(a *bgp.CapMultiProtocol) *api.MultiProtocolCapability
- func NewNextHopAttributeFromNative(a *bgp.PathAttributeNextHop) *api.NextHopAttribute
- func NewOriginAttributeFromNative(a *bgp.PathAttributeOrigin) *api.OriginAttribute
- func NewOriginatorIDAttributeFromNative(a *bgp.PathAttributeOriginatorId) *api.OriginatorIdAttribute
- func NewPath(nlri bgp.AddrPrefixInterface, isWithdraw bool, ...) *api.Path
- func NewPmsiTunnelAttributeFromNative(a *bgp.PathAttributePmsiTunnel) *api.PmsiTunnelAttribute
- func NewRouteRefreshCapability(a *bgp.CapRouteRefresh) *api.RouteRefreshCapability
- func NewRouteRefreshCiscoCapability(a *bgp.CapRouteRefreshCisco) *api.RouteRefreshCiscoCapability
- func NewTunnelEncapAttributeFromNative(a *bgp.PathAttributeTunnelEncap) *api.TunnelEncapAttribute
- func NewUnknownAttributeFromNative(a *bgp.PathAttributeUnknown) *api.UnknownAttribute
- func NewUnknownCapability(a *bgp.CapUnknown) *api.UnknownCapability
- func ToAPIFamily(afi uint16, safi uint8) *api.Family
- func ToRouteFamily(f *api.Family) bgp.RouteFamily
- func UnmarshalAttribute(an *any.Any) (bgp.PathAttributeInterface, error)
- func UnmarshalCapabilities(values []*any.Any) ([]bgp.ParameterCapabilityInterface, error)
- func UnmarshalFlowSpecRules(values []*any.Any) ([]bgp.FlowSpecComponentInterface, error)
- func UnmarshalNLRI(rf bgp.RouteFamily, an *any.Any) (bgp.AddrPrefixInterface, error)
- func UnmarshalNLRIs(rf bgp.RouteFamily, values []*any.Any) ([]bgp.AddrPrefixInterface, error)
- func UnmarshalPathAttributes(values []*any.Any) ([]bgp.PathAttributeInterface, error)
- func UnmarshalRD(a *any.Any) (bgp.RouteDistinguisherInterface, error)
- func UnmarshalRT(a *any.Any) (bgp.ExtendedCommunityInterface, error)
- func UnmarshalRTs(values []*any.Any) ([]bgp.ExtendedCommunityInterface, error)
- type Destination
- type Path
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNativeNlri ¶
func GetNativeNlri(p *api.Path) (bgp.AddrPrefixInterface, error)
GetNativeNlri creates an address prefix from a path
func GetNativePathAttributes ¶
func GetNativePathAttributes(p *api.Path) ([]bgp.PathAttributeInterface, error)
GetNativePathAttributes gets the path attributes from a path
func MarshalCapabilities ¶
func MarshalCapabilities(values []bgp.ParameterCapabilityInterface) ([]*any.Any, error)
MarshalCapabilities serializes a list of capability interfaces
func MarshalCapability ¶
func MarshalCapability(value bgp.ParameterCapabilityInterface) (*any.Any, error)
MarshalCapability serializes a capability interface
func MarshalFlowSpecRules ¶
func MarshalFlowSpecRules(values []bgp.FlowSpecComponentInterface) []*any.Any
MarshalFlowSpecRules serializes flow spec rules
func MarshalNLRI ¶
func MarshalNLRI(value bgp.AddrPrefixInterface) *any.Any
MarshalNLRI serializes something
func MarshalNLRIs ¶
func MarshalNLRIs(values []bgp.AddrPrefixInterface) []*any.Any
MarshalNLRIs serializes something
func MarshalPathAttributes ¶
func MarshalPathAttributes(attrList []bgp.PathAttributeInterface) []*any.Any
MarshalPathAttributes serializes a path attribute
func MarshalRD ¶
func MarshalRD(rd bgp.RouteDistinguisherInterface) *any.Any
MarshalRD serializes a route distinguisher interface
func MarshalRT ¶
func MarshalRT(rt bgp.ExtendedCommunityInterface) *any.Any
MarshalRT serializes extended communities
func MarshalRTs ¶
func MarshalRTs(values []bgp.ExtendedCommunityInterface) []*any.Any
MarshalRTs serializes a list of extended communities
func NewAddPathCapability ¶
func NewAddPathCapability(a *bgp.CapAddPath) *api.AddPathCapability
NewAddPathCapability creates a add path capability
func NewAggregatorAttributeFromNative ¶
func NewAggregatorAttributeFromNative(a *bgp.PathAttributeAggregator) *api.AggregatorAttribute
NewAggregatorAttributeFromNative creates a new aggregator attribute
func NewAigpAttributeFromNative ¶
func NewAigpAttributeFromNative(a *bgp.PathAttributeAigp) *api.AigpAttribute
NewAigpAttributeFromNative creates a new aigp path attribute
func NewAs4AggregatorAttributeFromNative ¶
func NewAs4AggregatorAttributeFromNative(a *bgp.PathAttributeAs4Aggregator) *api.As4AggregatorAttribute
NewAs4AggregatorAttributeFromNative creates a new aggregator path attribute
func NewAs4PathAttributeFromNative ¶
func NewAs4PathAttributeFromNative(a *bgp.PathAttributeAs4Path) *api.As4PathAttribute
NewAs4PathAttributeFromNative creates a new path attribute
func NewAsPathAttributeFromNative ¶
func NewAsPathAttributeFromNative(a *bgp.PathAttributeAsPath) *api.AsPathAttribute
NewAsPathAttributeFromNative creates a new as path attribute
func NewAtomicAggregateAttributeFromNative ¶
func NewAtomicAggregateAttributeFromNative(a *bgp.PathAttributeAtomicAggregate) *api.AtomicAggregateAttribute
NewAtomicAggregateAttributeFromNative creates a new atomic aggregate attribute
func NewCarryingLabelInfoCapability ¶
func NewCarryingLabelInfoCapability(a *bgp.CapCarryingLabelInfo) *api.CarryingLabelInfoCapability
NewCarryingLabelInfoCapability creates a new capability
func NewClusterListAttributeFromNative ¶
func NewClusterListAttributeFromNative(a *bgp.PathAttributeClusterList) *api.ClusterListAttribute
NewClusterListAttributeFromNative creates a new cluster list attribute
func NewCommunitiesAttributeFromNative ¶
func NewCommunitiesAttributeFromNative(a *bgp.PathAttributeCommunities) *api.CommunitiesAttribute
NewCommunitiesAttributeFromNative creates a new communities attribute
func NewEnhancedRouteRefreshCapability ¶
func NewEnhancedRouteRefreshCapability(a *bgp.CapEnhancedRouteRefresh) *api.EnhancedRouteRefreshCapability
NewEnhancedRouteRefreshCapability creates a new capability
func NewEthernetSegmentIdentifierFromNative ¶
func NewEthernetSegmentIdentifierFromNative(a *bgp.EthernetSegmentIdentifier) *api.EthernetSegmentIdentifier
NewEthernetSegmentIdentifierFromNative creates a new ethernet segment identifier
func NewExtendedCommunitiesAttributeFromNative ¶
func NewExtendedCommunitiesAttributeFromNative(a *bgp.PathAttributeExtendedCommunities) *api.ExtendedCommunitiesAttribute
NewExtendedCommunitiesAttributeFromNative creates an extended communities path attribute
func NewExtendedNexthopCapability ¶
func NewExtendedNexthopCapability(a *bgp.CapExtendedNexthop) *api.ExtendedNexthopCapability
NewExtendedNexthopCapability creates a new extended capability
func NewFourOctetASNumberCapability ¶
func NewFourOctetASNumberCapability(a *bgp.CapFourOctetASNumber) *api.FourOctetASNumberCapability
NewFourOctetASNumberCapability creates new 32bit ASN capabiliy
func NewGracefulRestartCapability ¶
func NewGracefulRestartCapability(a *bgp.CapGracefulRestart) *api.GracefulRestartCapability
NewGracefulRestartCapability creates a new graceful resetart capabilty
func NewIP6ExtendedCommunitiesAttributeFromNative ¶
func NewIP6ExtendedCommunitiesAttributeFromNative(a *bgp.PathAttributeIP6ExtendedCommunities) *api.IP6ExtendedCommunitiesAttribute
NewIP6ExtendedCommunitiesAttributeFromNative creates a new IPv6 extended communities attribute
func NewLargeCommunitiesAttributeFromNative ¶
func NewLargeCommunitiesAttributeFromNative(a *bgp.PathAttributeLargeCommunities) *api.LargeCommunitiesAttribute
NewLargeCommunitiesAttributeFromNative creates a new large communities attribute
func NewLocalPrefAttributeFromNative ¶
func NewLocalPrefAttributeFromNative(a *bgp.PathAttributeLocalPref) *api.LocalPrefAttribute
NewLocalPrefAttributeFromNative creates a new local pref attribute
func NewLongLivedGracefulRestartCapability ¶
func NewLongLivedGracefulRestartCapability(a *bgp.CapLongLivedGracefulRestart) *api.LongLivedGracefulRestartCapability
NewLongLivedGracefulRestartCapability creates a new capability
func NewMpReachNLRIAttributeFromNative ¶
func NewMpReachNLRIAttributeFromNative(a *bgp.PathAttributeMpReachNLRI) *api.MpReachNLRIAttribute
NewMpReachNLRIAttributeFromNative creates a new path attribute
func NewMpUnreachNLRIAttributeFromNative ¶
func NewMpUnreachNLRIAttributeFromNative(a *bgp.PathAttributeMpUnreachNLRI) *api.MpUnreachNLRIAttribute
NewMpUnreachNLRIAttributeFromNative creates a new path attribute
func NewMultiExitDiscAttributeFromNative ¶
func NewMultiExitDiscAttributeFromNative(a *bgp.PathAttributeMultiExitDisc) *api.MultiExitDiscAttribute
NewMultiExitDiscAttributeFromNative creates a new multi exit attribute
func NewMultiProtocolCapability ¶
func NewMultiProtocolCapability(a *bgp.CapMultiProtocol) *api.MultiProtocolCapability
NewMultiProtocolCapability creates a new multi protocol capability
func NewNextHopAttributeFromNative ¶
func NewNextHopAttributeFromNative(a *bgp.PathAttributeNextHop) *api.NextHopAttribute
NewNextHopAttributeFromNative creates a new next hop attribute
func NewOriginAttributeFromNative ¶
func NewOriginAttributeFromNative(a *bgp.PathAttributeOrigin) *api.OriginAttribute
NewOriginAttributeFromNative creates a new origin attribute
func NewOriginatorIDAttributeFromNative ¶
func NewOriginatorIDAttributeFromNative(a *bgp.PathAttributeOriginatorId) *api.OriginatorIdAttribute
NewOriginatorIDAttributeFromNative creates a new origin ID attribute
func NewPath ¶
func NewPath(nlri bgp.AddrPrefixInterface, isWithdraw bool, attrs []bgp.PathAttributeInterface, age time.Time) *api.Path
NewPath creates a new path
func NewPmsiTunnelAttributeFromNative ¶
func NewPmsiTunnelAttributeFromNative(a *bgp.PathAttributePmsiTunnel) *api.PmsiTunnelAttribute
NewPmsiTunnelAttributeFromNative creates a new tunnel path attribute
func NewRouteRefreshCapability ¶
func NewRouteRefreshCapability(a *bgp.CapRouteRefresh) *api.RouteRefreshCapability
NewRouteRefreshCapability creates a new capability
func NewRouteRefreshCiscoCapability ¶
func NewRouteRefreshCiscoCapability(a *bgp.CapRouteRefreshCisco) *api.RouteRefreshCiscoCapability
NewRouteRefreshCiscoCapability creates a new capability
func NewTunnelEncapAttributeFromNative ¶
func NewTunnelEncapAttributeFromNative(a *bgp.PathAttributeTunnelEncap) *api.TunnelEncapAttribute
NewTunnelEncapAttributeFromNative creates a new tunnel path attribute
func NewUnknownAttributeFromNative ¶
func NewUnknownAttributeFromNative(a *bgp.PathAttributeUnknown) *api.UnknownAttribute
NewUnknownAttributeFromNative creates a new unknown path attribute
func NewUnknownCapability ¶
func NewUnknownCapability(a *bgp.CapUnknown) *api.UnknownCapability
NewUnknownCapability creates a new unknown capability
func ToAPIFamily ¶
ToAPIFamily makes an API Family from a route family
func ToRouteFamily ¶
func ToRouteFamily(f *api.Family) bgp.RouteFamily
ToRouteFamily makes an route family from an API family
func UnmarshalAttribute ¶
func UnmarshalAttribute(an *any.Any) (bgp.PathAttributeInterface, error)
UnmarshalAttribute unmarshals an attribute
func UnmarshalCapabilities ¶
func UnmarshalCapabilities(values []*any.Any) ([]bgp.ParameterCapabilityInterface, error)
UnmarshalCapabilities deserializes a list of capabilities
func UnmarshalFlowSpecRules ¶
func UnmarshalFlowSpecRules(values []*any.Any) ([]bgp.FlowSpecComponentInterface, error)
UnmarshalFlowSpecRules deserializes flow spec rules
func UnmarshalNLRI ¶
func UnmarshalNLRI(rf bgp.RouteFamily, an *any.Any) (bgp.AddrPrefixInterface, error)
UnmarshalNLRI deserializes something
func UnmarshalNLRIs ¶
func UnmarshalNLRIs(rf bgp.RouteFamily, values []*any.Any) ([]bgp.AddrPrefixInterface, error)
UnmarshalNLRIs deserializes NLRIs (whatever this is)
func UnmarshalPathAttributes ¶
func UnmarshalPathAttributes(values []*any.Any) ([]bgp.PathAttributeInterface, error)
UnmarshalPathAttributes deserializes a path attribute
func UnmarshalRD ¶
func UnmarshalRD(a *any.Any) (bgp.RouteDistinguisherInterface, error)
UnmarshalRD deserializes anything into a route distinguisher interface
func UnmarshalRT ¶
func UnmarshalRT(a *any.Any) (bgp.ExtendedCommunityInterface, error)
UnmarshalRT deserializes extended communities
func UnmarshalRTs ¶
func UnmarshalRTs(values []*any.Any) ([]bgp.ExtendedCommunityInterface, error)
UnmarshalRTs deserializes a list of extended communities
Types ¶
type Destination ¶
type Destination struct {
Paths []*Path
}
Destination contains a list of paths
func NewDestination ¶
func NewDestination(dst *api.Destination) *Destination
NewDestination creates a new destination
func (*Destination) MarshalJSON ¶
func (d *Destination) MarshalJSON() ([]byte, error)
MarshalJSON serializes a destination
type Path ¶
type Path struct { Nlri bgp.AddrPrefixInterface `json:"nlri"` Age int64 `json:"age"` Best bool `json:"best"` Attrs []bgp.PathAttributeInterface `json:"attrs"` Stale bool `json:"stale"` Withdrawal bool `json:"withdrawal,omitempty"` SourceID net.IP `json:"source-id,omitempty"` NeighborIP net.IP `json:"neighbor-ip,omitempty"` }
Path structure: This is a workaround. This for the json format compatibility. Once we update senario tests, we can remove this.