vppcalls

package
v2.5.1+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupported = errors.New("unsupported")
)
View Source
var Versions = map[string]HandlerVersion{}

Functions

This section is empty.

Types

type ExceptionDetails

type ExceptionDetails struct {
	Exception  *punt.Exception
	SocketPath string
}

ExceptionDetails include punt model and socket path from VPP.

type HandlerVersion

type HandlerVersion struct {
	Msgs []govppapi.Message
	New  func(govppapi.Channel, ifaceidx.IfaceMetadataIndex, logging.Logger) PuntVppAPI
}

type PuntDetails

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

PuntDetails includes punt model and socket path from VPP.

type PuntVPPRead

type PuntVPPRead interface {
	// DumpPuntRegisteredSockets returns all punt socket registrations known to the VPP agent
	DumpRegisteredPuntSockets() ([]*PuntDetails, error)
	// DumpExceptions dumps punt exceptions
	DumpExceptions() ([]*ExceptionDetails, error)
	// DumpPuntReasons returns all known punt reasons from VPP
	DumpPuntReasons() ([]*ReasonDetails, error)
	// DumpPuntRedirect dump IP redirect punts
	DumpPuntRedirect() ([]*punt.IPRedirect, error)
}

PuntVPPRead provides read methods for punt

type PuntVppAPI

type PuntVppAPI interface {
	PuntVPPRead

	// 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) (string, 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
	// AddPuntException registers new punt exception
	AddPuntException(punt *punt.Exception) (string, error)
	// DeletePuntException deregisters punt exception entry
	DeletePuntException(punt *punt.Exception) error
}

PuntVppAPI provides methods for managing VPP punt configuration.

func CompatiblePuntVppHandler

func CompatiblePuntVppHandler(
	ch govppapi.Channel, idx ifaceidx.IfaceMetadataIndex, log logging.Logger,
) PuntVppAPI

type ReasonDetails

type ReasonDetails struct {
	Reason *punt.Reason
	ID     uint32
}

ReasonDetails includes reason model and its matching ID from VPP.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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