Documentation ¶
Overview ¶
Package vppcalls contains wrappers over VPP binary APIs for ARPs, proxy ARPs, L3 FIBs and helpers for dumping them.
Index ¶
- Constants
- func NewL3VppHandler(c vpp.Client, ifIdx ifaceidx.IfaceMetadataIndex, ...) vppcalls.L3VppAPI
- type ArpVppHandler
- type DHCPProxyHandler
- type IPNeighHandler
- type L3VppHandler
- type L3XCHandler
- func (h *L3XCHandler) DeleteL3XC(ctx context.Context, index uint32, ipv6 bool) error
- func (h *L3XCHandler) DumpAllL3XC(ctx context.Context) ([]vppcalls.L3XC, error)
- func (h *L3XCHandler) DumpL3XC(ctx context.Context, index uint32) ([]vppcalls.L3XC, error)
- func (h *L3XCHandler) UpdateL3XC(ctx context.Context, xc *vppcalls.L3XC) error
- type ProxyArpVppHandler
- func (h *ProxyArpVppHandler) AddProxyArpRange(firstIP, lastIP []byte, vrfID uint32) error
- func (h *ProxyArpVppHandler) DeleteProxyArpRange(firstIP, lastIP []byte, vrfID uint32) error
- func (h *ProxyArpVppHandler) DisableProxyArpInterface(ifName string) error
- func (h *ProxyArpVppHandler) DumpProxyArpInterfaces() (pArpIfs []*vppcalls.ProxyArpInterfaceDetails, err error)
- func (h *ProxyArpVppHandler) DumpProxyArpRanges() (pArpRngs []*vppcalls.ProxyArpRangesDetails, err error)
- func (h *ProxyArpVppHandler) EnableProxyArpInterface(ifName string) error
- type RouteHandler
- type TeibHandlerUnsupported
- type VrfTableHandler
- func (h *VrfTableHandler) AddVrfTable(table *l3.VrfTable) error
- func (h *VrfTableHandler) DelVrfTable(table *l3.VrfTable) error
- func (h *VrfTableHandler) DumpVrfTables() (tables []*l3.VrfTable, err error)
- func (h *VrfTableHandler) SetVrfFlowHashSettings(vrfID uint32, isIPv6 bool, hashFields *l3.VrfTable_FlowHashSettings) error
- type VrrpVppHandler
- func (h *VrrpVppHandler) DumpVrrpEntries() (entries []*vppcalls.VrrpDetails, err error)
- func (h *VrrpVppHandler) VppAddVrrp(entry *l3.VRRPEntry) error
- func (h *VrrpVppHandler) VppDelVrrp(entry *l3.VRRPEntry) error
- func (h *VrrpVppHandler) VppStartVrrp(entry *l3.VRRPEntry) error
- func (h *VrrpVppHandler) VppStopVrrp(entry *l3.VRRPEntry) error
Constants ¶
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 ¶
func NewL3VppHandler ¶
func NewL3VppHandler( c vpp.Client, ifIdx ifaceidx.IfaceMetadataIndex, vrfIdx vrfidx.VRFMetadataIndex, addrAlloc netalloc.AddressAllocator, log logging.Logger, ) vppcalls.L3VppAPI
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.
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(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 L3VppHandler ¶
type L3VppHandler struct { *ArpVppHandler *ProxyArpVppHandler *RouteHandler *IPNeighHandler *VrfTableHandler *DHCPProxyHandler *L3XCHandler *TeibHandlerUnsupported *VrrpVppHandler }
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 (*L3XCHandler) DumpAllL3XC ¶
func (*L3XCHandler) UpdateL3XC ¶
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 ¶
VppAddRoute implements route handler.
func (*RouteHandler) VppDelRoute ¶
VppDelRoute implements route handler.
type TeibHandlerUnsupported ¶ added in v3.2.0
type TeibHandlerUnsupported struct{}
func (*TeibHandlerUnsupported) DumpTeib ¶ added in v3.2.0
func (h *TeibHandlerUnsupported) DumpTeib() ([]*l3.TeibEntry, error)
func (*TeibHandlerUnsupported) VppAddTeibEntry ¶ added in v3.2.0
func (*TeibHandlerUnsupported) VppDelTeibEntry ¶ added in v3.2.0
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 ¶ added in v3.2.0
type VrrpVppHandler struct {
// contains filtered or unexported fields
}
VrrpVppHandler is accessor for vrrp-related vppcalls methods
func NewVrrpVppHandler ¶ added in v3.2.0
func NewVrrpVppHandler(callsChan govppapi.Channel, log logging.Logger) *VrrpVppHandler
NewVrrpVppHandler creates new instance of VRRP handler
func (*VrrpVppHandler) DumpVrrpEntries ¶ added in v3.2.0
func (h *VrrpVppHandler) DumpVrrpEntries() (entries []*vppcalls.VrrpDetails, err error)
DumpVrrpEntries implements VRRP handler (not supported in VPP 20.01).
func (*VrrpVppHandler) VppAddVrrp ¶ added in v3.2.0
func (h *VrrpVppHandler) VppAddVrrp(entry *l3.VRRPEntry) error
VppAddVrrp implements VRRP handler (not supported in VPP 20.01).
func (*VrrpVppHandler) VppDelVrrp ¶ added in v3.2.0
func (h *VrrpVppHandler) VppDelVrrp(entry *l3.VRRPEntry) error
VppDelVrrp implements VRRP handler (not supported in VPP 20.01).
func (*VrrpVppHandler) VppStartVrrp ¶ added in v3.2.0
func (h *VrrpVppHandler) VppStartVrrp(entry *l3.VRRPEntry) error
VppStartVrrp implements VRRP handler.
func (*VrrpVppHandler) VppStopVrrp ¶ added in v3.2.0
func (h *VrrpVppHandler) VppStopVrrp(entry *l3.VRRPEntry) error
VppStopVrrp implements VRRP handler.