vppcalls

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package vppcalls contains wrappers over VPP binary APIs for all supported interface types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAfPacketInterface

func AddAfPacketInterface(afPacketIntf *intf.Interfaces_Interface_Afpacket, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) (swIndex uint32, err error)

AddAfPacketInterface calls AfPacketCreate VPP binary API.

func AddBfdEchoFunction

func AddBfdEchoFunction(bfdInput *bfd.SingleHopBFD_EchoFunction, swIfIndexes ifaceidx.SwIfIndex, vppChannel *govppapi.Channel, timeLog measure.StopWatchEntry) (err error)

AddBfdEchoFunction sets up an echo function for the interface.

func AddBfdUDPSession

func AddBfdUDPSession(bfdSession *bfd.SingleHopBFD_Session, swIfIndexes ifaceidx.SwIfIndex, bfdKeyIndexes idxvpp.NameToIdx,
	log logging.Logger, vppChannel *govppapi.Channel, timeLog measure.StopWatchEntry) error

AddBfdUDPSession adds new BFD session with authentication if available.

func AddBfdUDPSessionFromDetails

func AddBfdUDPSessionFromDetails(bfdSession *bfd_api.BfdUDPSessionDetails, bfdKeyIndexes idxvpp.NameToIdx, log logging.Logger,
	vppChannel *govppapi.Channel, timeLog measure.StopWatchEntry) error

AddBfdUDPSessionFromDetails adds new BFD session with authentication if available.

func AddDelVxlanTunnelReq

func AddDelVxlanTunnelReq(vxlanIntf *intf.Interfaces_Interface_Vxlan, add uint8) (req *vxlan.VxlanAddDelTunnel, err error)

AddDelVxlanTunnelReq prepares the request for bin API calls.

func AddInterfaceIP

func AddInterfaceIP(ifIdx uint32, addr *net.IPNet, log logging.Logger, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) error

AddInterfaceIP calls SwInterfaceAddDelAddress bin API with IsAdd=1.

func AddLoopbackInterface

func AddLoopbackInterface(vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) (swIndex uint32, err error)

AddLoopbackInterface calls CreateLoopback bin API.

func AddMemifInterface

func AddMemifInterface(memIntf *intf.Interfaces_Interface_Memif, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) (swIndex uint32, err error)

AddMemifInterface calls MemifCreate bin API.

func AddStnRule added in v1.0.8

func AddStnRule(ifIdx uint32, addr *net.IPNet, log logging.Logger, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) error

AddStnRule calls StnAddDelRule bin API with IsAdd=1

func AddTapInterface

func AddTapInterface(tapIf *interfaces.Interfaces_Interface_Tap, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) (swIndex uint32, err error)

AddTapInterface calls TapConnect bin API.

func AddVxlanTunnel

func AddVxlanTunnel(vxlanIntf *intf.Interfaces_Interface_Vxlan, encapVrf uint32, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) (swIndex uint32, err error)

AddVxlanTunnel calls AddDelVxlanTunnelReq with flag add=1.

func CheckMsgCompatibilityForBfd

func CheckMsgCompatibilityForBfd(log logging.Logger, vppChan *govppapi.Channel) error

CheckMsgCompatibilityForBfd checks if bfd CRSs are compatible with VPP in runtime.

func CheckMsgCompatibilityForInterface

func CheckMsgCompatibilityForInterface(log logging.Logger, vppChan *govppapi.Channel) error

CheckMsgCompatibilityForInterface checks if interface CRSs are compatible with VPP in runtime.

func DelInterfaceIP

func DelInterfaceIP(ifIdx uint32, addr *net.IPNet, log logging.Logger, vppChan *govppapi.Channel, timeLog *measure.TimeLog) error

DelInterfaceIP calls SwInterfaceAddDelAddress bin API with IsAdd=00.

func DelStnRule added in v1.0.8

func DelStnRule(ifIdx uint32, addr *net.IPNet, log logging.Logger, vppChan *govppapi.Channel, timeLog *measure.TimeLog) error

DelStnRule calls StnAddDelRule bin API with IsAdd=00

func DeleteAfPacketInterface

func DeleteAfPacketInterface(afPacketIntf *intf.Interfaces_Interface_Afpacket, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) error

DeleteAfPacketInterface calls AfPacketDelete VPP binary API.

func DeleteBfdEchoFunction

func DeleteBfdEchoFunction(vppChannel *govppapi.Channel, timeLog measure.StopWatchEntry) (err error)

DeleteBfdEchoFunction removes an echo function.

func DeleteBfdUDPAuthenticationKey

func DeleteBfdUDPAuthenticationKey(bfdKey *bfd.SingleHopBFD_Key, vppChannel *govppapi.Channel, timeLog measure.StopWatchEntry) (err error)

DeleteBfdUDPAuthenticationKey removes the authentication key.

func DeleteBfdUDPSession

func DeleteBfdUDPSession(ifIndex uint32, sourceAddres string, destAddres string, vppChannel *govppapi.Channel, timeLog measure.StopWatchEntry) (err error)

DeleteBfdUDPSession removes an existing BFD session.

func DeleteLoopbackInterface

func DeleteLoopbackInterface(idx uint32, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) error

DeleteLoopbackInterface calls DeleteLoopback bin API.

func DeleteMemifInterface

func DeleteMemifInterface(idx uint32, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) error

DeleteMemifInterface calls MemifDelete bin API.

func DeleteTapInterface

func DeleteTapInterface(idx uint32, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) error

DeleteTapInterface calls TapDelete bin API.

func DeleteVxlanTunnel

func DeleteVxlanTunnel(vxlanIntf *intf.Interfaces_Interface_Vxlan, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) error

DeleteVxlanTunnel calls AddDelVxlanTunnelReq with flag add=0.

func DumpBfdUDPSessionsWithID

func DumpBfdUDPSessionsWithID(authKeyIndex uint32, swIfIndexes ifaceidx.SwIfIndex, bfdSessionIndexes idxvpp.NameToIdx,
	vppChannel *govppapi.Channel, timeLog measure.StopWatchEntry) ([]*bfd_api.BfdUDPSessionDetails, error)

DumpBfdUDPSessionsWithID returns a list of BFD session's metadata

func GetInterfaceVRF added in v1.0.8

func GetInterfaceVRF(ifaceIndex uint32, log logging.Logger,
	vppChan *govppapi.Channel) (uint32, error)

GetInterfaceVRF assigns VRF table to interface

func InterfaceAdminDown

func InterfaceAdminDown(ifIdx uint32, vppChan *govppapi.Channel, timeLog *measure.TimeLog) error

InterfaceAdminDown calls binary API SwInterfaceSetFlagsReply with AdminUpDown=0.

func InterfaceAdminUp

func InterfaceAdminUp(ifIdx uint32, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) error

InterfaceAdminUp calls binary API SwInterfaceSetFlagsReply with AdminUpDown=1.

func ModifyBfdUDPSession

func ModifyBfdUDPSession(bfdSession *bfd.SingleHopBFD_Session, swIfIndexes ifaceidx.SwIfIndex, vppChannel *govppapi.Channel, timeLog measure.StopWatchEntry) (err error)

ModifyBfdUDPSession modifies existing BFD session excluding authentication which cannot be changed this way.

func SetBfdUDPAuthenticationKey

func SetBfdUDPAuthenticationKey(bfdKey *bfd.SingleHopBFD_Key, log logging.Logger, vppChannel *govppapi.Channel, timeLog measure.StopWatchEntry) (err error)

SetBfdUDPAuthenticationKey creates new authentication key.

func SetInterfaceMac

func SetInterfaceMac(ifIdx uint32, macAddress string, log logging.Logger, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) error

SetInterfaceMac calls SwInterfaceSetMacAddress bin API.

func SetInterfaceMtu added in v1.0.5

func SetInterfaceMtu(ifIdx uint32, mtu uint32, log logging.Logger, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) error

SetInterfaceMtu calls SwInterfaceSetMtu bin API with desired MTU value.

func SetInterfaceVRF added in v1.0.8

func SetInterfaceVRF(ifaceIndex, vrfIndex uint32, log logging.Logger,
	vppChan *govppapi.Channel) error

SetInterfaceVRF retrieves VRF table from interface

func SetRxMode added in v1.0.8

func SetRxMode(ifIdx uint32, rxModeSettings intf.Interfaces_Interface_RxModeSettings,
	log logging.Logger, vppChan *govppapi.Channel, timeLog measure.StopWatchEntry) error

SetRxMode calls SwInterfaceSetRxMode bin

Types

type StnRule added in v1.0.8

type StnRule struct {
	IPAddress net.IPNet
	IfaceIdx  uint32
}

StnRule represents stn rule entry

Jump to

Keyboard shortcuts

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