Versions in this module Expand all Collapse all v0 v0.2.1 Feb 27, 2024 Changes in this version + const BPF_PERF_READER_PAGE_CNT + const BPF_PROBE_ENTRY + const BPF_PROBE_RETURN + const XDP_FLAGS_DRV_MODE + const XDP_FLAGS_HW_MODE + const XDP_FLAGS_MASK + const XDP_FLAGS_MODES + const XDP_FLAGS_SKB_MODE + const XDP_FLAGS_UPDATE_IF_NOEXIST + func GetHostByteOrder() binary.ByteOrder + func GetSyscallFnName(name string) string + func GetSyscallPrefix() string + type Module struct + func NewModule(code string, cflags []string) *Module + func (bpf *Module) AttachKprobe(fnName string, fd int, maxActive int) error + func (bpf *Module) AttachKretprobe(fnName string, fd int, maxActive int) error + func (bpf *Module) AttachMatchingUprobes(name, match string, fd, pid int) error + func (bpf *Module) AttachMatchingUretprobes(name, match string, fd, pid int) error + func (bpf *Module) AttachPerfEvent(evType, evConfig int, samplePeriod int, sampleFreq int, ...) error + func (bpf *Module) AttachRawTracepoint(name string, fd int) error + func (bpf *Module) AttachSocketFilter(sockFd, socketFilterFd int) error + func (bpf *Module) AttachTracepoint(name string, fd int) error + func (bpf *Module) AttachUprobe(name, symbol string, fd, pid int) error + func (bpf *Module) AttachUretprobe(name, symbol string, fd, pid int) error + func (bpf *Module) AttachXDP(devName string, fd int) error + func (bpf *Module) AttachXDPWithFlags(devName string, fd int, flags uint32) error + func (bpf *Module) Close() + func (bpf *Module) GetProgramTag(fd int) (tag uint64, err error) + func (bpf *Module) Load(name string, progType int, logLevel, logSize uint) (int, error) + func (bpf *Module) LoadKprobe(name string) (int, error) + func (bpf *Module) LoadNet(name string) (int, error) + func (bpf *Module) LoadPerfEvent(name string) (int, error) + func (bpf *Module) LoadRawTracepoint(name string) (int, error) + func (bpf *Module) LoadSocketFilter(name string) (int, error) + func (bpf *Module) LoadTracepoint(name string) (int, error) + func (bpf *Module) LoadUprobe(name string) (int, error) + func (bpf *Module) RemoveXDP(devName string) error + func (bpf *Module) TableDesc(id uint64) map[string]interface{} + func (bpf *Module) TableId(name string) C.size_t + func (bpf *Module) TableIter() <-chan map[string]interface{} + func (bpf *Module) TableSize() uint64 + type PerfMap struct + func InitPerfMap(table *Table, receiverChan chan []byte, lostChan chan uint64) (*PerfMap, error) + func InitPerfMapWithPageCnt(table *Table, receiverChan chan []byte, lostChan chan uint64, pageCnt int) (*PerfMap, error) + func (pm *PerfMap) Start() + func (pm *PerfMap) Stop() + type Table struct + func NewTable(id C.size_t, module *Module) *Table + func (table *Table) Config() map[string]interface{} + func (table *Table) Delete(key []byte) error + func (table *Table) DeleteAll() error + func (table *Table) DeleteP(key unsafe.Pointer) error + func (table *Table) Get(key []byte) ([]byte, error) + func (table *Table) GetP(key unsafe.Pointer) (unsafe.Pointer, error) + func (table *Table) ID() string + func (table *Table) Iter() *TableIterator + func (table *Table) KeyBytesToStr(key []byte) (string, error) + func (table *Table) KeyStrToBytes(keyStr string) ([]byte, error) + func (table *Table) LeafBytesToStr(leaf []byte) (string, error) + func (table *Table) LeafStrToBytes(leafStr string) ([]byte, error) + func (table *Table) Name() string + func (table *Table) Set(key, leaf []byte) error + func (table *Table) SetP(key, leaf unsafe.Pointer) error + type TableIterator struct + func (it *TableIterator) Err() error + func (it *TableIterator) Key() []byte + func (it *TableIterator) Leaf() []byte + func (it *TableIterator) Next() bool