Documentation
¶
Index ¶
- type Filter
- func (f *Filter) AddMetrics(ns int) error
- func (f *Filter) AddPid(pid, ns int) error
- func (f *Filter) AddPidNs(pidns, ns int) error
- func (f *Filter) AddSampledSyscall(nr interface{}, ns int, rate uint64) error
- func (f *Filter) AddSyscall(nr interface{}, ns int) error
- func (f *Filter) ApplyDefaults() error
- func (f *Filter) ApplySyscallDefaults(ns int) error
- func (f *Filter) DelPid(pid, ns int) error
- func (f *Filter) DelPidNs(pidns, ns int) error
- func (f *Filter) FilterSelf() error
- func (f Filter) InitFilter(m *elf.Module) error
- func (f *Filter) RemoveMetrics(ns int) error
- func (f *Filter) RemoveSyscall(nr interface{}, ns int) error
- type Rule
- type Type
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter contains all maps and elf modules to read and write filter information to the kernel probe.
func NewFilter ¶
NewFilter initializes the underlying gobpf structures for filling in rule data into the kernel bpf probe.
func (*Filter) AddMetrics ¶ added in v0.1.3
func (*Filter) AddSampledSyscall ¶
func (*Filter) AddSyscall ¶
AddSyscall adds a syscall (either "sys_xxx" or (int)nr) to the filter table.
func (*Filter) ApplyDefaults ¶
func (*Filter) ApplySyscallDefaults ¶
func (*Filter) FilterSelf ¶
func (Filter) InitFilter ¶
InitFilter works like NewFilter, but directly on an Filter instance. good if you want to embed *Filter somewhere else.
func (*Filter) RemoveMetrics ¶ added in v0.1.3
func (*Filter) RemoveSyscall ¶
RemoveSyscall removes a syscall (either "sys_xxx" or (int)nr) from the filter table.
type Rule ¶
type Rule struct {
Type Type
Namespace uint32
Key uint32
// contains filtered or unexported fields
}
Rule represents a rule which can be sent to the kernel probe in the rawest form
type Type ¶
type Type uint16
const ( ModeWhitelist Type = 1 << 0 ModeBlacklist Type = 1 << 1 ModeGlobalWhitelist Type = 1 << 2 ModeGlobalBlacklist Type = 1 << 3 TypeMetrics Type = 1 << 12 TypeSyscall Type = 1 << 13 TypePid Type = 1 << 14 TypePidns Type = 1 << 15 )
These values should only be modified if changes are made to the filtering logic in the kernel bpf.