bpf

package
v0.0.0-...-760afed Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BPF_F_INDEX_MASK  = 0xffffffff
	BPF_F_CURRENT_CPU = BPF_F_INDEX_MASK

	RegTmp     = asm.R7
	RegContext = asm.R8
	RegEvent   = asm.R9

	ENTRY_FLAG = 0
	EXIT_FLAG  = 1

	OFFSET_FLAG = int16(iota * 8)
	OFFSET_KTIME
	OFFSET_TPID
	OFFSET_CPU
	OFFSET_IP
	OFFSET_POSARG
	OFFSET_TIMESTAMP
	OFFSET_RETARG
	OFFSET_STACKSIZE
	OFFSET_STACKTRACE
	OFFSET_MAX

	MaxStackSize = 1024
)

Variables

This section is empty.

Functions

func AnyClose

func AnyClose(c Closer)

func ByteOrder

func ByteOrder() binary.ByteOrder

ByteOrder returns the byte order for the CPU's native endianness.

func GetInsn

func GetInsn(eventFD int, argPos int16, argRet int16, flag int64) asm.Instructions

func GetSkbTimestampOffset

func GetSkbTimestampOffset() uint32

Types

type Closer

type Closer interface {
	Close() error
}

type ProgLoader

type ProgLoader struct {
	// contains filtered or unexported fields
}

func LoadTracingProg

func LoadTracingProg(f SkbFunc, ringbufFD int) (ProgLoader, error)

func (*ProgLoader) Close

func (l *ProgLoader) Close()

type RingbufLoader

type RingbufLoader struct {
	// contains filtered or unexported fields
}

func InitRingbuf

func InitRingbuf() (RingbufLoader, error)
func (b *MapLoader) Read() (ringbuf.Record, error) {
	return b.reader.Read()
}

func (*RingbufLoader) BufferSize

func (l *RingbufLoader) BufferSize() int

func (*RingbufLoader) Close

func (l *RingbufLoader) Close()

func (*RingbufLoader) GetFD

func (l *RingbufLoader) GetFD() int

func (*RingbufLoader) Read

func (l *RingbufLoader) Read() (ringbuf.Record, error)

type SkbFunc

type SkbFunc struct {
	FuncName string
	ArgRet   int16
	ArgPos   int16
}

func GetSkbFuncList

func GetSkbFuncList() (funcList []SkbFunc)

Jump to

Keyboard shortcuts

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