vppcalls

package
v2.0.0-beta+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PuntDetails

type PuntDetails struct {
	PuntData   *punt.ToHost
	SocketPath string
}

PuntDetails includes proto-modelled punt object and its socket path

type PuntVPPRead

type PuntVPPRead interface {
	// DumpPuntRegisteredSockets returns all punt socket registrations known to the VPP agent
	// TODO since the API to dump sockets is missing, the method works only with the entries in local cache
	DumpPuntRegisteredSockets() ([]*PuntDetails, error)
}

PuntVPPRead provides read methods for punt

type PuntVPPWrite

type PuntVPPWrite interface {
	// AddPunt configures new punt to the host from the VPP
	AddPunt(punt *punt.ToHost) error
	// DeletePunt removes or unregisters punt entry
	DeletePunt(punt *punt.ToHost) error
	// RegisterPuntSocket registers new punt to unix domain socket entry
	RegisterPuntSocket(puntCfg *punt.ToHost) error
	// DeregisterPuntSocket removes existing punt to socket registration
	DeregisterPuntSocket(puntCfg *punt.ToHost) error
	// AddPuntRedirect adds new punt IP redirect entry
	AddPuntRedirect(punt *punt.IPRedirect) error
	// DeletePuntRedirect removes existing redirect entry
	DeletePuntRedirect(punt *punt.IPRedirect) error
}

PuntVPPWrite provides write methods for punt

type PuntVppAPI

type PuntVppAPI interface {
	PuntVPPWrite
	PuntVPPRead
}

PuntVppAPI provides methods for managing VPP punt configuration.

type PuntVppHandler

type PuntVppHandler struct {
	RegisterSocketFn func(register bool, toHost *punt.ToHost, socketPath string)
	// contains filtered or unexported fields
}

PuntVppHandler is accessor for punt-related vppcalls methods.

func NewPuntVppHandler

func NewPuntVppHandler(callsChan api.Channel, ifIndexes ifaceidx.IfaceMetadataIndex, log logging.Logger) *PuntVppHandler

NewPuntVppHandler creates new instance of punt vppcalls handler

func (*PuntVppHandler) AddPunt

func (h *PuntVppHandler) AddPunt(puntCfg *punt.ToHost) error

AddPunt configures new punt entry

func (*PuntVppHandler) AddPuntRedirect

func (h *PuntVppHandler) AddPuntRedirect(puntCfg *punt.IPRedirect) error

AddPuntRedirect adds new redirect entry

func (*PuntVppHandler) DeletePunt

func (h *PuntVppHandler) DeletePunt(puntCfg *punt.ToHost) error

DeletePunt removes punt entry

func (*PuntVppHandler) DeletePuntRedirect

func (h *PuntVppHandler) DeletePuntRedirect(puntCfg *punt.IPRedirect) error

DeletePuntRedirect removes existing redirect entry

func (*PuntVppHandler) DeregisterPuntSocket

func (h *PuntVppHandler) DeregisterPuntSocket(puntCfg *punt.ToHost) error

DeregisterPuntSocket removes existing punt to socket sogistration

func (*PuntVppHandler) DumpPuntRegisteredSockets

func (h *PuntVppHandler) DumpPuntRegisteredSockets() (punts []*PuntDetails, err error)

DumpPuntRegisteredSockets returns punt to host via registered socket entries TODO since the binary API is not available, all data are read from local cache for now

func (*PuntVppHandler) RegisterPuntSocket

func (h *PuntVppHandler) RegisterPuntSocket(puntCfg *punt.ToHost) error

RegisterPuntSocket registers new punt to socket

Jump to

Keyboard shortcuts

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