fragmap

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 9 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

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"fragments-map",
	"Initializes fragments bpf map",

	cell.Provide(newFragMap),
)

Cell provides the fragmap.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.

Functions

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. This should only be used from components which aren't capable of using hive - mainly the cilium-dbg. It needs to initialized beforehand via the Cilium Agent.

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. This should only be used from components which aren't capable of using hive - mainly the cilium-dbg. It needs to initialized beforehand via the Cilium Agent.

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.

type Map added in v1.19.0

type Map any

Map is a marker interface for the fragments map. It doesn't provide any functionality to the Cilium Agent because the bpf map is only created by the Cilium Agent for the datapath. It's still provided to be picked up as dependency by the Loader and initialized at startup.

Jump to

Keyboard shortcuts

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