Documentation ¶
Overview ¶
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs.
Index ¶
- Variables
- func AddL2XConnect(rxIfIdx uint32, txIfIdx uint32, vppChan govppapi.Channel, ...) error
- func DeleteL2XConnect(rxIfIdx uint32, txIfIdx uint32, vppChan govppapi.Channel, ...) error
- func SetInterfacesToBridgeDomain(bdName string, bdIdx uint32, bdIfs []*l2.BridgeDomains_BridgeDomain_Interfaces, ...) (ifs []string, wasErr error)
- func UnsetInterfacesFromBridgeDomain(bdName string, bdIdx uint32, bdIfs []*l2.BridgeDomains_BridgeDomain_Interfaces, ...) (ifs []string, wasErr error)
- func VppAddArpTerminationTableEntry(bdID uint32, mac string, ip string, log logging.Logger, ...) error
- func VppAddBridgeDomain(bdIdx uint32, bd *l2.BridgeDomains_BridgeDomain, vppChan govppapi.Channel, ...) error
- func VppDeleteBridgeDomain(bdIdx uint32, vppChan govppapi.Channel, stopwatch *measure.Stopwatch) error
- func VppRemoveArpTerminationTableEntry(bdID uint32, mac string, ip string, log logging.Logger, ...) error
- type FibLogicalReq
- type L2FibVppCalls
Constants ¶
This section is empty.
Variables ¶
var BridgeDomainMessages = []govppapi.Message{ &l2ba.BridgeDomainAddDel{}, &l2ba.BridgeDomainAddDelReply{}, &l2ba.BdIPMacAddDel{}, &l2ba.BdIPMacAddDelReply{}, &l2ba.SwInterfaceSetL2Bridge{}, &l2ba.SwInterfaceSetL2BridgeReply{}, }
BridgeDomainMessages is list of used VPP messages for compatibility check
var L2FibMessages = []govppapi.Message{ &l2ba.BridgeDomainDump{}, &l2ba.BridgeDomainDetails{}, &l2ba.L2FibTableDump{}, &l2ba.L2FibTableDetails{}, &l2ba.L2fibAddDel{}, &l2ba.L2fibAddDelReply{}, }
L2FibMessages is list of used VPP messages for compatibility check
var XConnectMessages = []govppapi.Message{ &l2ba.L2XconnectDump{}, &l2ba.L2XconnectDetails{}, &l2ba.SwInterfaceSetL2Xconnect{}, &l2ba.SwInterfaceSetL2XconnectReply{}, }
XConnectMessages is list of used VPP messages for compatibility check
Functions ¶
func AddL2XConnect ¶
func AddL2XConnect(rxIfIdx uint32, txIfIdx uint32, vppChan govppapi.Channel, stopwatch *measure.Stopwatch) error
AddL2XConnect creates xConnect between two existing interfaces.
func DeleteL2XConnect ¶
func DeleteL2XConnect(rxIfIdx uint32, txIfIdx uint32, vppChan govppapi.Channel, stopwatch *measure.Stopwatch) error
DeleteL2XConnect removes xConnect between two interfaces.
func SetInterfacesToBridgeDomain ¶
func SetInterfacesToBridgeDomain(bdName string, bdIdx uint32, bdIfs []*l2.BridgeDomains_BridgeDomain_Interfaces, swIfIndices ifaceidx.SwIfIndex, log logging.Logger, vppChan govppapi.Channel, 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 ¶
func UnsetInterfacesFromBridgeDomain(bdName string, bdIdx uint32, bdIfs []*l2.BridgeDomains_BridgeDomain_Interfaces, swIfIndices ifaceidx.SwIfIndex, log logging.Logger, vppChan govppapi.Channel, 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 govppapi.Channel, stopwatch *measure.Stopwatch) error
VppAddArpTerminationTableEntry creates ARP termination entry for bridge domain.
func VppAddBridgeDomain ¶
func VppAddBridgeDomain(bdIdx uint32, bd *l2.BridgeDomains_BridgeDomain, vppChan govppapi.Channel, stopwatch *measure.Stopwatch) error
VppAddBridgeDomain adds new 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 govppapi.Channel, 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) WatchFIBReplies ¶
func (fib *L2FibVppCalls) WatchFIBReplies()
WatchFIBReplies handles L2 FIB add/del requests