Versions in this module Expand all Collapse all v3 v3.2.4 Jan 10, 2024 Changes in this version + const ADD + const ASPATH_REGEXP_MAGIC + const DEFAULT_LOCAL_PREF + const GLOBAL_RIB_NAME + const INCLUDE + const LEFT_MOST + const ONLY + const ORIGIN + const REMOVE + const REPLACE + var BestPathReasonStringMap = map[BestPathReason]string + var CommunityOptionNameMap = map[oc.BgpSetCommunityOptionType]string + var CommunityOptionValueMap = map[string]oc.BgpSetCommunityOptionType + var IntToRpkiValidationReasonTypeMap = map[int]RpkiValidationReasonType + var RpkiValidationReasonTypeToIntMap = map[RpkiValidationReasonType]int + var SelectionOptions oc.RouteSelectionOptionsConfig + var UseMultiplePaths oc.UseMultiplePathsConfig + func CanImportToVrf(v *Vrf, path *Path) bool + func CreateUpdateMsgFromPaths(pathList []*Path, options ...*bgp.MarshallingOption) []*bgp.BGPMessage + func NewAPIPolicyAssignmentFromTableStruct(t *PolicyAssignment) *api.PolicyAssignment + func NewAPIPolicyFromTableStruct(p *Policy) *api.Policy + func NewAPIRoutingPolicyFromConfigStruct(c *oc.RoutingPolicy) (*api.RoutingPolicy, error) + func NewSingleAsPathMatch(arg string) *singleAsPathMatch + func ParseCommunity(arg string) (uint32, error) + func ParseCommunityRegexp(arg string) (*regexp.Regexp, error) + func ParseExtCommunity(arg string) (bgp.ExtendedCommunityInterface, error) + func ParseExtCommunityRegexp(arg string) (bgp.ExtendedCommunityAttrSubType, *regexp.Regexp, error) + func ParseLargeCommunityRegexp(arg string) (*regexp.Regexp, error) + func RegexpRemoveCommunities(path *Path, exps []*regexp.Regexp) + func RegexpRemoveExtCommunities(path *Path, exps []*regexp.Regexp, subtypes []bgp.ExtendedCommunityAttrSubType) + func RegexpRemoveLargeCommunities(path *Path, exps []*regexp.Regexp) + func ToPolicyApi(p *oc.PolicyDefinition) *api.Policy + func UpdatePathAggregator2ByteAs(msg *bgp.BGPUpdate) + func UpdatePathAggregator4ByteAs(msg *bgp.BGPUpdate) error + func UpdatePathAttrs2ByteAs(msg *bgp.BGPUpdate) error + func UpdatePathAttrs4ByteAs(logger log.Logger, msg *bgp.BGPUpdate) error + type Action interface + Apply func(*Path, *PolicyOptions) (*Path, error) + String func() string + Type func() ActionType + type ActionType int + const ACTION_AS_PATH_PREPEND + const ACTION_COMMUNITY + const ACTION_EXT_COMMUNITY + const ACTION_LARGE_COMMUNITY + const ACTION_LOCAL_PREF + const ACTION_MED + const ACTION_NEXTHOP + const ACTION_ROUTING + type AdjRib struct + func NewAdjRib(logger log.Logger, rfList []bgp.RouteFamily) *AdjRib + func (adj *AdjRib) Accepted(rfList []bgp.RouteFamily) int + func (adj *AdjRib) Count(rfList []bgp.RouteFamily) int + func (adj *AdjRib) Drop(rfList []bgp.RouteFamily) []*Path + func (adj *AdjRib) DropStale(rfList []bgp.RouteFamily) []*Path + func (adj *AdjRib) MarkLLGRStaleOrDrop(rfList []bgp.RouteFamily) []*Path + func (adj *AdjRib) PathList(rfList []bgp.RouteFamily, accepted bool) []*Path + func (adj *AdjRib) Select(family bgp.RouteFamily, accepted bool, option ...TableSelectOption) (*Table, error) + func (adj *AdjRib) StaleAll(rfList []bgp.RouteFamily) []*Path + func (adj *AdjRib) TableInfo(family bgp.RouteFamily) (*TableInfo, error) + func (adj *AdjRib) Update(pathList []*Path) + func (adj *AdjRib) UpdateAdjRibOut(pathList []*Path) + type AfiSafiInCondition struct + func NewAfiSafiInCondition(afiSafInConfig []oc.AfiSafiType) (*AfiSafiInCondition, error) + func (c *AfiSafiInCondition) Evaluate(path *Path, _ *PolicyOptions) bool + func (c *AfiSafiInCondition) Name() string + func (c *AfiSafiInCondition) Set() DefinedSet + func (c *AfiSafiInCondition) String() string + func (c *AfiSafiInCondition) Type() ConditionType + type AsPathCondition struct + func NewAsPathCondition(c oc.MatchAsPathSet) (*AsPathCondition, error) + func (c *AsPathCondition) Evaluate(path *Path, _ *PolicyOptions) bool + func (c *AsPathCondition) Name() string + func (c *AsPathCondition) Option() MatchOption + func (c *AsPathCondition) Set() DefinedSet + func (c *AsPathCondition) Type() ConditionType + type AsPathLengthCondition struct + func NewAsPathLengthCondition(c oc.AsPathLength) (*AsPathLengthCondition, error) + func (c *AsPathLengthCondition) Evaluate(path *Path, _ *PolicyOptions) bool + func (c *AsPathLengthCondition) Name() string + func (c *AsPathLengthCondition) Set() DefinedSet + func (c *AsPathLengthCondition) String() string + func (c *AsPathLengthCondition) Type() ConditionType + type AsPathPrependAction struct + func NewAsPathPrependAction(action oc.SetAsPathPrepend) (*AsPathPrependAction, error) + func (a *AsPathPrependAction) Apply(path *Path, option *PolicyOptions) (*Path, error) + func (a *AsPathPrependAction) MarshalJSON() ([]byte, error) + func (a *AsPathPrependAction) String() string + func (a *AsPathPrependAction) ToConfig() *oc.SetAsPathPrepend + func (a *AsPathPrependAction) Type() ActionType + type AsPathSet struct + func NewAsPathSet(c oc.AsPathSet) (*AsPathSet, error) + func (lhs *AsPathSet) Append(arg DefinedSet) error + func (lhs *AsPathSet) Remove(arg DefinedSet) error + func (lhs *AsPathSet) Replace(arg DefinedSet) error + func (s *AsPathSet) List() []string + func (s *AsPathSet) MarshalJSON() ([]byte, error) + func (s *AsPathSet) Name() string + func (s *AsPathSet) String() string + func (s *AsPathSet) ToConfig() *oc.AsPathSet + func (s *AsPathSet) Type() DefinedType + type Assignment struct + type AttributeComparison int + const ATTRIBUTE_EQ + const ATTRIBUTE_GE + const ATTRIBUTE_LE + func (c AttributeComparison) String() string + type BestPathReason uint8 + const BPR_ASN + const BPR_ASPATH + const BPR_DISABLED + const BPR_HIGHEST_WEIGHT + const BPR_IGP_COST + const BPR_LOCAL_ORIGIN + const BPR_LOCAL_PREF + const BPR_MED + const BPR_NEIGH_ADDR + const BPR_NON_LLGR_STALE + const BPR_OLDER + const BPR_ONLY_PATH + const BPR_ORIGIN + const BPR_REACHABLE_NEXT_HOP + const BPR_ROUTER_ID + const BPR_UNKNOWN + func (r *BestPathReason) String() string + type Bitmap struct + func NewBitmap(size int) *Bitmap + func (b *Bitmap) Expand() + func (b *Bitmap) FindandSetZeroBit() (uint, error) + func (b *Bitmap) Flag(i uint) + func (b *Bitmap) GetFlag(i uint) bool + func (b *Bitmap) Unflag(i uint) + type CommunityAction struct + func NewCommunityAction(c oc.SetCommunity) (*CommunityAction, error) + func (a *CommunityAction) Apply(path *Path, _ *PolicyOptions) (*Path, error) + func (a *CommunityAction) MarshalJSON() ([]byte, error) + func (a *CommunityAction) String() string + func (a *CommunityAction) ToConfig() *oc.SetCommunity + func (a *CommunityAction) Type() ActionType + type CommunityCondition struct + func NewCommunityCondition(c oc.MatchCommunitySet) (*CommunityCondition, error) + func (c *CommunityCondition) Evaluate(path *Path, _ *PolicyOptions) bool + func (c *CommunityCondition) Name() string + func (c *CommunityCondition) Option() MatchOption + func (c *CommunityCondition) Set() DefinedSet + func (c *CommunityCondition) Type() ConditionType + type CommunitySet struct + func NewCommunitySet(c oc.CommunitySet) (*CommunitySet, error) + func (lhs *CommunitySet) Append(arg DefinedSet) error + func (lhs *CommunitySet) Remove(arg DefinedSet) error + func (lhs *CommunitySet) Replace(arg DefinedSet) error + func (s *CommunitySet) List() []string + func (s *CommunitySet) MarshalJSON() ([]byte, error) + func (s *CommunitySet) Name() string + func (s *CommunitySet) String() string + func (s *CommunitySet) ToConfig() *oc.CommunitySet + func (s *CommunitySet) Type() DefinedType + type Condition interface + Evaluate func(*Path, *PolicyOptions) bool + Name func() string + Set func() DefinedSet + Type func() ConditionType + type ConditionType int + const CONDITION_AFI_SAFI_IN + const CONDITION_AS_PATH + const CONDITION_AS_PATH_LENGTH + const CONDITION_COMMUNITY + const CONDITION_EXT_COMMUNITY + const CONDITION_LARGE_COMMUNITY + const CONDITION_NEIGHBOR + const CONDITION_NEXT_HOP + const CONDITION_PREFIX + const CONDITION_ROUTE_TYPE + const CONDITION_RPKI + type DefinedSet interface + Append func(DefinedSet) error + List func() []string + Name func() string + Remove func(DefinedSet) error + Replace func(DefinedSet) error + String func() string + Type func() DefinedType + type DefinedSetList []DefinedSet + func (l DefinedSetList) Len() int + func (l DefinedSetList) Less(i, j int) bool + func (l DefinedSetList) Swap(i, j int) + type DefinedSetMap map[DefinedType]map[string]DefinedSet + type DefinedType int + const DEFINED_TYPE_AS_PATH + const DEFINED_TYPE_COMMUNITY + const DEFINED_TYPE_EXT_COMMUNITY + const DEFINED_TYPE_LARGE_COMMUNITY + const DEFINED_TYPE_NEIGHBOR + const DEFINED_TYPE_NEXT_HOP + const DEFINED_TYPE_PREFIX + const DEFINED_TYPE_TAG + type Destination struct + func NewDestination(nlri bgp.AddrPrefixInterface, mapSize int, known ...*Path) *Destination + func (d *Destination) MarshalJSON() ([]byte, error) + func (d *Destination) Select(option ...DestinationSelectOption) *Destination + func (dd *Destination) Family() bgp.RouteFamily + func (dd *Destination) GetAllKnownPathList() []*Path + func (dd *Destination) GetBestPath(id string, as uint32) *Path + func (dd *Destination) GetKnownPathList(id string, as uint32) []*Path + func (dd *Destination) GetMultiBestPath(id string) []*Path + func (dd *Destination) GetNlri() bgp.AddrPrefixInterface + func (dest *Destination) Calculate(logger log.Logger, newPath *Path) *Update + func (dest *Destination) String() string + type DestinationSelectOption struct + AS uint32 + Best bool + ID string + MultiPath bool + VRF *Vrf + type ExtCommunityAction struct + func NewExtCommunityAction(c oc.SetExtCommunity) (*ExtCommunityAction, error) + func (a *ExtCommunityAction) Apply(path *Path, _ *PolicyOptions) (*Path, error) + func (a *ExtCommunityAction) MarshalJSON() ([]byte, error) + func (a *ExtCommunityAction) String() string + func (a *ExtCommunityAction) ToConfig() *oc.SetExtCommunity + func (a *ExtCommunityAction) Type() ActionType + type ExtCommunityCondition struct + func NewExtCommunityCondition(c oc.MatchExtCommunitySet) (*ExtCommunityCondition, error) + func (c *ExtCommunityCondition) Evaluate(path *Path, _ *PolicyOptions) bool + func (c *ExtCommunityCondition) Name() string + func (c *ExtCommunityCondition) Option() MatchOption + func (c *ExtCommunityCondition) Set() DefinedSet + func (c *ExtCommunityCondition) Type() ConditionType + type ExtCommunitySet struct + func NewExtCommunitySet(c oc.ExtCommunitySet) (*ExtCommunitySet, error) + func (lhs *ExtCommunitySet) Remove(arg DefinedSet) error + func (lhs *ExtCommunitySet) Replace(arg DefinedSet) error + func (s *ExtCommunitySet) Append(arg DefinedSet) error + func (s *ExtCommunitySet) List() []string + func (s *ExtCommunitySet) MarshalJSON() ([]byte, error) + func (s *ExtCommunitySet) Name() string + func (s *ExtCommunitySet) String() string + func (s *ExtCommunitySet) ToConfig() *oc.ExtCommunitySet + func (s *ExtCommunitySet) Type() DefinedType + type LargeCommunityAction struct + func NewLargeCommunityAction(c oc.SetLargeCommunity) (*LargeCommunityAction, error) + func (a *LargeCommunityAction) Apply(path *Path, _ *PolicyOptions) (*Path, error) + func (a *LargeCommunityAction) MarshalJSON() ([]byte, error) + func (a *LargeCommunityAction) String() string + func (a *LargeCommunityAction) ToConfig() *oc.SetLargeCommunity + func (a *LargeCommunityAction) Type() ActionType + type LargeCommunityCondition struct + func NewLargeCommunityCondition(c oc.MatchLargeCommunitySet) (*LargeCommunityCondition, error) + func (c *LargeCommunityCondition) Evaluate(path *Path, _ *PolicyOptions) bool + func (c *LargeCommunityCondition) Name() string + func (c *LargeCommunityCondition) Option() MatchOption + func (c *LargeCommunityCondition) Set() DefinedSet + func (c *LargeCommunityCondition) Type() ConditionType + type LargeCommunitySet struct + func NewLargeCommunitySet(c oc.LargeCommunitySet) (*LargeCommunitySet, error) + func (lhs *LargeCommunitySet) Append(arg DefinedSet) error + func (lhs *LargeCommunitySet) Remove(arg DefinedSet) error + func (lhs *LargeCommunitySet) Replace(arg DefinedSet) error + func (s *LargeCommunitySet) List() []string + func (s *LargeCommunitySet) MarshalJSON() ([]byte, error) + func (s *LargeCommunitySet) Name() string + func (s *LargeCommunitySet) String() string + func (s *LargeCommunitySet) ToConfig() *oc.LargeCommunitySet + func (s *LargeCommunitySet) Type() DefinedType + type LocalPrefAction struct + func NewLocalPrefAction(value uint32) (*LocalPrefAction, error) + func (a *LocalPrefAction) Apply(path *Path, _ *PolicyOptions) (*Path, error) + func (a *LocalPrefAction) MarshalJSON() ([]byte, error) + func (a *LocalPrefAction) String() string + func (a *LocalPrefAction) ToConfig() uint32 + func (a *LocalPrefAction) Type() ActionType + type LookupOption uint8 + const LOOKUP_EXACT + const LOOKUP_LONGER + const LOOKUP_SHORTER + type LookupPrefix struct + Prefix string + RD string + type MatchOption int + const MATCH_OPTION_ALL + const MATCH_OPTION_ANY + const MATCH_OPTION_INVERT + func NewMatchOption(c interface{}) (MatchOption, error) + func (o MatchOption) ConvertToMatchSetOptionsRestrictedType() oc.MatchSetOptionsRestrictedType + func (o MatchOption) String() string + type MedAction struct + func NewMedAction(c oc.BgpSetMedType) (*MedAction, error) + func NewMedActionFromApiStruct(action MedActionType, value int64) *MedAction + func (a *MedAction) Apply(path *Path, _ *PolicyOptions) (*Path, error) + func (a *MedAction) MarshalJSON() ([]byte, error) + func (a *MedAction) String() string + func (a *MedAction) ToConfig() oc.BgpSetMedType + func (a *MedAction) Type() ActionType + type MedActionType int + const MED_ACTION_MOD + const MED_ACTION_REPLACE + type NeighborCondition struct + func NewNeighborCondition(c oc.MatchNeighborSet) (*NeighborCondition, error) + func (c *NeighborCondition) Evaluate(path *Path, options *PolicyOptions) bool + func (c *NeighborCondition) Name() string + func (c *NeighborCondition) Option() MatchOption + func (c *NeighborCondition) Set() DefinedSet + func (c *NeighborCondition) Type() ConditionType + type NeighborSet struct + func NewNeighborSet(c oc.NeighborSet) (*NeighborSet, error) + func NewNeighborSetFromApiStruct(name string, list []net.IPNet) (*NeighborSet, error) + func (lhs *NeighborSet) Append(arg DefinedSet) error + func (lhs *NeighborSet) Remove(arg DefinedSet) error + func (lhs *NeighborSet) Replace(arg DefinedSet) error + func (s *NeighborSet) List() []string + func (s *NeighborSet) MarshalJSON() ([]byte, error) + func (s *NeighborSet) Name() string + func (s *NeighborSet) String() string + func (s *NeighborSet) ToConfig() *oc.NeighborSet + func (s *NeighborSet) Type() DefinedType + type NextHopCondition struct + func NewNextHopCondition(c []string) (*NextHopCondition, error) + func (c *NextHopCondition) Evaluate(path *Path, options *PolicyOptions) bool + func (c *NextHopCondition) Name() string + func (c *NextHopCondition) Set() DefinedSet + func (c *NextHopCondition) String() string + func (c *NextHopCondition) Type() ConditionType + type NextHopSet struct + func NewNextHopSet(c []string) (*NextHopSet, error) + func NewNextHopSetFromApiStruct(name string, list []net.IPNet) (*NextHopSet, error) + func (lhs *NextHopSet) Append(arg DefinedSet) error + func (lhs *NextHopSet) Remove(arg DefinedSet) error + func (lhs *NextHopSet) Replace(arg DefinedSet) error + func (s *NextHopSet) List() []string + func (s *NextHopSet) MarshalJSON() ([]byte, error) + func (s *NextHopSet) Name() string + func (s *NextHopSet) String() string + func (s *NextHopSet) ToConfig() []string + func (s *NextHopSet) Type() DefinedType + type NexthopAction struct + func NewNexthopAction(c oc.BgpNextHopType) (*NexthopAction, error) + func (a *NexthopAction) Apply(path *Path, options *PolicyOptions) (*Path, error) + func (a *NexthopAction) MarshalJSON() ([]byte, error) + func (a *NexthopAction) String() string + func (a *NexthopAction) ToConfig() oc.BgpNextHopType + func (a *NexthopAction) Type() ActionType + type Path struct + IsNexthopInvalid bool + IsWithdraw bool + func NewEOR(family bgp.RouteFamily) *Path + func NewPath(source *PeerInfo, nlri bgp.AddrPrefixInterface, isWithdraw bool, ...) *Path + func ProcessMessage(m *bgp.BGPMessage, peerInfo *PeerInfo, timestamp time.Time) []*Path + func UpdatePathAttrs(logger log.Logger, global *oc.Global, peer *oc.Neighbor, info *PeerInfo, ...) *Path + func (lhs *Path) Compare(rhs *Path) int + func (lhs *Path) Equal(rhs *Path) bool + func (p *Path) GetHash() uint32 + func (p *Path) SetHash(v uint32) + func (p *Path) ToGlobal(vrf *Vrf) *Path + func (p *Path) ToLocal() *Path + func (path *Path) Clone(isWithdraw bool) *Path + func (path *Path) GetAsList() []uint32 + func (path *Path) GetAsPath() *bgp.PathAttributeAsPath + func (path *Path) GetAsPathLen() int + func (path *Path) GetAsSeqList() []uint32 + func (path *Path) GetAsString() string + func (path *Path) GetClusterList() []net.IP + func (path *Path) GetCommunities() []uint32 + func (path *Path) GetExtCommunities() []bgp.ExtendedCommunityInterface + func (path *Path) GetLabelString() string + func (path *Path) GetLargeCommunities() []*bgp.LargeCommunity + func (path *Path) GetLocalPref() (uint32, error) + func (path *Path) GetMed() (uint32, error) + func (path *Path) GetNexthop() net.IP + func (path *Path) GetNlri() bgp.AddrPrefixInterface + func (path *Path) GetOrigin() (uint8, error) + func (path *Path) GetOriginatorID() net.IP + func (path *Path) GetPathAttrs() []bgp.PathAttributeInterface + func (path *Path) GetRouteFamily() bgp.RouteFamily + func (path *Path) GetSource() *PeerInfo + func (path *Path) GetSourceAs() uint32 + func (path *Path) GetTimestamp() time.Time + func (path *Path) HasNoLLGR() bool + func (path *Path) IsDropped() bool + func (path *Path) IsEOR() bool + func (path *Path) IsFromExternal() bool + func (path *Path) IsIBGP() bool + func (path *Path) IsLLGRStale() bool + func (path *Path) IsLocal() bool + func (path *Path) IsRejected() bool + func (path *Path) IsStale() bool + func (path *Path) MarkStale(s bool) + func (path *Path) MarshalJSON() ([]byte, error) + func (path *Path) NoImplicitWithdraw() bool + func (path *Path) OriginInfo() *originInfo + func (path *Path) PrependAsn(asn uint32, repeat uint8, confed bool) + func (path *Path) RemoveCommunities(communities []uint32) int + func (path *Path) RemoveLocalPref() + func (path *Path) RemovePrivateAS(localAS uint32, option oc.RemovePrivateAsOption) + func (path *Path) ReplaceAS(localAS, peerAS uint32) *Path + func (path *Path) SetCommunities(communities []uint32, doReplace bool) + func (path *Path) SetDropped(y bool) + func (path *Path) SetExtCommunities(exts []bgp.ExtendedCommunityInterface, doReplace bool) + func (path *Path) SetIsFromExternal(y bool) + func (path *Path) SetLargeCommunities(cs []*bgp.LargeCommunity, doReplace bool) + func (path *Path) SetMed(med int64, doReplace bool) error + func (path *Path) SetNexthop(nexthop net.IP) + func (path *Path) SetRejected(y bool) + func (path *Path) String() string + type PathAttrs []bgp.PathAttributeInterface + func (a PathAttrs) Len() int + func (a PathAttrs) Less(i, j int) bool + func (a PathAttrs) Swap(i, j int) + type PeerInfo struct + AS uint32 + Address net.IP + Confederation bool + ID net.IP + LocalAS uint32 + LocalAddress net.IP + LocalID net.IP + MultihopTtl uint8 + RouteReflectorClient bool + RouteReflectorClusterID net.IP + func NewPeerInfo(g *oc.Global, p *oc.Neighbor) *PeerInfo + func (i *PeerInfo) String() string + func (lhs *PeerInfo) Equal(rhs *PeerInfo) bool + type Policies []*Policy + func (p Policies) Len() int + func (p Policies) Less(i, j int) bool + func (p Policies) Swap(i, j int) + type Policy struct + Name string + Statements []*Statement + func NewPolicy(c oc.PolicyDefinition) (*Policy, error) + func (lhs *Policy) Add(rhs *Policy) error + func (lhs *Policy) Remove(rhs *Policy) error + func (lhs *Policy) Replace(rhs *Policy) error + func (p *Policy) Apply(logger log.Logger, path *Path, options *PolicyOptions) (RouteType, *Path) + func (p *Policy) FillUp(m map[string]*Statement) error + func (p *Policy) MarshalJSON() ([]byte, error) + func (p *Policy) ToConfig() *oc.PolicyDefinition + type PolicyAssignment struct + Default RouteType + Name string + Policies []*Policy + Type PolicyDirection + type PolicyDirection int + const POLICY_DIRECTION_EXPORT + const POLICY_DIRECTION_IMPORT + const POLICY_DIRECTION_NONE + func (d PolicyDirection) String() string + type PolicyOptions struct + Info *PeerInfo + OldNextHop net.IP + Validate func(*Path) *Validation + type Prefix struct + AddressFamily bgp.RouteFamily + MasklengthRangeMax uint8 + MasklengthRangeMin uint8 + Prefix *net.IPNet + func NewPrefix(c oc.Prefix) (*Prefix, error) + func (lhs *Prefix) Equal(rhs *Prefix) bool + func (p *Prefix) Match(path *Path) bool + func (p *Prefix) PrefixString() string + type PrefixCondition struct + func NewPrefixCondition(c oc.MatchPrefixSet) (*PrefixCondition, error) + func (c *PrefixCondition) Evaluate(path *Path, _ *PolicyOptions) bool + func (c *PrefixCondition) Name() string + func (c *PrefixCondition) Option() MatchOption + func (c *PrefixCondition) Set() DefinedSet + func (c *PrefixCondition) Type() ConditionType + type PrefixSet struct + func NewPrefixSet(c oc.PrefixSet) (*PrefixSet, error) + func NewPrefixSetFromApiStruct(name string, prefixes []*Prefix) (*PrefixSet, error) + func (lhs *PrefixSet) Append(arg DefinedSet) error + func (lhs *PrefixSet) Remove(arg DefinedSet) error + func (lhs *PrefixSet) Replace(arg DefinedSet) error + func (s *PrefixSet) List() []string + func (s *PrefixSet) MarshalJSON() ([]byte, error) + func (s *PrefixSet) Name() string + func (s *PrefixSet) String() string + func (s *PrefixSet) ToConfig() *oc.PrefixSet + func (s *PrefixSet) Type() DefinedType + type ROA struct + AS uint32 + Family int + MaxLen uint8 + Network *net.IPNet + Src string + func NewROA(family int, prefixByte []byte, prefixLen uint8, maxLen uint8, as uint32, ...) *ROA + func (r *ROA) Equal(roa *ROA) bool + type ROATable struct + func NewROATable(logger log.Logger) *ROATable + func (rt *ROATable) Add(roa *ROA) + func (rt *ROATable) Delete(roa *ROA) + func (rt *ROATable) DeleteAll(network string) + func (rt *ROATable) Info(family bgp.RouteFamily) (map[string]uint32, map[string]uint32) + func (rt *ROATable) List(family bgp.RouteFamily) ([]*ROA, error) + func (rt *ROATable) Validate(path *Path) *Validation + type RouteType int + const ROUTE_TYPE_ACCEPT + const ROUTE_TYPE_NONE + const ROUTE_TYPE_REJECT + func (t RouteType) String() string + type RouteTypeCondition struct + func NewRouteTypeCondition(c oc.RouteType) (*RouteTypeCondition, error) + func (c *RouteTypeCondition) Evaluate(path *Path, _ *PolicyOptions) bool + func (c *RouteTypeCondition) Name() string + func (c *RouteTypeCondition) Set() DefinedSet + func (c *RouteTypeCondition) String() string + func (c *RouteTypeCondition) Type() ConditionType + type RoutingAction struct + AcceptRoute bool + func NewRoutingAction(c oc.RouteDisposition) (*RoutingAction, error) + func (a *RoutingAction) Apply(path *Path, _ *PolicyOptions) (*Path, error) + func (a *RoutingAction) String() string + func (a *RoutingAction) Type() ActionType + type RoutingPolicy struct + func NewRoutingPolicy(logger log.Logger) *RoutingPolicy + func (r *RoutingPolicy) AddDefinedSet(s DefinedSet, replace bool) error + func (r *RoutingPolicy) AddPolicy(x *Policy, refer bool) (err error) + func (r *RoutingPolicy) AddPolicyAssignment(id string, dir PolicyDirection, policies []*oc.PolicyDefinition, def RouteType) (err error) + func (r *RoutingPolicy) AddStatement(st *Statement) (err error) + func (r *RoutingPolicy) ApplyPolicy(id string, dir PolicyDirection, before *Path, options *PolicyOptions) *Path + func (r *RoutingPolicy) DeleteDefinedSet(a DefinedSet, all bool) (err error) + func (r *RoutingPolicy) DeletePolicy(x *Policy, all, preserve bool, activeId []string) (err error) + func (r *RoutingPolicy) DeletePolicyAssignment(id string, dir PolicyDirection, policies []*oc.PolicyDefinition, all bool) (err error) + func (r *RoutingPolicy) DeleteStatement(st *Statement, all bool) (err error) + func (r *RoutingPolicy) GetDefinedSet(typ DefinedType, name string) (*oc.DefinedSets, error) + func (r *RoutingPolicy) GetPolicy(name string) []*oc.PolicyDefinition + func (r *RoutingPolicy) GetPolicyAssignment(id string, dir PolicyDirection) (RouteType, []*Policy, error) + func (r *RoutingPolicy) GetStatement(name string) []*oc.Statement + func (r *RoutingPolicy) Initialize() error + func (r *RoutingPolicy) Reset(rp *oc.RoutingPolicy, ap map[string]oc.ApplyPolicy) error + func (r *RoutingPolicy) SetPeerPolicy(peerId string, c oc.ApplyPolicy) error + func (r *RoutingPolicy) SetPolicyAssignment(id string, dir PolicyDirection, policies []*oc.PolicyDefinition, def RouteType) (err error) + type RpkiValidationCondition struct + func NewRpkiValidationCondition(c oc.RpkiValidationResultType) (*RpkiValidationCondition, error) + func (c *RpkiValidationCondition) Evaluate(path *Path, options *PolicyOptions) bool + func (c *RpkiValidationCondition) Name() string + func (c *RpkiValidationCondition) Set() DefinedSet + func (c *RpkiValidationCondition) String() string + func (c *RpkiValidationCondition) Type() ConditionType + type RpkiValidationReasonType string + const RPKI_VALIDATION_REASON_TYPE_AS + const RPKI_VALIDATION_REASON_TYPE_LENGTH + const RPKI_VALIDATION_REASON_TYPE_NONE + func (v RpkiValidationReasonType) ToInt() int + type Statement struct + Conditions []Condition + ModActions []Action + Name string + RouteAction Action + func NewStatement(c oc.Statement) (*Statement, error) + func (lhs *Statement) Add(rhs *Statement) error + func (lhs *Statement) Remove(rhs *Statement) error + func (lhs *Statement) Replace(rhs *Statement) error + func (s *Statement) Apply(logger log.Logger, path *Path, options *PolicyOptions) (RouteType, *Path) + func (s *Statement) Evaluate(p *Path, options *PolicyOptions) bool + func (s *Statement) MarshalJSON() ([]byte, error) + func (s *Statement) ToConfig() *oc.Statement + type Table struct + func NewTable(logger log.Logger, rf bgp.RouteFamily, dsts ...*Destination) *Table + func (t *Table) Bests(id string, as uint32) []*Path + func (t *Table) GetDestination(nlri bgp.AddrPrefixInterface) *Destination + func (t *Table) GetDestinations() map[string]*Destination + func (t *Table) GetEvpnDestinationsWithRouteType(typ string) ([]*Destination, error) + func (t *Table) GetKnownPathList(id string, as uint32) []*Path + func (t *Table) GetKnownPathListWithMac(id string, as uint32, mac net.HardwareAddr) []*Path + func (t *Table) GetLongerPrefixDestinations(key string) ([]*Destination, error) + func (t *Table) GetMUPDestinationsWithRouteType(p string) ([]*Destination, error) + func (t *Table) GetRoutefamily() bgp.RouteFamily + func (t *Table) Info(option ...TableInfoOptions) *TableInfo + func (t *Table) MultiBests(id string) [][]*Path + func (t *Table) Select(option ...TableSelectOption) (*Table, error) + type TableInfo struct + NumAccepted int + NumDestination int + NumPath int + type TableInfoOptions struct + AS uint32 + ID string + VRF *Vrf + type TableManager struct + Tables map[bgp.RouteFamily]*Table + Vrfs map[string]*Vrf + func NewTableManager(logger log.Logger, rfList []bgp.RouteFamily) *TableManager + func (manager *TableManager) AddVrf(name string, id uint32, rd bgp.RouteDistinguisherInterface, ...) ([]*Path, error) + func (manager *TableManager) DeleteVrf(name string) ([]*Path, error) + func (manager *TableManager) GetBestMultiPathList(id string, rfList []bgp.RouteFamily) [][]*Path + func (manager *TableManager) GetBestPathList(id string, as uint32, rfList []bgp.RouteFamily) []*Path + func (manager *TableManager) GetDestination(path *Path) *Destination + func (manager *TableManager) GetPathList(id string, as uint32, rfList []bgp.RouteFamily) []*Path + func (manager *TableManager) GetPathListWithMac(id string, as uint32, rfList []bgp.RouteFamily, mac net.HardwareAddr) []*Path + func (manager *TableManager) GetPathListWithNexthop(id string, rfList []bgp.RouteFamily, nexthop net.IP) []*Path + func (manager *TableManager) GetPathListWithSource(id string, rfList []bgp.RouteFamily, source *PeerInfo) []*Path + func (manager *TableManager) GetRFlist() []bgp.RouteFamily + func (manager *TableManager) Update(newPath *Path) []*Update + type TableSelectOption struct + AS uint32 + Best bool + ID string + LookupPrefixes []*LookupPrefix + MultiPath bool + VRF *Vrf + type Update struct + KnownPathList []*Path + OldKnownPathList []*Path + func (u *Update) GetChanges(id string, as uint32, peerDown bool) (*Path, *Path, []*Path) + func (u *Update) GetWithdrawnPath() []*Path + type Validation struct + Matched []*ROA + Reason RpkiValidationReasonType + Status oc.RpkiValidationResultType + UnmatchedAs []*ROA + UnmatchedLength []*ROA + type Vrf struct + ExportRt []bgp.ExtendedCommunityInterface + Id uint32 + ImportRt []bgp.ExtendedCommunityInterface + MplsLabel uint32 + Name string + Rd bgp.RouteDistinguisherInterface + func (v *Vrf) Clone() *Vrf + func (v *Vrf) ToGlobalPath(path *Path) error