summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-02-10 18:41:48 +0200
committerPaul Buetow <paul@buetow.org>2024-02-10 18:41:48 +0200
commitc6200235b553770221e1ca0b25ca46ed6af96803 (patch)
tree2835c0e93ffff229f01bbbedb8b9d8c657ca93ae /main.go
parentb124de93c6a8f5ef4ee5f6238e6a998243fc4614 (diff)
add open syscall
Diffstat (limited to 'main.go')
-rw-r--r--main.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/main.go b/main.go
index e580ee7..7d4dd8f 100644
--- a/main.go
+++ b/main.go
@@ -15,17 +15,18 @@ import (
)
type openatEvent struct {
- FD int32
- TID uint32
- Filename [256]byte
- Comm [16]byte
+ FD int32
+ SyscallID int32
+ TID uint32
+ Filename [256]byte
+ Comm [16]byte
}
func (e openatEvent) String() string {
filename := e.Filename[:]
comm := e.Comm[:]
- return fmt.Sprintf("tid:%v fd:%v filename:%s, comm:%s",
- e.TID, e.FD, string(filename), string(comm))
+ return fmt.Sprintf("syscall:%d tid:%v fd:%v filename:%s, comm:%s",
+ e.SyscallID, e.TID, e.FD, string(filename), string(comm))
}
func resizeMap(module *bpf.Module, name string, size uint32) error {