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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StnDetails

type StnDetails struct {
	Rule *stn.Rule
	Meta *StnMeta
}

StnDetails contains a proto-modelled STN data and VPP specific metadata

type StnMeta

type StnMeta struct {
	IfIdx uint32
}

StnMeta contains an index of the interface defined by name in the STN rule

type StnVppAPI

type StnVppAPI interface {
	StnVppWrite
	StnVppRead
}

StnVppAPI provides methods for managing STN rules

type StnVppHandler

type StnVppHandler struct {
	// contains filtered or unexported fields
}

StnVppHandler is accessor for STN-related vppcalls methods

func NewStnVppHandler

func NewStnVppHandler(callsChan api.Channel, ifIndexes ifaceidx.IfaceMetadataIndex, log logging.Logger) *StnVppHandler

NewStnVppHandler creates new instance of STN vppcalls handler

func (*StnVppHandler) AddSTNRule

func (h *StnVppHandler) AddSTNRule(stnRule *stn.Rule) error

AddSTNRule implements STN handler, adds a new STN rule to the VPP.

func (*StnVppHandler) DeleteSTNRule

func (h *StnVppHandler) DeleteSTNRule(stnRule *stn.Rule) error

DeleteSTNRule implements STN handler, removes the provided STN rule from the VPP.

func (*StnVppHandler) DumpSTNRules

func (h *StnVppHandler) DumpSTNRules() ([]*StnDetails, error)

DumpSTNRules implements STN handler, it returns all STN rules present on the VPP

type StnVppRead

type StnVppRead interface {
	// DumpSTNRules returns a list of all STN rules configured on the VPP
	DumpSTNRules() ([]*StnDetails, error)
}

StnVppRead provides read methods for STN rules

type StnVppWrite

type StnVppWrite interface {
	// AddSTNRule calls StnAddDelRule bin API with IsAdd=1
	AddSTNRule(stnRule *stn.Rule) error
	// DelSTNRule calls StnAddDelRule bin API with IsAdd=0
	DeleteSTNRule(stnRule *stn.Rule) error
}

StnVppWrite provides write methods for STN rules

Jump to

Keyboard shortcuts

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