vppcalls

package
v0.0.0-...-ae01f8c Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package vppcalls contains wrappers over VPP ABF binary APIs and helpers to dump ABFs configured in VPP

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAbxHandlerVersion

func AddAbxHandlerVersion(version vpp.Version, msgs []govppapi.Message,
	h func(ch govppapi.Channel, aclIdx aclidx.ACLMetadataIndex, ifIdx ifaceidx.IfaceMetadataIndex, log logging.Logger) ABXVppAPI,
)

Types

type ABXDetails

type ABXDetails struct {
	ABX  *abx.ABX `json:"abx"`
	Meta *ABXMeta `json:"abx_meta"`
}

ABXDetails contains proto-modeled ABX data together with VPP-related metadata

type ABXMeta

type ABXMeta struct {
	PolicyID uint32 `json:"policy_id"`
}

ABXMeta contains policy ID (ABX index)

type ABXVppAPI

type ABXVppAPI interface {
	ABXVppRead

	// GetAbxVersion retrieves version of the VPP ABX plugin
	GetAbxVersion() (ver string, err error)
	// AddAbxPolicy creates new ABX entry together with a list of forwarding paths
	AddAbxPolicy(policyID uint32, aclID uint32, txIf string, dstMac string) error
	// DeleteAbxPolicy removes existing ABX entry
	DeleteAbxPolicy(policyID uint32) error
	// AbxAttachInterface attaches interface to the ABX
	AbxAttachInterface(policyID uint32, ifIdx, priority uint32) error
	// AbxDetachInterface detaches interface from the ABX
	AbxDetachInterface(policyID uint32, ifIdx, priority uint32) error
}

ABXVppAPI provides read/write methods required to handle VPP ACL-based forwarding

type ABXVppRead

type ABXVppRead interface {
	// DumpABXPolicy retrieves VPP ABX configuration.
	DumpABXPolicy() ([]*ABXDetails, error)
}

ABXVppRead provides read methods for ABX plugin

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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