Versions in this module Expand all Collapse all v0 v0.1.1 Sep 9, 2019 v0.1.0 Mar 31, 2019 v0.0.3 Mar 26, 2019 v0.0.2 Mar 25, 2019 v0.0.1 Feb 21, 2019 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[config.BgpSetCommunityOptionType]string + var CommunityOptionValueMap = map[string]config.BgpSetCommunityOptionType + var IntToRpkiValidationReasonTypeMap = map[int]RpkiValidationReasonType + var RpkiValidationReasonTypeToIntMap = map[RpkiValidationReasonType]int + var SelectionOptions config.RouteSelectionOptionsConfig + var UseMultiplePaths config.UseMultiplePathsConfig + func AddrToRadixkey(addr bgp.AddrPrefixInterface) string + func CanImportToVrf(v *Vrf, path *Path) bool + func CidrToRadixkey(cidr string) string + func CreateUpdateMsgFromPaths(pathList []*Path, options ...*bgp.MarshallingOption) []*bgp.BGPMessage + func IpToRadixkey(b []byte, max uint8) string + func NewAPIPolicyAssignmentFromTableStruct(t *PolicyAssignment) *api.PolicyAssignment + func NewAPIPolicyFromTableStruct(p *Policy) *api.Policy + func NewAPIRoutingPolicyFromConfigStruct(c *config.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 *config.PolicyDefinition) *api.Policy + func UpdatePathAggregator2ByteAs(msg *bgp.BGPUpdate) + func UpdatePathAggregator4ByteAs(msg *bgp.BGPUpdate) error + func UpdatePathAttrs2ByteAs(msg *bgp.BGPUpdate) error + func UpdatePathAttrs4ByteAs(msg *bgp.BGPUpdate) error + type Action interface + Apply func(*Path, *PolicyOptions) *Path + 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(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) + func (adj *AdjRib) DropStale(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) + type AfiSafiInCondition struct + func NewAfiSafiInCondition(afiSafInConfig []config.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 config.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 config.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 config.SetAsPathPrepend) (*AsPathPrependAction, error) + func (a *AsPathPrependAction) Apply(path *Path, option *PolicyOptions) *Path + func (a *AsPathPrependAction) MarshalJSON() ([]byte, error) + func (a *AsPathPrependAction) String() string + func (a *AsPathPrependAction) ToConfig() *config.SetAsPathPrepend + func (a *AsPathPrependAction) Type() ActionType + type AsPathSet struct + func NewAsPathSet(c config.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() *config.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_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 config.SetCommunity) (*CommunityAction, error) + func (a *CommunityAction) Apply(path *Path, _ *PolicyOptions) *Path + func (a *CommunityAction) MarshalJSON() ([]byte, error) + func (a *CommunityAction) String() string + func (a *CommunityAction) ToConfig() *config.SetCommunity + func (a *CommunityAction) Type() ActionType + type CommunityCondition struct + func NewCommunityCondition(c config.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 config.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() *config.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(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 config.SetExtCommunity) (*ExtCommunityAction, error) + func (a *ExtCommunityAction) Apply(path *Path, _ *PolicyOptions) *Path + func (a *ExtCommunityAction) MarshalJSON() ([]byte, error) + func (a *ExtCommunityAction) String() string + func (a *ExtCommunityAction) ToConfig() *config.SetExtCommunity + func (a *ExtCommunityAction) Type() ActionType + type ExtCommunityCondition struct + func NewExtCommunityCondition(c config.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 config.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() *config.ExtCommunitySet + func (s *ExtCommunitySet) Type() DefinedType + type IPPrefix struct + Length uint8 + Prefix net.IP + func (p *IPPrefix) String() string + type LargeCommunityAction struct + func NewLargeCommunityAction(c config.SetLargeCommunity) (*LargeCommunityAction, error) + func (a *LargeCommunityAction) Apply(path *Path, _ *PolicyOptions) *Path + func (a *LargeCommunityAction) MarshalJSON() ([]byte, error) + func (a *LargeCommunityAction) String() string + func (a *LargeCommunityAction) ToConfig() *config.SetLargeCommunity + func (a *LargeCommunityAction) Type() ActionType + type LargeCommunityCondition struct + func NewLargeCommunityCondition(c config.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 config.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() *config.LargeCommunitySet + func (s *LargeCommunitySet) Type() DefinedType + type LocalPrefAction struct + func NewLocalPrefAction(value uint32) (*LocalPrefAction, error) + func (a *LocalPrefAction) Apply(path *Path, _ *PolicyOptions) *Path + 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 + 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() config.MatchSetOptionsRestrictedType + func (o MatchOption) String() string + type MedAction struct + func NewMedAction(c config.BgpSetMedType) (*MedAction, error) + func NewMedActionFromApiStruct(action MedActionType, value int64) *MedAction + func (a *MedAction) Apply(path *Path, _ *PolicyOptions) *Path + func (a *MedAction) MarshalJSON() ([]byte, error) + func (a *MedAction) String() string + func (a *MedAction) ToConfig() config.BgpSetMedType + func (a *MedAction) Type() ActionType + type MedActionType int + const MED_ACTION_MOD + const MED_ACTION_REPLACE + type NeighborCondition struct + func NewNeighborCondition(c config.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 config.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() *config.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 config.BgpNextHopType) (*NexthopAction, error) + func (a *NexthopAction) Apply(path *Path, options *PolicyOptions) *Path + func (a *NexthopAction) MarshalJSON() ([]byte, error) + func (a *NexthopAction) String() string + func (a *NexthopAction) ToConfig() config.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(global *config.Global, peer *config.Neighbor, info *PeerInfo, original *Path) *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) IsAsLooped() 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) 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 config.RemovePrivateAsOption) + func (path *Path) ReplaceAS(localAS, peerAS uint32) *Path + func (path *Path) SetAsLooped(y bool) + func (path *Path) SetCommunities(communities []uint32, doReplace 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) SetValidation(v *Validation) + func (path *Path) String() string + func (path *Path) Validation() *Validation + func (path *Path) ValidationStatus() config.RpkiValidationResultType + 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 *config.Global, p *config.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 config.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(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() *config.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 + ValidationResult *Validation + type Prefix struct + AddressFamily bgp.RouteFamily + MasklengthRangeMax uint8 + MasklengthRangeMin uint8 + Prefix *net.IPNet + func NewPrefix(c config.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 config.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 config.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() *config.PrefixSet + func (s *PrefixSet) Type() DefinedType + type ROA struct + AS uint32 + Family int + MaxLen uint8 + Prefix *IPPrefix + Src string + func NewROA(family int, prefixByte []byte, prefixLen uint8, maxLen uint8, as uint32, ...) *ROA + func (r *ROA) Equal(roa *ROA) bool + 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 config.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 config.RouteDisposition) (*RoutingAction, error) + func (a *RoutingAction) Apply(path *Path, _ *PolicyOptions) *Path + func (a *RoutingAction) String() string + func (a *RoutingAction) Type() ActionType + type RoutingPolicy struct + func NewRoutingPolicy() *RoutingPolicy + func (r *RoutingPolicy) AddDefinedSet(s DefinedSet) error + func (r *RoutingPolicy) AddPolicy(x *Policy, refer bool) (err error) + func (r *RoutingPolicy) AddPolicyAssignment(id string, dir PolicyDirection, policies []*config.PolicyDefinition, ...) (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 []*config.PolicyDefinition, all bool) (err error) + func (r *RoutingPolicy) DeleteStatement(st *Statement, all bool) (err error) + func (r *RoutingPolicy) GetDefinedSet(typ DefinedType, name string) (*config.DefinedSets, error) + func (r *RoutingPolicy) GetPolicy(name string) []*config.PolicyDefinition + func (r *RoutingPolicy) GetPolicyAssignment(id string, dir PolicyDirection) (RouteType, []*Policy, error) + func (r *RoutingPolicy) GetStatement(name string) []*config.Statement + func (r *RoutingPolicy) Reset(rp *config.RoutingPolicy, ap map[string]config.ApplyPolicy) error + func (r *RoutingPolicy) SetPolicyAssignment(id string, dir PolicyDirection, policies []*config.PolicyDefinition, ...) (err error) + type RpkiValidationCondition struct + func NewRpkiValidationCondition(c config.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 config.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(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() *config.Statement + type Table struct + func NewTable(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) GetLongerPrefixDestinations(key string) ([]*Destination, error) + func (t *Table) GetRoutefamily() bgp.RouteFamily + func (t *Table) Info(id string, as uint32) *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 TableManager struct + Tables map[bgp.RouteFamily]*Table + Vrfs map[string]*Vrf + func NewTableManager(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) GetPathListByPeer(info *PeerInfo, rf bgp.RouteFamily) []*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) TableInfo(id string, as uint32, family bgp.RouteFamily) (*TableInfo, error) + 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 config.RpkiValidationResultType + UnmatchedAs []*ROA + UnmatchedLength []*ROA + type Vrf struct + ExportRt []bgp.ExtendedCommunityInterface + Id uint32 + ImportRt []bgp.ExtendedCommunityInterface + Name string + Rd bgp.RouteDistinguisherInterface + func (v *Vrf) Clone() *Vrf + func (v *Vrf) ToGlobalPath(path *Path) error