apiutil

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNativeNlri

func GetNativeNlri(p *api.Path) (bgp.AddrPrefixInterface, error)

func GetNativePathAttributes

func GetNativePathAttributes(p *api.Path) ([]bgp.PathAttributeInterface, error)

func MarshalCapabilities

func MarshalCapabilities(values []bgp.ParameterCapabilityInterface) ([]*any.Any, error)

func MarshalCapability

func MarshalCapability(value bgp.ParameterCapabilityInterface) (*any.Any, error)

func MarshalFlowSpecRules

func MarshalFlowSpecRules(values []bgp.FlowSpecComponentInterface) []*any.Any

func MarshalNLRI

func MarshalNLRI(value bgp.AddrPrefixInterface) *any.Any

func MarshalNLRIs

func MarshalNLRIs(values []bgp.AddrPrefixInterface) []*any.Any

func MarshalPathAttributes

func MarshalPathAttributes(attrList []bgp.PathAttributeInterface) []*any.Any

func MarshalRD

func MarshalRD(rd bgp.RouteDistinguisherInterface) *any.Any

func MarshalRT

func MarshalRT(rt bgp.ExtendedCommunityInterface) *any.Any

func MarshalRTs

func MarshalRTs(values []bgp.ExtendedCommunityInterface) []*any.Any

func NewAddPathCapability

func NewAddPathCapability(a *bgp.CapAddPath) *api.AddPathCapability

func NewAggregatorAttributeFromNative

func NewAggregatorAttributeFromNative(a *bgp.PathAttributeAggregator) *api.AggregatorAttribute

func NewAigpAttributeFromNative

func NewAigpAttributeFromNative(a *bgp.PathAttributeAigp) *api.AigpAttribute

func NewAs4PathAttributeFromNative

func NewAs4PathAttributeFromNative(a *bgp.PathAttributeAs4Path) *api.As4PathAttribute

func NewAsPathAttributeFromNative

func NewAsPathAttributeFromNative(a *bgp.PathAttributeAsPath) *api.AsPathAttribute

func NewLocalPrefAttributeFromNative

func NewLocalPrefAttributeFromNative(a *bgp.PathAttributeLocalPref) *api.LocalPrefAttribute

func NewMultiProtocolCapability

func NewMultiProtocolCapability(a *bgp.CapMultiProtocol) *api.MultiProtocolCapability

func NewNextHopAttributeFromNative

func NewNextHopAttributeFromNative(a *bgp.PathAttributeNextHop) *api.NextHopAttribute

func NewOriginAttributeFromNative

func NewOriginAttributeFromNative(a *bgp.PathAttributeOrigin) *api.OriginAttribute

func NewPath

func NewPath(nlri bgp.AddrPrefixInterface, isWithdraw bool, attrs []bgp.PathAttributeInterface, age time.Time) *api.Path

func NewPmsiTunnelAttributeFromNative

func NewPmsiTunnelAttributeFromNative(a *bgp.PathAttributePmsiTunnel) *api.PmsiTunnelAttribute

func NewRouteRefreshCapability

func NewRouteRefreshCapability(a *bgp.CapRouteRefresh) *api.RouteRefreshCapability

func NewUnknownAttributeFromNative

func NewUnknownAttributeFromNative(a *bgp.PathAttributeUnknown) *api.UnknownAttribute

func NewUnknownCapability

func NewUnknownCapability(a *bgp.CapUnknown) *api.UnknownCapability

func ToApiFamily

func ToApiFamily(afi uint16, safi uint8) *api.Family

func ToRouteFamily

func ToRouteFamily(f *api.Family) bgp.RouteFamily

func UnmarshalAttribute

func UnmarshalAttribute(an *any.Any) (bgp.PathAttributeInterface, error)

func UnmarshalCapabilities

func UnmarshalCapabilities(values []*any.Any) ([]bgp.ParameterCapabilityInterface, error)

func UnmarshalFlowSpecRules

func UnmarshalFlowSpecRules(values []*any.Any) ([]bgp.FlowSpecComponentInterface, error)

func UnmarshalNLRI

func UnmarshalNLRI(rf bgp.RouteFamily, an *any.Any) (bgp.AddrPrefixInterface, error)

func UnmarshalNLRIs

func UnmarshalNLRIs(rf bgp.RouteFamily, values []*any.Any) ([]bgp.AddrPrefixInterface, error)

func UnmarshalPathAttributes

func UnmarshalPathAttributes(values []*any.Any) ([]bgp.PathAttributeInterface, error)

func UnmarshalRD

func UnmarshalRD(a *any.Any) (bgp.RouteDistinguisherInterface, error)

func UnmarshalRT

func UnmarshalRT(a *any.Any) (bgp.ExtendedCommunityInterface, error)

func UnmarshalRTs

func UnmarshalRTs(values []*any.Any) ([]bgp.ExtendedCommunityInterface, error)

Types

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 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"`
}

workaround. This for the json format compatibility. Once we update senario tests, we can remove this.

Jump to

Keyboard shortcuts

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