tracingapi

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// 5 arguments + 1 return argument
	MaxArgsSupported = 6
	ReturnArgIndex   = MaxArgsSupported - 1
)
View Source
const (
	ActionPost = 0
	// ActionFollowFd                    = 1 deprecated
	ActionSigKill = 2
	// ActionUnfollowFd                  = 3 deprecated
	ActionOverride = 4
	// ActionCopyFd                      = 5 deprecated
	ActionGetUrl                      = 6
	ActionLookupDns                   = 7
	ActionNoPost                      = 8
	ActionSignal                      = 9
	ActionTrackSock                   = 10
	ActionUntrackSock                 = 11
	ActionNotifyEnforcer              = 12
	ActionCleanupEnforcerNotification = 13
	ActionSet                         = 14
	ActionUpdateState                 = 15
)
View Source
const (
	BPF_OBJ_NAME_LEN = 16
	KSYM_NAME_LEN    = 128
	MODULE_NAME_LEN  = 64
	NETDEV_NAME_LEN  = 16
)
View Source
const (
	EventConfigMaxArgs     = 5
	EventConfigMaxUsdtArgs = 8
	EventConfigMaxRegArgs  = 8
	MaxBTFArgDepth         = 10 // Artificial value for compilation, may be extended
	MaxAccessibleArgs      = 5  // Maximum reachable arg index in function signature. Should match MAX_ACCESSIBLE_ARGS in bpf code.
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigBTFArg added in v1.5.0

type ConfigBTFArg struct {
	Offset        uint32 `align:"offset"`
	IsPointer     uint16 `align:"is_pointer"`
	IsInitialized uint16 `align:"is_initialized"`
}

type ConfigRegArg added in v1.7.0

type ConfigRegArg struct {
	Offset uint16 `align:"offset"`
	Size   uint8  `align:"size"`
	Pad    uint8  `align:"pad"`
}

type ConfigUsdtArg added in v1.6.0

type ConfigUsdtArg struct {
	ValOff    uint64 `align:"val_off"`
	RegOff    uint32 `align:"reg_off"`
	RegIdxOff uint32 `align:"reg_idx_off"`
	Shift     uint8  `align:"shift"`
	Type      uint8  `align:"type"`
	Signed    uint8  `align:"sig"`
	Scale     uint8  `align:"scale"`
	Pad1      uint32 `align:"pad1"`
}

type EventConfig

type EventConfig struct {
	FuncId          uint32                                           `align:"func_id"`
	ArgType         [EventConfigMaxArgs]int32                        `align:"arg"`
	ArgMeta         [EventConfigMaxArgs]uint32                       `align:"arm"`
	ArgTpCtxOff     [EventConfigMaxArgs]uint32                       `align:"off"`
	ArgIndex        [EventConfigMaxArgs]int32                        `align:"idx"`
	Syscall         uint32                                           `align:"syscall"`
	ArgReturnCopy   int32                                            `align:"argreturncopy"`
	ArgReturn       int32                                            `align:"argreturn"`
	ArgReturnAction int32                                            `align:"argreturnaction"`
	PolicyID        uint32                                           `align:"policy_id"`
	Flags           uint32                                           `align:"flags"`
	SelStatsBase    uint32                                           `align:"selector_stats_base"`
	BTFArg          [EventConfigMaxArgs][MaxBTFArgDepth]ConfigBTFArg `align:"btf_arg"`
	UsdtArg         [EventConfigMaxUsdtArgs]ConfigUsdtArg            `align:"usdt_arg"`
	RegArg          [EventConfigMaxRegArgs]ConfigRegArg              `align:"reg_arg"`
}

type MsgGenericCapEffective added in v1.1.0

type MsgGenericCapEffective struct {
	Caps uint64
}

type MsgGenericCapInheritable added in v1.1.0

type MsgGenericCapInheritable struct {
	Caps uint64
}

type MsgGenericCapPermitted added in v1.1.0

type MsgGenericCapPermitted struct {
	Caps uint64
}

type MsgGenericKernelCapType added in v1.1.0

type MsgGenericKernelCapType struct {
	Caps uint64
}

type MsgGenericKprobe

type MsgGenericKprobe struct {
	Common        processapi.MsgCommon       `align:"common"`
	ProcessKey    processapi.MsgExecveKey    `align:"current"`
	Namespaces    processapi.MsgNamespaces   `align:"ns"`
	Capabilities  processapi.MsgCapabilities `align:"caps"`
	FuncId        uint64                     `align:"func_id"`
	RetProbeId    uint64                     `align:"retprobe_id"`
	ActionId      uint64                     `align:"action"`
	ActionArgId   uint32                     `align:"action_arg_id"`
	Tid           uint32                     `align:"tid"` // The recorded TID that triggered the event
	KernelStackID int64                      `align:"kernel_stack_id"`
	UserStackID   int64                      `align:"user_stack_id"`
}

func (MsgGenericKprobe) HasKernelStack added in v1.7.0

func (m MsgGenericKprobe) HasKernelStack() bool

func (MsgGenericKprobe) HasUserStack added in v1.7.0

func (m MsgGenericKprobe) HasUserStack() bool

type MsgGenericKprobeArg

type MsgGenericKprobeArg interface {
	GetIndex() uint64
	IsReturnArg() bool
}

type MsgGenericKprobeArgBpfAttr

type MsgGenericKprobeArgBpfAttr struct {
	Index    uint64
	ProgType uint32
	InsnCnt  uint32
	ProgName string
	Label    string
}

func (MsgGenericKprobeArgBpfAttr) GetIndex

func (m MsgGenericKprobeArgBpfAttr) GetIndex() uint64

func (MsgGenericKprobeArgBpfAttr) IsReturnArg

func (m MsgGenericKprobeArgBpfAttr) IsReturnArg() bool

type MsgGenericKprobeArgBpfMap added in v0.8.3

type MsgGenericKprobeArgBpfMap struct {
	MapType    uint32
	Index      uint64
	KeySize    uint32
	ValueSize  uint32
	MaxEntries uint32
	MapName    string
	Label      string
}

func (MsgGenericKprobeArgBpfMap) GetIndex added in v0.8.3

func (m MsgGenericKprobeArgBpfMap) GetIndex() uint64

func (MsgGenericKprobeArgBpfMap) IsReturnArg added in v0.8.3

func (m MsgGenericKprobeArgBpfMap) IsReturnArg() bool

type MsgGenericKprobeArgBpfProg added in v1.6.0

type MsgGenericKprobeArgBpfProg struct {
	Index    uint64
	ProgType uint32
	InsnCnt  uint32
	ProgName string
	Label    string
}

func (MsgGenericKprobeArgBpfProg) GetIndex added in v1.6.0

func (m MsgGenericKprobeArgBpfProg) GetIndex() uint64

func (MsgGenericKprobeArgBpfProg) IsReturnArg added in v1.6.0

func (m MsgGenericKprobeArgBpfProg) IsReturnArg() bool

type MsgGenericKprobeArgBytes

type MsgGenericKprobeArgBytes struct {
	Index    uint64
	OrigSize uint64 // if len(Value) < OrigSize, then the result was truncated
	Value    []byte
	Label    string
}

func (MsgGenericKprobeArgBytes) GetIndex

func (m MsgGenericKprobeArgBytes) GetIndex() uint64

func (MsgGenericKprobeArgBytes) IsReturnArg

func (m MsgGenericKprobeArgBytes) IsReturnArg() bool

type MsgGenericKprobeArgCapEffective added in v1.1.0

type MsgGenericKprobeArgCapEffective struct {
	Index uint64
	Caps  uint64
	Label string
}

func (MsgGenericKprobeArgCapEffective) GetIndex added in v1.1.0

func (MsgGenericKprobeArgCapEffective) IsReturnArg added in v1.1.0

func (m MsgGenericKprobeArgCapEffective) IsReturnArg() bool

type MsgGenericKprobeArgCapInheritable added in v1.1.0

type MsgGenericKprobeArgCapInheritable struct {
	Index uint64
	Caps  uint64
	Label string
}

func (MsgGenericKprobeArgCapInheritable) GetIndex added in v1.1.0

func (MsgGenericKprobeArgCapInheritable) IsReturnArg added in v1.1.0

func (m MsgGenericKprobeArgCapInheritable) IsReturnArg() bool

type MsgGenericKprobeArgCapPermitted added in v1.1.0

type MsgGenericKprobeArgCapPermitted struct {
	Index uint64
	Caps  uint64
	Label string
}

func (MsgGenericKprobeArgCapPermitted) GetIndex added in v1.1.0

func (MsgGenericKprobeArgCapPermitted) IsReturnArg added in v1.1.0

func (m MsgGenericKprobeArgCapPermitted) IsReturnArg() bool

type MsgGenericKprobeArgCapability added in v0.8.3

type MsgGenericKprobeArgCapability struct {
	Index uint64
	Value int32
	Pad   int32
	Label string
}

func (MsgGenericKprobeArgCapability) GetIndex added in v0.8.3

func (MsgGenericKprobeArgCapability) IsReturnArg added in v0.8.3

func (m MsgGenericKprobeArgCapability) IsReturnArg() bool

type MsgGenericKprobeArgCred

type MsgGenericKprobeArgCred struct {
	Index      uint64
	Uid        uint32
	Gid        uint32
	Suid       uint32
	Sgid       uint32
	Euid       uint32
	Egid       uint32
	FSuid      uint32
	FSgid      uint32
	SecureBits uint32
	Pad        uint32
	Cap        processapi.MsgCapabilities
	UserNs     processapi.MsgUserNamespace
	Label      string
}

func (MsgGenericKprobeArgCred) GetIndex

func (m MsgGenericKprobeArgCred) GetIndex() uint64

func (MsgGenericKprobeArgCred) IsReturnArg

func (m MsgGenericKprobeArgCred) IsReturnArg() bool

type MsgGenericKprobeArgError added in v1.7.0

type MsgGenericKprobeArgError struct {
	Index   uint64
	Message string
	Label   string
}

func (MsgGenericKprobeArgError) GetIndex added in v1.7.0

func (m MsgGenericKprobeArgError) GetIndex() uint64

func (MsgGenericKprobeArgError) IsReturnArg added in v1.7.0

func (m MsgGenericKprobeArgError) IsReturnArg() bool

type MsgGenericKprobeArgFile

type MsgGenericKprobeArgFile struct {
	Index      uint64
	Value      string
	Flags      uint32
	Permission uint16
	Label      string
}

func (MsgGenericKprobeArgFile) GetIndex

func (m MsgGenericKprobeArgFile) GetIndex() uint64

func (MsgGenericKprobeArgFile) IsReturnArg

func (m MsgGenericKprobeArgFile) IsReturnArg() bool

type MsgGenericKprobeArgInt

type MsgGenericKprobeArgInt struct {
	Index         uint64
	Value         int32
	UserSpaceType int32
	Label         string
}

func (MsgGenericKprobeArgInt) GetIndex

func (m MsgGenericKprobeArgInt) GetIndex() uint64

func (MsgGenericKprobeArgInt) IsReturnArg

func (m MsgGenericKprobeArgInt) IsReturnArg() bool

type MsgGenericKprobeArgKernelCapType added in v1.1.0

type MsgGenericKprobeArgKernelCapType struct {
	Index uint64
	Caps  uint64
	Label string
}

func (MsgGenericKprobeArgKernelCapType) GetIndex added in v1.1.0

func (MsgGenericKprobeArgKernelCapType) IsReturnArg added in v1.1.0

func (m MsgGenericKprobeArgKernelCapType) IsReturnArg() bool

type MsgGenericKprobeArgKernelModule added in v1.0.0

type MsgGenericKprobeArgKernelModule struct {
	Index  uint64
	Name   string
	Taints uint64
	Label  string
}

func (MsgGenericKprobeArgKernelModule) GetIndex added in v1.0.0

func (MsgGenericKprobeArgKernelModule) IsReturnArg added in v1.0.0

func (m MsgGenericKprobeArgKernelModule) IsReturnArg() bool

type MsgGenericKprobeArgLinuxBinprm added in v1.1.0

type MsgGenericKprobeArgLinuxBinprm struct {
	Index      uint64
	Value      string
	Flags      uint32
	Permission uint16
	Label      string
}

func (MsgGenericKprobeArgLinuxBinprm) GetIndex added in v1.1.0

func (MsgGenericKprobeArgLinuxBinprm) IsReturnArg added in v1.1.0

func (m MsgGenericKprobeArgLinuxBinprm) IsReturnArg() bool

type MsgGenericKprobeArgLoadModule added in v1.0.0

type MsgGenericKprobeArgLoadModule struct {
	Index  uint64
	SigOk  uint32
	Taints uint64
	Name   string
	Label  string
}

func (MsgGenericKprobeArgLoadModule) GetIndex added in v1.0.0

func (MsgGenericKprobeArgLoadModule) IsReturnArg added in v1.0.0

func (m MsgGenericKprobeArgLoadModule) IsReturnArg() bool

type MsgGenericKprobeArgLong added in v1.1.0

type MsgGenericKprobeArgLong struct {
	Index uint64
	Value int64
	Label string
}

func (MsgGenericKprobeArgLong) GetIndex added in v1.1.0

func (m MsgGenericKprobeArgLong) GetIndex() uint64

func (MsgGenericKprobeArgLong) IsReturnArg added in v1.1.0

func (m MsgGenericKprobeArgLong) IsReturnArg() bool

type MsgGenericKprobeArgNetDev added in v1.1.0

type MsgGenericKprobeArgNetDev struct {
	Index uint64
	Name  string
	Label string
}

func (MsgGenericKprobeArgNetDev) GetIndex added in v1.1.0

func (m MsgGenericKprobeArgNetDev) GetIndex() uint64

func (MsgGenericKprobeArgNetDev) IsReturnArg added in v1.1.0

func (m MsgGenericKprobeArgNetDev) IsReturnArg() bool

type MsgGenericKprobeArgPath

type MsgGenericKprobeArgPath struct {
	Index      uint64
	Value      string
	Flags      uint32
	Permission uint16
	Label      string
}

func (MsgGenericKprobeArgPath) GetIndex

func (m MsgGenericKprobeArgPath) GetIndex() uint64

func (MsgGenericKprobeArgPath) IsReturnArg

func (m MsgGenericKprobeArgPath) IsReturnArg() bool

type MsgGenericKprobeArgPerfEvent

type MsgGenericKprobeArgPerfEvent struct {
	Index       uint64
	KprobeFunc  string
	Type        uint32
	Config      uint64
	ProbeOffset uint64
	Label       string
}

func (MsgGenericKprobeArgPerfEvent) GetIndex

func (m MsgGenericKprobeArgPerfEvent) GetIndex() uint64

func (MsgGenericKprobeArgPerfEvent) IsReturnArg

func (m MsgGenericKprobeArgPerfEvent) IsReturnArg() bool

type MsgGenericKprobeArgSize

type MsgGenericKprobeArgSize struct {
	Index uint64
	Value uint64
	Label string
}

func (MsgGenericKprobeArgSize) GetIndex

func (m MsgGenericKprobeArgSize) GetIndex() uint64

func (MsgGenericKprobeArgSize) IsReturnArg

func (m MsgGenericKprobeArgSize) IsReturnArg() bool

type MsgGenericKprobeArgSkb

type MsgGenericKprobeArgSkb struct {
	Index       uint64
	Family      uint16
	Hash        uint32
	Len         uint32
	Priority    uint32
	Mark        uint32
	Saddr       string
	Daddr       string
	Sport       uint32
	Dport       uint32
	Proto       uint32
	SecPathLen  uint32
	SecPathOLen uint32
	Label       string
}

func (MsgGenericKprobeArgSkb) GetIndex

func (m MsgGenericKprobeArgSkb) GetIndex() uint64

func (MsgGenericKprobeArgSkb) IsReturnArg

func (m MsgGenericKprobeArgSkb) IsReturnArg() bool

type MsgGenericKprobeArgSock

type MsgGenericKprobeArgSock struct {
	Index    uint64
	Family   uint16
	Type     uint16
	Protocol uint16
	Mark     uint32
	Priority uint32
	Saddr    string
	Daddr    string
	Sport    uint32
	Dport    uint32
	Sockaddr uint64
	Label    string
	State    uint8
}

func (MsgGenericKprobeArgSock) GetIndex

func (m MsgGenericKprobeArgSock) GetIndex() uint64

func (MsgGenericKprobeArgSock) IsReturnArg

func (m MsgGenericKprobeArgSock) IsReturnArg() bool

type MsgGenericKprobeArgSockaddr added in v1.4.0

type MsgGenericKprobeArgSockaddr struct {
	Index     uint64
	SinFamily uint16
	SinPort   uint32
	SinAddr   string
	Label     string
}

func (MsgGenericKprobeArgSockaddr) GetIndex added in v1.4.0

func (m MsgGenericKprobeArgSockaddr) GetIndex() uint64

func (MsgGenericKprobeArgSockaddr) IsReturnArg added in v1.4.0

func (m MsgGenericKprobeArgSockaddr) IsReturnArg() bool

type MsgGenericKprobeArgSockaddrUn added in v1.7.0

type MsgGenericKprobeArgSockaddrUn struct {
	Index  uint64
	Family uint16
	Path   string
	Label  string
}

func (MsgGenericKprobeArgSockaddrUn) GetIndex added in v1.7.0

func (MsgGenericKprobeArgSockaddrUn) IsReturnArg added in v1.7.0

func (m MsgGenericKprobeArgSockaddrUn) IsReturnArg() bool

type MsgGenericKprobeArgString

type MsgGenericKprobeArgString struct {
	Index uint64
	Value string
	Label string
}

func (MsgGenericKprobeArgString) GetIndex

func (m MsgGenericKprobeArgString) GetIndex() uint64

func (MsgGenericKprobeArgString) IsReturnArg

func (m MsgGenericKprobeArgString) IsReturnArg() bool

type MsgGenericKprobeArgUInt added in v0.8.3

type MsgGenericKprobeArgUInt struct {
	Index uint64
	Value uint32
	Label string
}

func (MsgGenericKprobeArgUInt) GetIndex added in v0.8.3

func (m MsgGenericKprobeArgUInt) GetIndex() uint64

func (MsgGenericKprobeArgUInt) IsReturnArg added in v0.8.3

func (m MsgGenericKprobeArgUInt) IsReturnArg() bool

type MsgGenericKprobeArgUserNamespace added in v0.8.3

type MsgGenericKprobeArgUserNamespace struct {
	Index  uint64
	Level  int32
	Uid    uint32
	Gid    uint32
	NsInum uint32
	Label  string
}

func (MsgGenericKprobeArgUserNamespace) GetIndex added in v0.8.3

func (MsgGenericKprobeArgUserNamespace) IsReturnArg added in v0.8.3

func (m MsgGenericKprobeArgUserNamespace) IsReturnArg() bool

type MsgGenericKprobeBpfAttr

type MsgGenericKprobeBpfAttr struct {
	ProgType uint32
	InsnCnt  uint32
	ProgName [BPF_OBJ_NAME_LEN]byte
}

type MsgGenericKprobeBpfMap added in v0.8.3

type MsgGenericKprobeBpfMap struct {
	MapType    uint32
	KeySize    uint32
	ValueSize  uint32
	MaxEntries uint32
	MapName    [BPF_OBJ_NAME_LEN]byte
}

type MsgGenericKprobeBpfProg added in v1.6.0

type MsgGenericKprobeBpfProg struct {
	ProgType uint32
	InsnCnt  uint32
	ProgName [BPF_OBJ_NAME_LEN]byte
}

type MsgGenericKprobeCapability added in v0.8.3

type MsgGenericKprobeCapability struct {
	Value int32
	Pad   int32
}

type MsgGenericKprobeLinuxBinprm added in v1.1.0

type MsgGenericKprobeLinuxBinprm struct {
	Value string
}

type MsgGenericKprobeNetDev added in v1.1.0

type MsgGenericKprobeNetDev struct {
	OrigSize uint64 // if len(Value) < OrigSize, then the result was truncated
	Name     []byte
}

type MsgGenericKprobePerfEvent

type MsgGenericKprobePerfEvent struct {
	KprobeFunc  [KSYM_NAME_LEN]byte
	Config      uint64
	ProbeOffset uint64
	Type        uint32
	Pad         uint32
}

type MsgGenericKprobeSkb

type MsgGenericKprobeSkb struct {
	Tuple       MsgGenericKprobeTuple
	Hash        uint32
	Len         uint32
	Priority    uint32
	Mark        uint32
	SecPathLen  uint32
	SecPathOLen uint32
}

type MsgGenericKprobeSock

type MsgGenericKprobeSock struct {
	Tuple    MsgGenericKprobeTuple
	Sockaddr uint64
	Mark     uint32
	Priority uint32
	Type     uint16
	State    uint8
	Pad      [5]uint8
}

type MsgGenericKprobeSockaddr added in v1.4.0

type MsgGenericKprobeSockaddr struct {
	SinFamily uint16
	SinPort   uint16
	Pad       uint32
	SinAddr   [2]uint64
}

type MsgGenericKprobeSockaddrUn added in v1.7.0

type MsgGenericKprobeSockaddrUn struct {
	Family     uint16
	IsAbstract bool
	PathLen    uint8
	Path       [108]byte
}

type MsgGenericKprobeTuple added in v0.10.0

type MsgGenericKprobeTuple struct {
	Saddr    [2]uint64
	Daddr    [2]uint64
	Sport    uint16
	Dport    uint16
	Protocol uint16
	Family   uint16
}

type MsgGenericKprobeUnix

type MsgGenericKprobeUnix struct {
	Common       processapi.MsgCommon
	ProcessKey   processapi.MsgExecveKey
	Namespaces   processapi.MsgNamespaces
	Capabilities processapi.MsgCapabilities
	Id           uint64
	Action       uint64
	FuncName     string
	Args         []MsgGenericKprobeArg
}

type MsgGenericLoadModule added in v1.0.0

type MsgGenericLoadModule struct {
	SigOk  uint32
	Pad    uint32
	Taints uint64
	Name   [MODULE_NAME_LEN]byte
}

type MsgGenericSyscallID added in v1.2.1

type MsgGenericSyscallID struct {
	ID  uint32
	ABI string
}

type MsgGenericTracepoint

type MsgGenericTracepoint struct {
	Common        processapi.MsgCommon       `align:"common"`
	ProcessKey    processapi.MsgExecveKey    `align:"current"`
	Namespaces    processapi.MsgNamespaces   `align:"ns"`
	Capabilities  processapi.MsgCapabilities `align:"caps"`
	FuncId        int64                      `align:"func_id"`
	RetProbeId    uint64                     `align:"retprobe_id"`
	ActionId      uint64                     `align:"action"`
	ActionArgId   uint32                     `align:"action_arg_id"`
	Tid           uint32                     `align:"tid"` // The recorded TID that triggered the event
	KernelStackID int64                      `align:"kernel_stack_id"`
	UserStackID   int64                      `align:"user_stack_id"`
}

type MsgGenericTracepointArg

type MsgGenericTracepointArg any

type MsgGenericUserNamespace added in v0.11.0

type MsgGenericUserNamespace struct {
	Level  int32
	Uid    uint32
	Gid    uint32
	NsInum uint32
}

type MsgLoader added in v0.9.0

type MsgLoader struct {
	Common      processapi.MsgCommon
	ProcessKey  processapi.MsgExecveKey
	Pid         uint32
	BuildIdSize uint32
	PathSize    uint32
	BuildId     [20]byte
	Path        [4096]byte
}

Jump to

Keyboard shortcuts

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