vppcalls

package
v3.5.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 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

View Source
var Handler = vpp.RegisterHandler(vpp.HandlerDesc{
	Name:       "abf",
	HandlerAPI: (*ABFVppAPI)(nil),
})

Functions

func AddABFHandlerVersion

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

Types

type ABFDetails

type ABFDetails struct {
	ABF  *abf.ABF `json:"abf"`
	Meta *ABFMeta `json:"abf_meta"`
}

ABFDetails contains proto-modeled ABF data together with VPP-related metadata

type ABFMeta

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

ABFMeta contains policy ID (ABF index)

type ABFVppAPI

type ABFVppAPI interface {
	ABFVppRead

	// AddAbfPolicy creates new ABF entry together with a list of forwarding paths
	AddAbfPolicy(policyID, aclID uint32, abfPaths []*abf.ABF_ForwardingPath) error
	// DeleteAbfPolicy removes existing ABF entry
	DeleteAbfPolicy(policyID uint32, abfPaths []*abf.ABF_ForwardingPath) error
	// AbfAttachInterfaceIPv4 attaches IPv4 interface to the ABF
	AbfAttachInterfaceIPv4(policyID, ifIdx, priority uint32) error
	// AbfDetachInterfaceIPv4 detaches IPV4 interface from the ABF
	AbfDetachInterfaceIPv4(policyID, ifIdx, priority uint32) error
	// AbfAttachInterfaceIPv6 attaches IPv6 interface to the ABF
	AbfAttachInterfaceIPv6(policyID, ifIdx, priority uint32) error
	// AbfDetachInterfaceIPv6 detaches IPv6 interface from the ABF
	AbfDetachInterfaceIPv6(policyID, ifIdx, priority uint32) error
}

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

type ABFVppRead

type ABFVppRead interface {
	// GetAbfVersion retrieves version of the VPP ABF plugin
	GetAbfVersion() (ver string, err error)
	// DumpABFPolicy retrieves VPP ABF configuration.
	DumpABFPolicy() ([]*ABFDetails, error)
}

ABFVppRead provides read methods for ABF plugin

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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