ipsecidx

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SPDEntry

type SPDEntry struct {
	SPD   *ipsec.SecurityPolicyDatabases_SPD
	SpdID uint32
}

SPDEntry is used for matched SPD entries

type SPDIndex

type SPDIndex interface {
	// GetMapping returns internal read-only mapping with metadata of ipsec.SecurityPolicyDatabases_SPD type.
	GetMapping() idxvpp.NameToIdxRW

	// LookupIdx looks up previously stored item identified by index in mapping.
	LookupIdx(name string) (idx uint32, metadata *ipsec.SecurityPolicyDatabases_SPD, exists bool)

	// LookupName looks up previously stored item identified by name in mapping.
	LookupName(idx uint32) (name string, metadata *ipsec.SecurityPolicyDatabases_SPD, exists bool)

	// LookupByInterface returns structure with SPD interface assignment data.
	LookupByInterface(ifName string) []SPDEntry

	// LookupBySA returns structure with matched SPD entries.
	LookupBySA(saName string) []SPDEntry
}

SPDIndex provides read-only access to mapping between SPD data and SPD names

type SPDIndexRW

type SPDIndexRW interface {
	SPDIndex

	// RegisterName adds new item into name-to-index mapping.
	RegisterName(name string, idx uint32, ifMeta *ipsec.SecurityPolicyDatabases_SPD)

	// UnregisterName removes an item identified by name from mapping
	UnregisterName(name string) (idx uint32, metadata *ipsec.SecurityPolicyDatabases_SPD, exists bool)

	// Clear removes all SPD entries from the mapping.
	Clear()
}

SPDIndexRW is mapping between SPD data (metadata) and SPD entry names.

func NewSPDIndex

func NewSPDIndex(mapping idxvpp.NameToIdxRW) SPDIndexRW

NewSPDIndex creates new instance of spdIndex.

Jump to

Keyboard shortcuts

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