Documentation ¶
Overview ¶
Package l3plugin implements the L3 plugin that handles L3 FIBs.
Index ¶
- func TransformArp(arpInput *l3.ArpTable_ArpTableEntry, index ifaceidx.SwIfIndex, ...) (*vppcalls.ArpEntry, error)
- func TransformRoute(routeInput *l3.StaticRoutes_Route, index ifaceidx.SwIfIndex, ...) (*vppcalls.Route, error)
- type ArpConfigurator
- func (plugin *ArpConfigurator) AddArp(entry *l3.ArpTable_ArpTableEntry) error
- func (plugin *ArpConfigurator) ChangeArp(entry *l3.ArpTable_ArpTableEntry, prevEntry *l3.ArpTable_ArpTableEntry) error
- func (plugin *ArpConfigurator) Close() error
- func (plugin *ArpConfigurator) DeleteArp(entry *l3.ArpTable_ArpTableEntry) error
- func (plugin *ArpConfigurator) Init() (err error)
- func (plugin *ArpConfigurator) Resync(arpEntries []*l3.ArpTable_ArpTableEntry) error
- type RouteConfigurator
- func (plugin *RouteConfigurator) Close() error
- func (plugin *RouteConfigurator) ConfigureRoute(config *l3.StaticRoutes_Route, vrfFromKey string) error
- func (plugin *RouteConfigurator) DeleteRoute(config *l3.StaticRoutes_Route, vrfFromKey string) (wasError error)
- func (plugin *RouteConfigurator) Init() (err error)
- func (plugin *RouteConfigurator) ModifyRoute(newConfig *l3.StaticRoutes_Route, oldConfig *l3.StaticRoutes_Route, ...) error
- func (plugin *RouteConfigurator) Resync(staticRoutes []*l3.StaticRoutes_Route) error
- type SortedRoutes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArpConfigurator ¶ added in v1.0.8
type ArpConfigurator struct { Log logging.Logger GoVppmux govppmux.API ArpIndexes idxvpp.NameToIdxRW ArpIndexSeq uint32 SwIfIndexes ifaceidx.SwIfIndex Stopwatch *measure.Stopwatch // contains filtered or unexported fields }
ArpConfigurator runs in the background in its own goroutine where it watches for any changes in the configuration of L3 arp entries as modelled by the proto file "../model/l3/l3.proto" and stored in ETCD under the key "/vnf-agent/{vnf-agent}/vpp/config/v1/arp". Updates received from the northbound API are compared with the VPP run-time configuration and differences are applied through the VPP binary API.
func (*ArpConfigurator) AddArp ¶ added in v1.0.8
func (plugin *ArpConfigurator) AddArp(entry *l3.ArpTable_ArpTableEntry) error
AddArp processes the NB config and propagates it to bin api call
func (*ArpConfigurator) ChangeArp ¶ added in v1.0.8
func (plugin *ArpConfigurator) ChangeArp(entry *l3.ArpTable_ArpTableEntry, prevEntry *l3.ArpTable_ArpTableEntry) error
ChangeArp processes the NB config and propagates it to bin api call
func (*ArpConfigurator) Close ¶ added in v1.0.8
func (plugin *ArpConfigurator) Close() error
Close GOVPP channel
func (*ArpConfigurator) DeleteArp ¶ added in v1.0.8
func (plugin *ArpConfigurator) DeleteArp(entry *l3.ArpTable_ArpTableEntry) error
DeleteArp processes the NB config and propagates it to bin api call
func (*ArpConfigurator) Init ¶ added in v1.0.8
func (plugin *ArpConfigurator) Init() (err error)
Init initializes ARP configurator
func (*ArpConfigurator) Resync ¶ added in v1.0.8
func (plugin *ArpConfigurator) Resync(arpEntries []*l3.ArpTable_ArpTableEntry) error
Resync confgures the empty VPP (overwrites the arp entries)
type RouteConfigurator ¶
type RouteConfigurator struct { Log logging.Logger GoVppmux govppmux.API RouteIndexes idxvpp.NameToIdxRW RouteIndexSeq uint32 SwIfIndexes ifaceidx.SwIfIndex Stopwatch *measure.Stopwatch // timer used to measure and store time // contains filtered or unexported fields }
RouteConfigurator runs in the background in its own goroutine where it watches for any changes in the configuration of L3 routes as modelled by the proto file "../model/l3/l3.proto" and stored in ETCD under the key "/vnf-agent/{vnf-agent}/vpp/config/v1routes". Updates received from the northbound API are compared with the VPP run-time configuration and differences are applied through the VPP binary API.
func (*RouteConfigurator) Close ¶
func (plugin *RouteConfigurator) Close() error
Close GOVPP channel.
func (*RouteConfigurator) ConfigureRoute ¶
func (plugin *RouteConfigurator) ConfigureRoute(config *l3.StaticRoutes_Route, vrfFromKey string) error
ConfigureRoute processes the NB config and propagates it to bin api calls.
func (*RouteConfigurator) DeleteRoute ¶
func (plugin *RouteConfigurator) DeleteRoute(config *l3.StaticRoutes_Route, vrfFromKey string) (wasError error)
DeleteRoute processes the NB config and propagates it to bin api calls.
func (*RouteConfigurator) Init ¶
func (plugin *RouteConfigurator) Init() (err error)
Init members (channels...) and start go routines.
func (*RouteConfigurator) ModifyRoute ¶
func (plugin *RouteConfigurator) ModifyRoute(newConfig *l3.StaticRoutes_Route, oldConfig *l3.StaticRoutes_Route, vrfFromKey string) error
ModifyRoute processes the NB config and propagates it to bin api calls.
func (*RouteConfigurator) Resync ¶
func (plugin *RouteConfigurator) Resync(staticRoutes []*l3.StaticRoutes_Route) error
Resync configures the empty VPP (overwrites the static route).
type SortedRoutes ¶
SortedRoutes type is used to implement sort interface for slice of Route.
func (SortedRoutes) Len ¶
func (arr SortedRoutes) Len() int
Return length of slice. Implements sort.Interface
func (SortedRoutes) Less ¶
func (arr SortedRoutes) Less(i, j int) bool
Less returns true if the item at index i in slice should be sorted before the element with index j. Implements sort.Interface
func (SortedRoutes) Swap ¶
func (arr SortedRoutes) Swap(i, j int)
Swap swaps two items in slice identified by indices. Implements sort.Interface
Directories ¶
Path | Synopsis |
---|---|
Package binapi defines the l3plugin's southbound API.
|
Package binapi defines the l3plugin's southbound API. |
ip
Code generated by govpp binapi-generator DO NOT EDIT.
|
Code generated by govpp binapi-generator DO NOT EDIT. |
Package model defines the l3plugin's northbound API.
|
Package model defines the l3plugin's northbound API. |
l3
Package l3 is a generated protocol buffer package.
|
Package l3 is a generated protocol buffer package. |
Package vppcalls contains wrappers over VPP binary APIs for L3 FIBs.
|
Package vppcalls contains wrappers over VPP binary APIs for L3 FIBs. |
Package vppdump provides helpers for dumping all L3 FIBs configured in VPP.
|
Package vppdump provides helpers for dumping all L3 FIBs configured in VPP. |