Documentation
¶
Index ¶
- Constants
- Variables
- func AttachKprobeMulti(ctx context.Context, bar *pb.ProgressBar, kprobes []Kprobe, a2n Addr2Name) (links []link.Link, ignored int)
- func AttachKprobes(ctx context.Context, bar *pb.ProgressBar, kps []Kprobe, batch uint) (links []link.Link, ignored int)
- func GetBpfHelpers(addr2name Addr2Name) (helpers []string, err error)
- func GetFuncsByPos(funcs Funcs) map[int][]string
- func HaveAvailableFilterFunctions() bool
- func HaveBPFLinkKprobeMulti() bool
- func HaveBPFLinkTracing() bool
- func NewKprober(ctx context.Context, funcs Funcs, coll *ebpf.Collection, a2n Addr2Name, ...) *kprober
- func NewNonSkbFuncsKprober(nonSkbFuncs []string, funcs Funcs, coll *ebpf.Collection) *kprober
- func NewOutput(flags *Flags, printSkbMap, printShinfoMap, printStackMap *ebpf.Map, ...) (*output, error)
- func ParseKallsyms(funcs Funcs, all bool) (Addr2Name, BpfProgName2Addr, error)
- func TraceTC(coll *ebpf.Collection, spec *ebpf.CollectionSpec, opts *ebpf.CollectionOptions, ...) *tracing
- func TraceXDP(coll *ebpf.Collection, spec *ebpf.CollectionSpec, opts *ebpf.CollectionOptions, ...) *tracing
- func TrackSkb(coll *ebpf.Collection, haveFexit, trackSkbClone bool) *skbTracker
- type Addr2Name
- type BpfProgName2Addr
- type Event
- type FilterCfg
- type Flags
- type Funcs
- type Kprobe
- type Meta
- type StackData
- type Tuple
Constants ¶
View Source
const ( OutputMetaMask uint8 = 1 << iota OutputTupleMask OutputSkbMask OutputShinfoMask OutputStackMask OutputCallerMask )
View Source
const ( IsSetMask uint8 = 1 << iota TrackSkbMask TrackSkbByStackidMask TrackXDPMask )
View Source
const ( MaxStackDepth = 50 BackendKprobe = "kprobe" BackendKprobeMulti = "kprobe-multi" )
Variables ¶
View Source
var Version string = "version unknown"
Version is the pwru version and is set at compile time via LDFLAGS-
Functions ¶
func AttachKprobeMulti ¶ added in v1.0.6
func AttachKprobeMulti(ctx context.Context, bar *pb.ProgressBar, kprobes []Kprobe, a2n Addr2Name) (links []link.Link, ignored int)
AttachKprobeMulti attaches kprobe-multi serially.
func AttachKprobes ¶ added in v1.0.6
func AttachKprobes(ctx context.Context, bar *pb.ProgressBar, kps []Kprobe, batch uint) (links []link.Link, ignored int)
AttachKprobes attaches kprobes concurrently.
func GetBpfHelpers ¶ added in v1.0.8
func GetFuncsByPos ¶ added in v0.0.7
func HaveAvailableFilterFunctions ¶ added in v1.0.6
func HaveAvailableFilterFunctions() bool
func HaveBPFLinkKprobeMulti ¶ added in v0.0.7
func HaveBPFLinkKprobeMulti() bool
Very hacky way to check whether multi-link kprobe is supported.
func HaveBPFLinkTracing ¶ added in v1.0.4
func HaveBPFLinkTracing() bool
Very hacky way to check whether tracing link is supported.
func NewKprober ¶ added in v1.0.7
func NewNonSkbFuncsKprober ¶ added in v1.0.7
func NewNonSkbFuncsKprober(nonSkbFuncs []string, funcs Funcs, coll *ebpf.Collection) *kprober
func ParseKallsyms ¶ added in v1.0.6
func ParseKallsyms(funcs Funcs, all bool) (Addr2Name, BpfProgName2Addr, error)
func TraceTC ¶ added in v1.0.4
func TraceTC(coll *ebpf.Collection, spec *ebpf.CollectionSpec, opts *ebpf.CollectionOptions, outputSkb bool, outputShinfo bool, n2a BpfProgName2Addr, ) *tracing
func TraceXDP ¶ added in v1.0.7
func TraceXDP(coll *ebpf.Collection, spec *ebpf.CollectionSpec, opts *ebpf.CollectionOptions, outputSkb bool, outputShinfo bool, n2a BpfProgName2Addr, ) *tracing
func TrackSkb ¶ added in v1.0.7
func TrackSkb(coll *ebpf.Collection, haveFexit, trackSkbClone bool) *skbTracker
Types ¶
type BpfProgName2Addr ¶ added in v1.0.6
type FilterCfg ¶ added in v0.0.2
type Flags ¶
type Flags struct { ShowVersion bool ShowHelp bool KernelBTF string FilterNetns string FilterMark uint32 FilterFunc string FilterNonSkbFuncs []string FilterTrackSkb bool FilterTrackSkbByStackid bool FilterTraceTc bool FilterTraceXdp bool FilterTrackBpfHelpers bool FilterIfname string FilterPcap string FilterKprobeBatch uint OutputTS string OutputMeta bool OutputTuple bool OutputSkb bool OutputShinfo bool OutputStack bool OutputCaller bool OutputLimitLines uint64 OutputFile string OutputJson bool KMods []string AllKMods bool ReadyFile string Backend string }
type StackData ¶ added in v0.0.2
type StackData struct {
IPs [MaxStackDepth]uint64
}
Click to show internal directories.
Click to hide internal directories.