summaryrefslogtreecommitdiff
path: root/internal/flags
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-02-23 19:47:38 +0200
committerPaul Buetow <paul@buetow.org>2024-02-23 19:47:38 +0200
commit306ebf54a2f270f1cbdf1307ad4c860caad579a9 (patch)
tree6b98cab2a957b0f8836391ea129969efe5b3e4a8 /internal/flags
parente56a65aef99f7ff1c00ccc8b118d2e98c1f1409a (diff)
as of now, only pid filter supported.
Diffstat (limited to 'internal/flags')
-rw-r--r--internal/flags/flags.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/internal/flags/flags.go b/internal/flags/flags.go
index 37797a4..1d2c11e 100644
--- a/internal/flags/flags.go
+++ b/internal/flags/flags.go
@@ -8,13 +8,11 @@ import (
)
type Flags struct {
- UidFilter int
PidFilter int
EventMapSize int
}
func New() (flags Flags) {
- flag.IntVar(&flags.UidFilter, "uid", 0, "Filter for user ID")
flag.IntVar(&flags.PidFilter, "pid", 0, "Filter for processes ID")
flag.IntVar(&flags.EventMapSize, "mapSize", 4096*16, "BPF FD event ring buffer map size")
flag.Parse()
@@ -23,9 +21,6 @@ func New() (flags Flags) {
}
func (flags Flags) SetBPF(bpfModule *bpf.Module) error {
- if err := bpfModule.InitGlobalVariable("UID_FILTER", uint32(flags.UidFilter)); err != nil {
- return fmt.Errorf("unable to set up UID_FILTER global variable: %w", err)
- }
if err := bpfModule.InitGlobalVariable("PID_FILTER", uint32(flags.PidFilter)); err != nil {
return fmt.Errorf("unable to set up PID_FILTER global variable: %w", err)
}