data

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecodeAs

type DecodeAs uint16

DecodeAs is an enum that encodes the argument types that an eBPF program may write to the shared buffer. In practice they designate either/or a type which is specifically encoded as an argument type in eBPF or a strategy of passing an argument on the submission buffer via some function.

const (
	NONE_T DecodeAs = iota // Default value - the argument does not originate from a decodable buffer.
	INT_T
	UINT_T
	LONG_T
	ULONG_T
	U16_T
	U8_T
	INT_ARR_2_T
	UINT64_ARR_T
	POINTER_T
	BYTES_T
	STR_T
	STR_ARR_T
	SOCK_ADDR_T
	CRED_T
	TIMESPEC_T
)

The types of this section in particular are those possibly submitted in syscall events. Therefore, these should match to the type enum and table in: pkg/ebpf/c/types.h and buffer.h respectively.

const (
	ARGS_ARR_T DecodeAs = iota + 64
	BOOL_T
	FLOAT_T
	FLOAT64_T
	MAX_TRACEE_DECODES
)

These types are in a separate section since they are not defined as enums in the ebpf code. That is because they are unused by syscalls. Instead, they designate a functional submission strategy. (ie. ARGS_ARR_T is submitted by the strategy defined in buffer.h:save_args_str_arr_to_buf).

const (
	USER_DEFINED_DECODE_BEGIN DecodeAs = 128
	USER_DEFINED_DECODE_END   DecodeAs = 255
)

The maximum value for decode types is 0xFF. The values from 0x80 to 0xFF are reserved for user defined decode types. This is to allow users to define their own decode types in their own ebpf programs. The values from 0x00 to 0x7F are reserved for tracee.

func (DecodeAs) String

func (d DecodeAs) String() string

Jump to

Keyboard shortcuts

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