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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func AddHandlerVersion

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

Types

type IPSecSaDetails

type IPSecSaDetails struct {
	Sa   *ipsec.SecurityAssociation
	Meta *IPSecSaMeta
}

IPSecSaDetails holds security association with VPP metadata

type IPSecSaMeta

type IPSecSaMeta struct {
	SaID           uint32
	Interface      string
	IfIdx          uint32
	CryptoKeyLen   uint8
	IntegKeyLen    uint8
	Salt           uint32
	SeqOutbound    uint64
	LastSeqInbound uint64
	ReplayWindow   uint64
	TotalDataSize  uint64
}

IPSecSaMeta contains all VPP-specific metadata

type IPSecSpdDetails

type IPSecSpdDetails struct {
	Spd         *ipsec.SecurityPolicyDatabase
	PolicyMeta  map[string]*SpdMeta // SA index name is a key
	NumPolicies uint32
}

IPSecSpdDetails represents IPSec policy databases with particular metadata

type IPSecVPPRead

type IPSecVPPRead interface {
	// DumpIPSecSPD returns a list of IPSec security policy databases
	DumpIPSecSPD() (spdList []*IPSecSpdDetails, err error)
	// DumpIPSecSA returns a list of configured security associations
	DumpIPSecSA() (saList []*IPSecSaDetails, err error)
	// DumpIPSecSAWithIndex returns a security association with provided index
	DumpIPSecSAWithIndex(saID uint32) (saList []*IPSecSaDetails, err error)
}

IPSecVPPRead provides read methods for IPSec

type IPSecVppAPI

type IPSecVppAPI interface {
	IPSecVPPRead

	// AddSPD adds SPD to VPP via binary API
	AddSPD(spdID uint32) error
	// DeleteSPD deletes SPD from VPP via binary API
	DeleteSPD(spdID uint32) error
	// AddSPDInterface adds SPD interface assignment to VPP via binary API
	AddSPDInterface(spdID uint32, iface *ipsec.SecurityPolicyDatabase_Interface) error
	// DeleteSPDInterface deletes SPD interface assignment from VPP via binary API
	DeleteSPDInterface(spdID uint32, iface *ipsec.SecurityPolicyDatabase_Interface) error
	// AddSPDEntry adds SPD policy entry to VPP via binary API
	AddSPDEntry(spdID, saID uint32, spd *ipsec.SecurityPolicyDatabase_PolicyEntry) error
	// DeleteSPDEntry deletes SPD policy entry from VPP via binary API
	DeleteSPDEntry(spdID, saID uint32, spd *ipsec.SecurityPolicyDatabase_PolicyEntry) error
	// AddSA adds SA to VPP via binary API
	AddSA(sa *ipsec.SecurityAssociation) error
	// DeleteSA deletes SA from VPP via binary API
	DeleteSA(sa *ipsec.SecurityAssociation) error
}

IPSecVppAPI provides methods for creating and managing of a IPsec configuration

func CompatibleIPSecVppHandler

func CompatibleIPSecVppHandler(c vpp.Client, ifIdx ifaceidx.IfaceMetadataIndex, log logging.Logger) IPSecVppAPI

type NewHandlerFunc

type NewHandlerFunc func(ch govppapi.Channel, ifDdx ifaceidx.IfaceMetadataIndex, log logging.Logger) IPSecVppAPI

type SpdMeta

type SpdMeta struct {
	SaID    uint32
	Policy  uint8
	Bytes   uint64
	Packets uint64
}

SpdMeta hold VPP-specific data related to SPD

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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