bpfprogs

package
v0.0.0-...-0208d45 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0, GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DestroyPrograms

func DestroyPrograms() error

DestroyPrograms detach and destroy all initialized embedded bpf programs

func ListInitPrograms

func ListInitPrograms() []string

ListInitPrograms list initialized embedded Programs.

func Register

func Register(name string, initProg InitProg) error

Types

type BpfHandle

type BpfHandle struct {
	Prog BpfProg
	Init InitProg
}

type BpfProg

type BpfProg interface {
	SetPinPath(pinPath string)
	SetArgs(args []string)

	Load() error

	Attach() error
	Destroy()

	Name() string
	Description() string
	GetArgs() []string

	GetOutputBuf() *ringbuf.Reader
	GetOutputBufPath() string
}

func GetProgram

func GetProgram(name string) (BpfProg, error)

GetProgram Returns the BpfProg if initialized otherwise error

func NewProgram

func NewProgram(name string) (BpfProg, error)

NewProgram initialize the new bpfProg

type InitProg

type InitProg func() (BpfProg, error)

Jump to

Keyboard shortcuts

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