tunnel

package
v1.13.5 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 10 Imported by: 38

Documentation

Overview

+groupName=maps

Index

Constants

View Source
const (
	MapName = "cilium_tunnel_map"

	// MaxEntries is the maximum entries in the tunnel endpoint map
	MaxEntries = 65536
)

Variables

This section is empty.

Functions

func SetTunnelMap added in v0.15.7

func SetTunnelMap(m *Map)

SetTunnelMap sets the tunnel map. Only used for testing.

Types

type Map added in v0.15.7

type Map struct {
	*bpf.Map
}

Map implements tunnel connectivity configuration in the BPF datapath.

func NewTunnelMap added in v0.15.7

func NewTunnelMap(mapName string) *Map

NewTunnelMap returns a new tunnel map.

func TunnelMap added in v0.15.7

func TunnelMap() *Map

func (*Map) DeleteTunnelEndpoint added in v0.15.7

func (m *Map) DeleteTunnelEndpoint(prefix net.IP) error

DeleteTunnelEndpoint removes a prefix => tunnel-endpoint mapping

func (*Map) GetTunnelEndpoint added in v0.15.7

func (m *Map) GetTunnelEndpoint(prefix net.IP) (net.IP, error)

GetTunnelEndpoint retrieves a prefix => tunnel-endpoint mapping

func (*Map) SetTunnelEndpoint added in v0.15.7

func (m *Map) SetTunnelEndpoint(encryptKey uint8, nodeID uint16, prefix, endpoint net.IP) error

SetTunnelEndpoint adds/replaces a prefix => tunnel-endpoint mapping

func (*Map) SilentDeleteTunnelEndpoint added in v0.15.7

func (m *Map) SilentDeleteTunnelEndpoint(prefix net.IP) error

SilentDeleteTunnelEndpoint removes a prefix => tunnel-endpoint mapping. If the prefix is not found no error is returned.

type TunnelIP added in v0.15.7

type TunnelIP struct {
	// represents both IPv6 and IPv4 (in the lowest four bytes)
	IP     types.IPv6 `align:"$union0"`
	Family uint8      `align:"family"`
}

+k8s:deepcopy-gen=true

func (*TunnelIP) DeepCopy added in v0.15.7

func (in *TunnelIP) DeepCopy() *TunnelIP

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

func (*TunnelIP) DeepCopyInto added in v0.15.7

func (in *TunnelIP) DeepCopyInto(out *TunnelIP)

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

type TunnelKey added in v0.15.7

type TunnelKey struct {
	TunnelIP
	ClusterID uint8  `align:"cluster_id"`
	Pad       uint16 `align:"pad"`
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapKey

func (*TunnelKey) DeepCopy added in v1.11.14

func (in *TunnelKey) DeepCopy() *TunnelKey

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

func (*TunnelKey) DeepCopyInto added in v1.11.14

func (in *TunnelKey) DeepCopyInto(out *TunnelKey)

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

func (*TunnelKey) DeepCopyMapKey added in v1.11.14

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

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

func (*TunnelKey) GetKeyPtr added in v1.11.14

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

GetKeyPtr returns the unsafe pointer to the BPF key

func (TunnelKey) NewValue added in v1.11.14

func (v TunnelKey) NewValue() bpf.MapValue

func (TunnelKey) String added in v0.15.7

func (k TunnelKey) String() string

String provides a string representation of the TunnelKey.

type TunnelValue added in v0.15.7

type TunnelValue struct {
	TunnelIP
	Key    uint8  `align:"key"`
	NodeID uint16 `align:"node_id"`
}

+k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=github.com/cilium/cilium/pkg/bpf.MapValue

func (*TunnelValue) DeepCopy added in v1.11.14

func (in *TunnelValue) DeepCopy() *TunnelValue

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

func (*TunnelValue) DeepCopyInto added in v1.11.14

func (in *TunnelValue) DeepCopyInto(out *TunnelValue)

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

func (*TunnelValue) DeepCopyMapValue added in v1.11.14

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

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

func (*TunnelValue) GetValuePtr added in v1.11.14

func (k *TunnelValue) GetValuePtr() unsafe.Pointer

GetValuePtr returns the unsafe pointer to the BPF key for users that use TunnelValue as a value in bpf maps

func (TunnelValue) NewValue added in v1.11.14

func (v TunnelValue) NewValue() bpf.MapValue

func (TunnelValue) String added in v0.15.7

func (k TunnelValue) String() string

String provides a string representation of the TunnelValue.

Jump to

Keyboard shortcuts

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