utils

package
v0.0.0-...-3b46a80 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMapFDFromID

func GetMapFDFromID(mapID int) (int, error)

func GetProgFDFromID

func GetProgFDFromID(mapID int) (int, error)

func IsfileExists

func IsfileExists(fname string) bool

func PinObject

func PinObject(objFD uint32, pinPath string) error

func UnPinObject

func UnPinObject(pinPath string) error

Types

type BPFInsn

type BPFInsn struct {
	Code   uint8 // Opcode
	DstReg uint8 // 4 bits: destination register, r0-r10
	SrcReg uint8 // 4 bits: source register, r0-r10
	Off    int16 // Signed offset
	Imm    int32 // Immediate constant
}

func (*BPFInsn) ConvertBPFInstructionToByteStream

func (b *BPFInsn) ConvertBPFInstructionToByteStream() []byte

Converts BPF instruction into bytes

type BpfMapAttr

type BpfMapAttr struct {
	MapFD uint32

	Key   uint64
	Value uint64 // union: value or next_key
	Flags uint64
	// contains filtered or unexported fields
}

type BpfPin

type BpfPin struct {
	Pathname  uintptr
	Fd        uint32
	FileFlags uint32
}

type BpfShowAttr

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

Jump to

Keyboard shortcuts

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