ipcache

package
v1.15.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 20

Documentation

Overview

+groupName=maps

Index

Constants

View Source
const (
	// MaxEntries is the maximum number of keys that can be present in the
	// RemoteEndpointMap.
	MaxEntries = 512000

	// Name is the canonical name for the IPCache map on the filesystem.
	Name = "cilium_ipcache"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	Prefixlen uint32 `align:"lpm_key"`
	ClusterID uint16 `align:"cluster_id"`
	Pad1      uint8  `align:"pad1"`
	Family    uint8  `align:"family"`
	// represents both IPv6 and IPv4 (in the lowest four bytes)
	IP types.IPv6 `align:"$union0"`
}

Key implements the bpf.MapKey interface.

Must be in sync with struct ipcache_key in <bpf/lib/maps.h>

func NewKey

func NewKey(ip net.IP, mask net.IPMask, clusterID uint16) Key

NewKey returns an Key based on the provided IP address, mask, and ClusterID. The address family is automatically detected

func (*Key) New

func (k *Key) New() bpf.MapKey

func (Key) Prefix

func (k Key) Prefix() netip.Prefix

func (Key) String

func (k Key) String() string

type Map

type Map struct {
	bpf.Map
}

Map represents an IPCache BPF map.

func IPCacheMap

func IPCacheMap() *Map

IPCacheMap gets the ipcache Map singleton. If it has not already been done, this also initializes the Map.

func NewMap

func NewMap(name string) *Map

NewMap instantiates a Map.

type RemoteEndpointInfo

type RemoteEndpointInfo struct {
	SecurityIdentity uint32     `align:"sec_identity"`
	TunnelEndpoint   types.IPv4 `align:"tunnel_endpoint"`

	Key uint8 `align:"key"`
	// contains filtered or unexported fields
}

RemoteEndpointInfo implements the bpf.MapValue interface. It contains the security identity of a remote endpoint.

func (*RemoteEndpointInfo) New

func (v *RemoteEndpointInfo) New() bpf.MapValue

func (*RemoteEndpointInfo) String

func (v *RemoteEndpointInfo) String() string

Jump to

Keyboard shortcuts

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