vpp2210

package
v3.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package vpp2210 contains wrappers over VPP binary APIs for ARPs, proxy ARPs, L3 FIBs and helpers for dumping them.

Index

Constants

View Source
const (
	// NextHopViaLabelUnset constant has to be assigned into the field next hop
	// via label in ip_add_del_route binary message if next hop via label is not defined.
	// Equals to MPLS_LABEL_INVALID defined in VPP
	NextHopViaLabelUnset uint32 = 0xfffff + 1

	// ClassifyTableIndexUnset is a default value for field classify_table_index in ip_add_del_route binary message.
	ClassifyTableIndexUnset = ^uint32(0)

	// NextHopOutgoingIfUnset constant has to be assigned into the field next_hop_outgoing_interface
	// in ip_add_del_route binary message if outgoing interface for next hop is not defined.
	NextHopOutgoingIfUnset = ^uint32(0)
)

Variables

This section is empty.

Functions

Types

type ArpVppHandler

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

ArpVppHandler is accessor for ARP-related vppcalls methods

func NewArpVppHandler

func NewArpVppHandler(callsChan govppapi.Channel, ifIndexes ifaceidx.IfaceMetadataIndex, log logging.Logger) *ArpVppHandler

NewArpVppHandler creates new instance of IPsec vppcalls handler

func (*ArpVppHandler) DumpArpEntries

func (h *ArpVppHandler) DumpArpEntries() ([]*vppcalls.ArpDetails, error)

DumpArpEntries implements arp handler.

func (*ArpVppHandler) VppAddArp

func (h *ArpVppHandler) VppAddArp(entry *l3.ARPEntry) error

VppAddArp implements arp handler.

func (*ArpVppHandler) VppDelArp

func (h *ArpVppHandler) VppDelArp(entry *l3.ARPEntry) error

VppDelArp implements arp handler.

type DHCPProxyHandler

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

DHCPProxyHandler is accessor for DHCP proxy-related vppcalls methods

func NewDHCPProxyHandler

func NewDHCPProxyHandler(callsChan govppapi.Channel, log logging.Logger) *DHCPProxyHandler

NewDHCPProxyHandler creates new instance of vrf-table vppcalls handler

func (*DHCPProxyHandler) CreateDHCPProxy

func (h *DHCPProxyHandler) CreateDHCPProxy(entry *l3.DHCPProxy) error

func (*DHCPProxyHandler) DeleteDHCPProxy

func (h *DHCPProxyHandler) DeleteDHCPProxy(entry *l3.DHCPProxy) error

func (*DHCPProxyHandler) DumpDHCPProxy

func (h *DHCPProxyHandler) DumpDHCPProxy() (entry []*vppcalls.DHCPProxyDetails, err error)

type IPNeighHandler

type IPNeighHandler struct {
	corevppcalls.VppCoreAPI
	// contains filtered or unexported fields
}

IPNeighHandler is accessor for ip-neighbor-related vppcalls methods

func NewIPNeighVppHandler

func NewIPNeighVppHandler(c vpp.Client, callsChan govppapi.Channel, log logging.Logger) *IPNeighHandler

NewIPNeighVppHandler creates new instance of ip neighbor vppcalls handler

func (*IPNeighHandler) DefaultIPScanNeighbor

func (h *IPNeighHandler) DefaultIPScanNeighbor() *l3.IPScanNeighbor

DefaultIPScanNeighbor implements ip neigh handler.

func (*IPNeighHandler) GetIPScanNeighbor

func (h *IPNeighHandler) GetIPScanNeighbor() (*l3.IPScanNeighbor, error)

GetIPScanNeighbor dumps current IP Scan Neighbor configuration.

func (*IPNeighHandler) SetIPScanNeighbor

func (h *IPNeighHandler) SetIPScanNeighbor(data *l3.IPScanNeighbor) (err error)

SetIPScanNeighbor implements ip neigh handler.

type L3XCHandler

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

func NewL3XCHandler

func NewL3XCHandler(c vpp.Client, ifIndexes ifaceidx.IfaceMetadataIndex, log logging.Logger) *L3XCHandler

NewL3XCHandler creates new instance of L3XC vppcalls handler

func (*L3XCHandler) DeleteL3XC

func (h *L3XCHandler) DeleteL3XC(ctx context.Context, index uint32, ipv6 bool) error

func (*L3XCHandler) DumpAllL3XC

func (h *L3XCHandler) DumpAllL3XC(ctx context.Context) ([]vppcalls.L3XC, error)

func (*L3XCHandler) DumpL3XC

func (h *L3XCHandler) DumpL3XC(ctx context.Context, index uint32) ([]vppcalls.L3XC, error)

func (*L3XCHandler) UpdateL3XC

func (h *L3XCHandler) UpdateL3XC(ctx context.Context, xc *vppcalls.L3XC) error

type ProxyArpVppHandler

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

ProxyArpVppHandler is accessor for proxy ARP-related vppcalls methods

func NewProxyArpVppHandler

func NewProxyArpVppHandler(callsChan govppapi.Channel, ifIndexes ifaceidx.IfaceMetadataIndex, log logging.Logger) *ProxyArpVppHandler

NewProxyArpVppHandler creates new instance of proxy ARP vppcalls handler

func (*ProxyArpVppHandler) AddProxyArpRange

func (h *ProxyArpVppHandler) AddProxyArpRange(firstIP, lastIP []byte, vrfID uint32) error

AddProxyArpRange implements proxy arp handler.

func (*ProxyArpVppHandler) DeleteProxyArpRange

func (h *ProxyArpVppHandler) DeleteProxyArpRange(firstIP, lastIP []byte, vrfID uint32) error

DeleteProxyArpRange implements proxy arp handler.

func (*ProxyArpVppHandler) DisableProxyArpInterface

func (h *ProxyArpVppHandler) DisableProxyArpInterface(ifName string) error

DisableProxyArpInterface implements proxy arp handler.

func (*ProxyArpVppHandler) DumpProxyArpInterfaces

func (h *ProxyArpVppHandler) DumpProxyArpInterfaces() (pArpIfs []*vppcalls.ProxyArpInterfaceDetails, err error)

DumpProxyArpInterfaces implements proxy arp handler.

func (*ProxyArpVppHandler) DumpProxyArpRanges

func (h *ProxyArpVppHandler) DumpProxyArpRanges() (pArpRngs []*vppcalls.ProxyArpRangesDetails, err error)

DumpProxyArpRanges implements proxy arp handler.

func (*ProxyArpVppHandler) EnableProxyArpInterface

func (h *ProxyArpVppHandler) EnableProxyArpInterface(ifName string) error

EnableProxyArpInterface implements proxy arp handler.

type RouteHandler

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

RouteHandler is accessor for route-related vppcalls methods

func NewRouteVppHandler

func NewRouteVppHandler(callsChan govppapi.Channel, ifIndexes ifaceidx.IfaceMetadataIndex,
	vrfIdx vrfidx.VRFMetadataIndex, addrAlloc netalloc.AddressAllocator, log logging.Logger) *RouteHandler

NewRouteVppHandler creates new instance of route vppcalls handler

func (*RouteHandler) DumpRoutes

func (h *RouteHandler) DumpRoutes() (routes []*vppcalls.RouteDetails, err error)

DumpRoutes implements route handler.

func (*RouteHandler) VppAddRoute

func (h *RouteHandler) VppAddRoute(ctx context.Context, route *l3.Route) error

VppAddRoute implements route handler.

func (*RouteHandler) VppDelRoute

func (h *RouteHandler) VppDelRoute(ctx context.Context, route *l3.Route) error

VppDelRoute implements route handler.

type TeibHandler

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

TeibHandler is accessor for TEIB-related vppcalls methods

func NewTeibVppHandler

func NewTeibVppHandler(callsChan govppapi.Channel, ifIndexes ifaceidx.IfaceMetadataIndex, log logging.Logger) *TeibHandler

NewTeibVppHandler creates new instance of TEIB vppcalls handler

func (*TeibHandler) DumpTeib

func (h *TeibHandler) DumpTeib() (entries []*l3.TeibEntry, err error)

DumpTeib dumps TEIB entries from VPP and fills them into the provided TEIB entry map.

func (*TeibHandler) VppAddTeibEntry

func (h *TeibHandler) VppAddTeibEntry(ctx context.Context, entry *l3.TeibEntry) error

VppAddTeibEntry adds a new TEIB entry.

func (*TeibHandler) VppDelTeibEntry

func (h *TeibHandler) VppDelTeibEntry(ctx context.Context, entry *l3.TeibEntry) error

VppDelTeibEntry removes an existing TEIB entry.

type VrfTableHandler

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

VrfTableHandler is accessor for vrf-related vppcalls methods

func NewVrfTableVppHandler

func NewVrfTableVppHandler(callsChan govppapi.Channel, log logging.Logger) *VrfTableHandler

NewVrfTableVppHandler creates new instance of vrf-table vppcalls handler

func (*VrfTableHandler) AddVrfTable

func (h *VrfTableHandler) AddVrfTable(table *l3.VrfTable) error

AddVrfTable adds new VRF table.

func (*VrfTableHandler) DelVrfTable

func (h *VrfTableHandler) DelVrfTable(table *l3.VrfTable) error

DelVrfTable deletes existing VRF table.

func (*VrfTableHandler) DumpVrfTables

func (h *VrfTableHandler) DumpVrfTables() (tables []*l3.VrfTable, err error)

DumpVrfTables dumps all configured VRF tables.

func (*VrfTableHandler) SetVrfFlowHashSettings

func (h *VrfTableHandler) SetVrfFlowHashSettings(vrfID uint32, isIPv6 bool, hashFields *l3.VrfTable_FlowHashSettings) error

SetVrfFlowHashSettings sets IP flow hash settings for a VRF table.

type VrrpVppHandler

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

VrrpVppHandler is accessor for vrrp-related vppcalls methods

func NewVrrpVppHandler

func NewVrrpVppHandler(callsChan govppapi.Channel, ifIndexes ifaceidx.IfaceMetadataIndex, log logging.Logger) *VrrpVppHandler

NewVrrpVppHandler creates new instance of VRRP handler

func (*VrrpVppHandler) DumpVrrpEntries

func (h *VrrpVppHandler) DumpVrrpEntries() (entries []*vppcalls.VrrpDetails, err error)

DumpVrrpEntries dumps all configured VRRP entries.

func (*VrrpVppHandler) VppAddVrrp

func (h *VrrpVppHandler) VppAddVrrp(entry *l3.VRRPEntry) error

VppAddVrrp implements VRRP handler.

func (*VrrpVppHandler) VppDelVrrp

func (h *VrrpVppHandler) VppDelVrrp(entry *l3.VRRPEntry) error

VppDelVrrp implements VRRP handler.

func (*VrrpVppHandler) VppStartVrrp

func (h *VrrpVppHandler) VppStartVrrp(entry *l3.VRRPEntry) error

VppStartVrrp implements VRRP handler.

func (*VrrpVppHandler) VppStopVrrp

func (h *VrrpVppHandler) VppStopVrrp(entry *l3.VRRPEntry) error

VppStopVrrp implements VRRP handler.

Jump to

Keyboard shortcuts

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