fragmap

package
v1.18.7 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Overview

Package fragmap represents the BPF map used to associate datagram fragments to the L4 ports of the datagram they belong to, in order to retrieve the full 5-tuple necessary to do L4-based lookups. +groupName=maps

Index

Constants

View Source
const (
	// MapNameIPv4 is the name of the map used to retrieve L4 ports
	// associated to the datagram to which an IPv4 belongs.
	MapNameIPv4 = "cilium_ipv4_frag_datagrams"

	// MapNameIPv6 is the name of the map used to retrieve L4 ports
	// associated to the datagram to which an IPv6 belongs.
	MapNameIPv6 = "cilium_ipv6_frag_datagrams"
)

Variables

This section is empty.

Functions

func InitMap4 added in v1.18.0

func InitMap4(registry *metrics.Registry, mapEntries int) error

InitMap4 creates the IPv4 fragments map in the kernel.

func InitMap6 added in v1.18.0

func InitMap6(registry *metrics.Registry, mapEntries int) error

InitMap6 creates the IPv6 fragments map in the kernel.

func OpenMap4 added in v1.18.0

func OpenMap4(logger *slog.Logger) (*bpf.Map, error)

OpenMap4 opens the pre-initialized IPv4 fragments map for access.

func OpenMap6 added in v1.18.0

func OpenMap6(logger *slog.Logger) (*bpf.Map, error)

OpenMap6 opens the pre-initialized IPv6 fragments map for access.

Types

type FragmentKey4 added in v1.18.0

type FragmentKey4 struct {
	DestAddr   types.IPv4 `align:"daddr"`
	SourceAddr types.IPv4 `align:"saddr"`
	ID         uint16     `align:"id"`
	Proto      uint8      `align:"proto"`
	// contains filtered or unexported fields
}

FragmentKey4 must match 'struct ipv4_frag_id' in "bpf/lib/ipv4.h".

func (*FragmentKey4) NativeID added in v1.18.0

func (k *FragmentKey4) NativeID() uint16

func (*FragmentKey4) New added in v1.18.0

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

func (*FragmentKey4) String added in v1.18.0

func (k *FragmentKey4) String() string

String converts the key into a human-readable string format.

type FragmentKey6 added in v1.18.0

type FragmentKey6 struct {
	ID    uint32 `align:"id"`
	Proto uint8  `align:"proto"`

	SourceAddr types.IPv6 `align:"saddr"`
	DestAddr   types.IPv6 `align:"daddr"`
	// contains filtered or unexported fields
}

FragmentKey6 must match 'struct ipv6_frag_id' in "bpf/lib/ipv6.h".

func (*FragmentKey6) NativeID added in v1.18.0

func (k *FragmentKey6) NativeID() uint32

func (*FragmentKey6) New added in v1.18.0

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

func (*FragmentKey6) String added in v1.18.0

func (k *FragmentKey6) String() string

String converts the key into a human-readable string format.

type FragmentValue4 added in v1.18.0

type FragmentValue4 struct {
	SourcePort uint16 `align:"sport"`
	DestPort   uint16 `align:"dport"`
}

FragmentValue4 must match 'struct ipv4_frag_l4ports' in "bpf/lib/ipv4.h".

func (*FragmentValue4) New added in v1.18.0

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

func (*FragmentValue4) String added in v1.18.0

func (v *FragmentValue4) String() string

String converts the value into a human-readable string format.

type FragmentValue6 added in v1.18.0

type FragmentValue6 struct {
	SourcePort uint16 `align:"sport"`
	DestPort   uint16 `align:"dport"`
}

FragmentValue6 must match 'struct ipv6_frag_l4ports' in "bpf/lib/ipv4.h".

func (*FragmentValue6) New added in v1.18.0

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

func (*FragmentValue6) String added in v1.18.0

func (v *FragmentValue6) String() string

String converts the value into a human-readable string format.

Jump to

Keyboard shortcuts

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