vppcalls

package
v2.5.0-alpha.0...-0e2148d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func AddHandlerVersion

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

Types

type BridgeDomainDetails

type BridgeDomainDetails struct {
	Bd   *l2.BridgeDomain  `json:"bridge_domain"`
	Meta *BridgeDomainMeta `json:"bridge_domain_meta"`
}

BridgeDomainDetails is the wrapper structure for the bridge domain northbound API structure. NOTE: Interfaces in BridgeDomains_BridgeDomain is overridden by the local Interfaces member.

type BridgeDomainMeta

type BridgeDomainMeta struct {
	BdID uint32 `json:"bridge_domain_id"`
}

BridgeDomainMeta contains bridge domain interface name/index map

type BridgeDomainVppAPI

type BridgeDomainVppAPI interface {
	BridgeDomainVppRead

	// AddBridgeDomain adds new bridge domain.
	AddBridgeDomain(bdIdx uint32, bd *l2.BridgeDomain) error
	// DeleteBridgeDomain removes existing bridge domain.
	DeleteBridgeDomain(bdIdx uint32) error
	// AddInterfaceToBridgeDomain puts interface into bridge domain.
	AddInterfaceToBridgeDomain(bdIdx uint32, ifaceCfg *l2.BridgeDomain_Interface) error
	// DeleteInterfaceFromBridgeDomain removes interface from bridge domain.
	DeleteInterfaceFromBridgeDomain(bdIdx uint32, ifaceCfg *l2.BridgeDomain_Interface) error
	// AddArpTerminationTableEntry creates ARP termination entry for bridge domain.
	AddArpTerminationTableEntry(bdID uint32, mac string, ip string) error
	// RemoveArpTerminationTableEntry removes ARP termination entry from bridge domain.
	RemoveArpTerminationTableEntry(bdID uint32, mac string, ip string) error
}

BridgeDomainVppAPI provides methods for managing bridge domains.

type BridgeDomainVppRead

type BridgeDomainVppRead interface {
	// DumpBridgeDomains dumps VPP bridge domain data into the northbound API data structure
	// map indexed by bridge domain ID.
	DumpBridgeDomains() ([]*BridgeDomainDetails, error)
}

BridgeDomainVppRead provides read methods for bridge domains.

type FIBVppAPI

type FIBVppAPI interface {
	FIBVppRead

	// AddL2FIB creates L2 FIB table entry.
	AddL2FIB(fib *l2.FIBEntry) error
	// DeleteL2FIB removes existing L2 FIB table entry.
	DeleteL2FIB(fib *l2.FIBEntry) error
}

FIBVppAPI provides methods for managing FIBs.

type FIBVppRead

type FIBVppRead interface {
	// DumpL2FIBs dumps VPP L2 FIB table entries into the northbound API
	// data structure map indexed by destination MAC address.
	DumpL2FIBs() (map[string]*FibTableDetails, error)
}

FIBVppRead provides read methods for FIBs.

type FibMeta

type FibMeta struct {
	BdID  uint32 `json:"bridge_domain_id"`
	IfIdx uint32 `json:"outgoing_interface_sw_if_idx"`
}

FibMeta contains FIB interface and bridge domain name/index map

type FibTableDetails

type FibTableDetails struct {
	Fib  *l2.FIBEntry `json:"fib"`
	Meta *FibMeta     `json:"fib_meta"`
}

FibTableDetails is the wrapper structure for the FIB table entry northbound API structure.

type L2VppAPI

type L2VppAPI interface {
	BridgeDomainVppAPI
	FIBVppAPI
	XConnectVppAPI
}

L2VppAPI groups L2 Vpp APIs.

func CompatibleL2VppHandler

func CompatibleL2VppHandler(c vpp.Client, ifIdx ifaceidx.IfaceMetadataIndex, bdIdx idxvpp.NameToIndex, log logging.Logger) L2VppAPI

type NewHandlerFunc

type NewHandlerFunc func(ch govppapi.Channel, ifDdx ifaceidx.IfaceMetadataIndex, bdIdx idxvpp.NameToIndex, log logging.Logger) L2VppAPI

type XConnectDetails

type XConnectDetails struct {
	Xc   *l2.XConnectPair `json:"x_connect"`
	Meta *XcMeta          `json:"x_connect_meta"`
}

XConnectDetails is the wrapper structure for the l2 xconnect northbound API structure.

type XConnectVppAPI

type XConnectVppAPI interface {
	XConnectVppRead

	// AddL2XConnect creates xConnect between two existing interfaces.
	AddL2XConnect(rxIface, txIface string) error
	// DeleteL2XConnect removes xConnect between two interfaces.
	DeleteL2XConnect(rxIface, txIface string) error
}

XConnectVppAPI provides methods for managing cross connects.

type XConnectVppRead

type XConnectVppRead interface {
	// DumpXConnectPairs dumps VPP xconnect pair data into the northbound API
	// data structure map indexed by rx interface index.
	DumpXConnectPairs() (map[uint32]*XConnectDetails, error)
}

XConnectVppRead provides read methods for cross connects.

type XcMeta

type XcMeta struct {
	ReceiveInterfaceSwIfIdx  uint32 `json:"receive_interface_sw_if_idx"`
	TransmitInterfaceSwIfIdx uint32 `json:"transmit_interface_sw_if_idx"`
}

XcMeta contains cross connect rx/tx interface indexes

Directories

Path Synopsis
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.

Jump to

Keyboard shortcuts

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