locRIB

package
v0.0.3-pre5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocRIB

type LocRIB struct {
	// contains filtered or unexported fields
}

LocRIB represents a routing information base

func New

func New(name string) *LocRIB

New creates a new routing information base

func (*LocRIB) AddPath

func (a *LocRIB) AddPath(pfx *net.Prefix, p *route.Path) error

AddPath replaces the path for prefix `pfx`. If the prefix doesn't exist it is added.

func (*LocRIB) AddPathInitialDump

func (a *LocRIB) AddPathInitialDump(pfx *net.Prefix, p *route.Path) error

func (*LocRIB) ClientCount

func (a *LocRIB) ClientCount() uint64

ClientCount gets the number of registered clients

func (*LocRIB) ContainsPfxPath

func (a *LocRIB) ContainsPfxPath(pfx *net.Prefix, p *route.Path) bool

ContainsPfxPath returns true if this prefix and path combination is present in this LocRIB.

func (*LocRIB) Count

func (a *LocRIB) Count() uint64

Count routes from the LocRIB

func (*LocRIB) Dump

func (a *LocRIB) Dump() []*route.Route

Dump dumps the RIB

func (*LocRIB) Get

func (a *LocRIB) Get(pfx *net.Prefix) *route.Route

Get gets a route

func (*LocRIB) GetContributingASNs

func (a *LocRIB) GetContributingASNs() *routingtable.ContributingASNs

GetContributingASNs returns a pointer to the list of contributing ASNs

func (*LocRIB) GetLonger

func (a *LocRIB) GetLonger(pfx *net.Prefix) (res []*route.Route)

GetLonger gets all more specifics

func (*LocRIB) LPM

func (a *LocRIB) LPM(pfx *net.Prefix) (res []*route.Route)

LPM performs a longest prefix match on the routing table

func (*LocRIB) Name

func (a *LocRIB) Name() string

Name gets the name of the LocRIB

func (*LocRIB) Print

func (a *LocRIB) Print() string

func (*LocRIB) RefreshClient

func (a *LocRIB) RefreshClient(client routingtable.RouteTableClient)

RefreshClient re-sends all propagated paths to a certain client

func (*LocRIB) RefreshRoute

func (a *LocRIB) RefreshRoute(*net.Prefix, []*route.Path)

RefreshRoute is here to fulfill an interface

func (*LocRIB) Register

func (a *LocRIB) Register(client routingtable.RouteTableClient)

Register registers a client for updates

func (*LocRIB) RegisterWithOptions

func (a *LocRIB) RegisterWithOptions(client routingtable.RouteTableClient, opt routingtable.ClientOptions)

RegisterWithOptions registers a client with options for updates

func (*LocRIB) RemovePath

func (a *LocRIB) RemovePath(pfx *net.Prefix, p *route.Path) bool

RemovePath removes the path for prefix `pfx`

func (*LocRIB) ReplaceFilterChain

func (a *LocRIB) ReplaceFilterChain(filter.Chain)

ReplaceFilterChain is here to fulfill an interface

func (*LocRIB) ReplacePath

func (a *LocRIB) ReplacePath(pfx *net.Prefix, oldPath *route.Path, newPath *route.Path)

func (*LocRIB) RouteCount

func (a *LocRIB) RouteCount() int64

RouteCount returns the number of stored routes

func (*LocRIB) SetCountTarget

func (a *LocRIB) SetCountTarget(count uint64, ch chan struct{})

SetCountTarget sets a target and a channel to send a message to when a certain route count is reached

func (*LocRIB) String

func (a *LocRIB) String() string

func (*LocRIB) Unregister

func (a *LocRIB) Unregister(client routingtable.RouteTableClient)

Unregister unregisters a client

func (*LocRIB) UpdateNewClient

func (a *LocRIB) UpdateNewClient(client routingtable.RouteTableClient) error

UpdateNewClient sends current state to a new client

Jump to

Keyboard shortcuts

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