vtep

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Overview

+groupName=maps

Index

Constants

View Source
const (
	// MaxEntries is the maximum number of keys that can be present in the
	// VTEP map.
	MaxEntries = defaults.MaxVTEPDevices

	// Name is the canonical name for the VTEP map on the filesystem.
	Name = "cilium_vtep_map"
)

Variables

View Source
var (
	// VtepMAP is a mapping of all VTEP endpoint MAC, IPs
	VtepMAP = NewMap(Name)
)

Functions

func UpdateVTEPMapping

func UpdateVTEPMapping(newCIDR *cidr.CIDR, newTunnelEndpoint net.IP, vtepMAC mac.MAC) error

Function to update vtep map with VTEP CIDR

Types

type Key

type Key struct {
	IP types.IPv4 `align:"vtep_ip"`
}

Key implements the bpf.MapKey interface.

Must be in sync with struct vtep_key in <bpf/lib/common.h> +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey

func NewKey

func NewKey(ip net.IP) Key

NewKey returns an Key based on the provided IP address and mask.

func (*Key) DeepCopy added in v1.12.0

func (in *Key) DeepCopy() *Key

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Key.

func (*Key) DeepCopyInto added in v1.12.0

func (in *Key) DeepCopyInto(out *Key)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Key) DeepCopyMapKey added in v1.12.0

func (in *Key) DeepCopyMapKey() bpf.MapKey

DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.

func (*Key) GetKeyPtr added in v1.12.0

func (k *Key) GetKeyPtr() unsafe.Pointer

GetKeyPtr returns the unsafe pointer to the BPF key

func (Key) NewValue added in v1.12.0

func (k Key) NewValue() bpf.MapValue

NewValue returns a new empty instance of the structure representing the BPF map value

func (Key) String

func (k Key) String() string

type Map

type Map struct {
	bpf.Map
}

Map represents an VTEP BPF map.

func NewMap

func NewMap(name string) *Map

NewMap instantiates a Map.

type VtepEndpointInfo

type VtepEndpointInfo struct {
	VtepMAC        mac.Uint64MAC `align:"vtep_mac"`
	TunnelEndpoint types.IPv4    `align:"tunnel_endpoint"`
}

VtepEndpointInfo implements the bpf.MapValue interface. It contains the VTEP endpoint MAC and IP. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue

func (*VtepEndpointInfo) DeepCopy added in v1.12.0

func (in *VtepEndpointInfo) DeepCopy() *VtepEndpointInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VtepEndpointInfo.

func (*VtepEndpointInfo) DeepCopyInto added in v1.12.0

func (in *VtepEndpointInfo) DeepCopyInto(out *VtepEndpointInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VtepEndpointInfo) DeepCopyMapValue added in v1.12.0

func (in *VtepEndpointInfo) DeepCopyMapValue() bpf.MapValue

DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.

func (*VtepEndpointInfo) GetValuePtr added in v1.12.0

func (v *VtepEndpointInfo) GetValuePtr() unsafe.Pointer

GetValuePtr returns the unsafe pointer to the BPF value.

func (*VtepEndpointInfo) String

func (v *VtepEndpointInfo) String() string

Jump to

Keyboard shortcuts

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