Documentation ¶
Overview ¶
Package vppcalls contains wrappers over VPP binary APIs for ARPs, proxy ARPs, L3 FIBs and helpers for dumping them.
Index ¶
- Constants
- Variables
- func NewL3VppHandler(c vpp.Client, ifIdx ifaceidx.IfaceMetadataIndex, ...) vppcalls.L3VppAPI
- type ArpVppHandler
- type DHCPProxyHandler
- type IPNeighHandler
- type L3VppHandler
- type L3XCHandlerUnsupported
- func (l L3XCHandlerUnsupported) DeleteL3XC(ctx context.Context, index uint32, ipv6 bool) error
- func (l L3XCHandlerUnsupported) DumpAllL3XC(ctx context.Context) ([]vppcalls.L3XC, error)
- func (l L3XCHandlerUnsupported) DumpL3XC(ctx context.Context, index uint32) ([]vppcalls.L3XC, error)
- func (l L3XCHandlerUnsupported) UpdateL3XC(ctx context.Context, l3xc *vppcalls.L3XC) error
- type ProxyArpVppHandler
- func (h *ProxyArpVppHandler) AddProxyArpRange(firstIP, lastIP []byte) error
- func (h *ProxyArpVppHandler) DeleteProxyArpRange(firstIP, lastIP []byte) 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 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
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 ¶
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.
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 *vpp_l3.DHCPProxy) error
func (*DHCPProxyHandler) DeleteDHCPProxy ¶
func (h *DHCPProxyHandler) DeleteDHCPProxy(entry *vpp_l3.DHCPProxy) error
func (*DHCPProxyHandler) DumpDHCPProxy ¶
func (h *DHCPProxyHandler) DumpDHCPProxy() ([]*vppcalls.DHCPProxyDetails, error)
type IPNeighHandler ¶
type IPNeighHandler struct { vpevppcalls.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) error
SetIPScanNeighbor implements ip neigh handler.
type L3VppHandler ¶
type L3VppHandler struct { *ArpVppHandler *ProxyArpVppHandler *RouteHandler *IPNeighHandler *VrfTableHandler *DHCPProxyHandler *L3XCHandlerUnsupported }
type L3XCHandlerUnsupported ¶
type L3XCHandlerUnsupported struct{}
func (L3XCHandlerUnsupported) DeleteL3XC ¶
func (L3XCHandlerUnsupported) DumpAllL3XC ¶
func (L3XCHandlerUnsupported) DumpL3XC ¶
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) error
AddProxyArpRange implements proxy arp handler.
func (*ProxyArpVppHandler) DeleteProxyArpRange ¶
func (h *ProxyArpVppHandler) DeleteProxyArpRange(firstIP, lastIP []byte) 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, addrAlloc netalloc.AddressAllocator, log logging.Logger) *RouteHandler
NewRouteVppHandler creates new instance of route vppcalls handler
func (*RouteHandler) DumpRoutes ¶
func (h *RouteHandler) DumpRoutes() ([]*vppcalls.RouteDetails, error)
DumpRoutes implements route handler.
func (*RouteHandler) VppAddRoute ¶
VppAddRoute implements route handler.
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.