vppcalls

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs.

Index

Constants

This section is empty.

Variables

BridgeDomainMessages is list of used VPP messages for compatibility check

L2FibMessages is list of used VPP messages for compatibility check

XConnectMessages is list of used VPP messages for compatibility check

Functions

func AddL2XConnect added in v1.4.0

func AddL2XConnect(rxIfIdx uint32, txIfIdx uint32, vppChan VPPChannel, stopwatch *measure.Stopwatch) error

AddL2XConnect creates xConnect between two existing interfaces.

func DeleteL2XConnect added in v1.4.0

func DeleteL2XConnect(rxIfIdx uint32, txIfIdx uint32, vppChan VPPChannel, stopwatch *measure.Stopwatch) error

DeleteL2XConnect removes xConnect between two interfaces.

func SetInterfacesToBridgeDomain added in v1.4.0

func SetInterfacesToBridgeDomain(bdName string, bdIdx uint32, bdIfs []*l2.BridgeDomains_BridgeDomain_Interfaces,
	swIfIndices ifaceidx.SwIfIndex, log logging.Logger, vppChan VPPChannel, stopwatch *measure.Stopwatch) (ifs []string, wasErr error)

SetInterfacesToBridgeDomain attempts to set all provided interfaces to bridge domain. It returns a list of interfaces which were successfully set.

func UnsetInterfacesFromBridgeDomain added in v1.4.0

func UnsetInterfacesFromBridgeDomain(bdName string, bdIdx uint32, bdIfs []*l2.BridgeDomains_BridgeDomain_Interfaces,
	swIfIndices ifaceidx.SwIfIndex, log logging.Logger, vppChan VPPChannel, stopwatch *measure.Stopwatch) (ifs []string, wasErr error)

UnsetInterfacesFromBridgeDomain removes all interfaces from bridge domain. It returns a list of interfaces which were successfully unset.

func VppAddArpTerminationTableEntry

func VppAddArpTerminationTableEntry(bdID uint32, mac string, ip string, log logging.Logger, vppChan VPPChannel, stopwatch *measure.Stopwatch) error

VppAddArpTerminationTableEntry creates ARP termination entry for bridge domain.

func VppAddBridgeDomain

func VppAddBridgeDomain(bdIdx uint32, bd *l2.BridgeDomains_BridgeDomain, vppChan VPPChannel, stopwatch *measure.Stopwatch) error

VppAddBridgeDomain adds new bridge domain.

func VppDeleteBridgeDomain

func VppDeleteBridgeDomain(bdIdx uint32, vppChan VPPChannel, stopwatch *measure.Stopwatch) error

VppDeleteBridgeDomain removes existing bridge domain.

func VppRemoveArpTerminationTableEntry

func VppRemoveArpTerminationTableEntry(bdID uint32, mac string, ip string, log logging.Logger, vppChan VPPChannel, stopwatch *measure.Stopwatch) error

VppRemoveArpTerminationTableEntry removes ARP termination entry from bridge domain

Types

type FibLogicalReq

type FibLogicalReq struct {
	IsAdd   bool
	MAC     string
	BDIdx   uint32
	SwIfIdx uint32
	BVI     bool
	Static  bool
	// contains filtered or unexported fields
}

FibLogicalReq groups multiple fields so that all of them do not enumerate in one function call (request, reply/callback).

type L2FibVppCalls

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

L2FibVppCalls aggregates vpp calls related to l2 fib.

func NewL2FibVppCalls

func NewL2FibVppCalls(log logging.Logger, vppChan VPPChannel, stopwatch *measure.Stopwatch) *L2FibVppCalls

NewL2FibVppCalls is a constructor.

func (*L2FibVppCalls) Add

func (fib *L2FibVppCalls) Add(mac string, bdID uint32, ifIdx uint32, bvi bool, static bool, callback func(error)) error

Add creates L2 FIB table entry.

func (*L2FibVppCalls) Delete

func (fib *L2FibVppCalls) Delete(mac string, bdID uint32, ifIdx uint32, callback func(error)) error

Delete removes existing L2 FIB table entry.

func (*L2FibVppCalls) WatchFIBReplies

func (fib *L2FibVppCalls) WatchFIBReplies()

WatchFIBReplies is meant to be used in goroutine.

type VPPChannel added in v1.4.0

type VPPChannel interface {
	SendRequest(msg govppapi.Message) *govppapi.RequestCtx

	SendMultiRequest(msg govppapi.Message) *govppapi.MultiRequestCtx

	CheckMessageCompatibility(messages ...govppapi.Message) error
}

VPPChannel is interface for send request to VPP channel

Jump to

Keyboard shortcuts

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