vppcalls

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupported = errors.New("unsupported")
)
View Source
var Handler = vpp.RegisterHandler(vpp.HandlerDesc{
	Name:       "punt",
	HandlerAPI: (*PuntVppAPI)(nil),
})

Functions

func AddHandlerVersion

func AddHandlerVersion(version vpp.Version, msgs []govppapi.Message, h NewHandlerFunc)

Types

type ExceptionDetails

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

ExceptionDetails include punt model and socket path from VPP.

type NewHandlerFunc

type NewHandlerFunc func(ch govppapi.Channel, idx ifaceidx.IfaceMetadataIndex, log 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 {
	// DumpRegisteredPuntSockets 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(c vpp.Client, ifIdx 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