vpp2101

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package vpp2101_379 contains wrappers over VPP (version 20.01) binary APIs to simplify their usage

Index

Constants

View Source
const (
	BehaviorEnd    = iota + 1 // Behavior of simple endpoint
	BehaviorX                 // Behavior of endpoint with Layer-3 cross-connect
	BehaviorT                 // Behavior of endpoint with specific IPv6 table lookup
	BehaviorDfirst            // Unused. Separator in between regular and D
	BehaviorDX2               // Behavior of endpoint with decapulation and Layer-2 cross-connect (or DX2 with egress VLAN rewrite when VLAN notzero - not supported this variant yet)
	BehaviorDX6               // Behavior of endpoint with decapsulation and IPv6 cross-connect
	BehaviorDX4               // Behavior of endpoint with decapsulation and IPv4 cross-connect
	BehaviorDT6               // Behavior of endpoint with decapsulation and specific IPv6 table lookup
	BehaviorDT4               // Behavior of endpoint with decapsulation and specific IPv4 table lookup
	BehaviorLast              // seems unused, note in VPP: "Must always be the last one"
)

Constants for behavior function hardcoded into VPP (there can be also custom behavior functions implemented as VPP plugins) Constants are taken from VPP's vnet/srv6/sr.h (names are modified to Golang from original C form in VPP code)

View Source
const (
	SteerTypeL2   = 2
	SteerTypeIPv4 = 4
	SteerTypeIPv6 = 6
)

Constants for steering type Constants are taken from VPP's vnet/srv6/sr.h (names are modified to Golang from original C form in VPP code)

View Source
const (
	AddSRList            = iota + 1 // Add SR List to an existing SR policy
	DeleteSRList                    // Delete SR List from an existing SR policy
	ModifyWeightOfSRList            // Modify the weight of an existing SR List
)

Constants for operation of SR policy modify binary API method

Variables

This section is empty.

Functions

func IPToAddress

func IPToAddress(ipstr string) (addr ip_types.Address, err error)

func NewSRv6VppHandler

func NewSRv6VppHandler(c vpp.Client, ifIdx ifaceidx.IfaceMetadataIndex, log logging.Logger) vppcalls.SRv6VppAPI

NewSRv6VppHandler creates new instance of SRv6 vppcalls handler

Types

type SRv6VppHandler

type SRv6VppHandler struct {
	core_vppcalls.VppCoreAPI
	// contains filtered or unexported fields
}

SRv6VppHandler is accessor for SRv6-related vppcalls methods

func (*SRv6VppHandler) AddLocalSid

func (h *SRv6VppHandler) AddLocalSid(localSID *srv6.LocalSID) error

AddLocalSid adds local sid <localSID> into VPP

func (*SRv6VppHandler) AddPolicy

func (h *SRv6VppHandler) AddPolicy(policy *srv6.Policy) error

AddPolicy adds SRv6 policy <policy> into VPP (including all policy's segment lists).

func (*SRv6VppHandler) AddPolicySegmentList

func (h *SRv6VppHandler) AddPolicySegmentList(segmentList *srv6.Policy_SegmentList, policy *srv6.Policy) error

AddPolicySegmentList adds segment list <segmentList> to SRv6 policy <policy> in VPP

func (*SRv6VppHandler) AddSteering

func (h *SRv6VppHandler) AddSteering(steering *srv6.Steering) error

AddSteering sets in VPP steering into SRv6 policy.

func (*SRv6VppHandler) DeleteLocalSid

func (h *SRv6VppHandler) DeleteLocalSid(localSID *srv6.LocalSID) error

DeleteLocalSid deletes local sid <localSID> in VPP

func (*SRv6VppHandler) DeletePolicy

func (h *SRv6VppHandler) DeletePolicy(bindingSid net.IP) error

DeletePolicy deletes SRv6 policy given by binding SID <bindingSid>

func (*SRv6VppHandler) DeletePolicySegmentList

func (h *SRv6VppHandler) DeletePolicySegmentList(segmentList *srv6.Policy_SegmentList, segmentVPPIndex uint32, policy *srv6.Policy) error

DeletePolicySegmentList removes segment list <segmentList> (with VPP-internal index <segmentVPPIndex>) from SRv6 policy <policy> in VPP

func (*SRv6VppHandler) DumpLocalSids

func (h *SRv6VppHandler) DumpLocalSids() (localsids []*srv6.LocalSID, err error)

DumpLocalSids retrieves all localsids

func (*SRv6VppHandler) RemoveSteering

func (h *SRv6VppHandler) RemoveSteering(steering *srv6.Steering) error

RemoveSteering removes in VPP steering into SRv6 policy.

func (*SRv6VppHandler) RetrievePolicyIndexInfo

func (h *SRv6VppHandler) RetrievePolicyIndexInfo(policy *srv6.Policy) (policyIndex uint32, segmentListIndexes map[*srv6.Policy_SegmentList]uint32, err error)

RetrievePolicyIndexInfo retrieves index of policy <policy> and its segment lists

func (*SRv6VppHandler) SetEncapsSourceAddress

func (h *SRv6VppHandler) SetEncapsSourceAddress(address string) error

SetEncapsSourceAddress sets for SRv6 in VPP the source address used for encapsulated packet

Jump to

Keyboard shortcuts

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