summaryrefslogtreecommitdiff
path: root/maps.bpf.h
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-02-13 10:32:57 +0200
committerPaul Buetow <paul@buetow.org>2024-02-13 10:32:57 +0200
commitc66010e29c49bc1a7e955dfd07ec2a5ad506bfc6 (patch)
tree306bf7ca401f0ae87ebdeb29fe6e608baf632b14 /maps.bpf.h
parenta1b917899d564d681f0dce682583d951e0c8a3ae (diff)
use explicit types
Diffstat (limited to 'maps.bpf.h')
-rw-r--r--maps.bpf.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/maps.bpf.h b/maps.bpf.h
index d0bcb2f..355bba6 100644
--- a/maps.bpf.h
+++ b/maps.bpf.h
@@ -1,15 +1,17 @@
//+build ignore
#define TEMP_MAP_SIZES 1024 // Adjust size as needed
+#define MAX_FILENAME_LENGTH 256
+#define MAX_PROGNAME_LENGTH 16
struct open_event {
- int fd;
- int op_id;
- u32 tid;
+ __s32 fd;
+ __s32 op_id;
+ __u32 tid;
__u64 enter_time;
__u64 exit_time;
- char filename[256];
- char comm[16];
+ char filename[MAX_FILENAME_LENGTH];
+ char comm[MAX_PROGNAME_LENGTH];
};
struct {
@@ -27,9 +29,9 @@ struct {
} open_event_temp_map SEC(".maps");
struct fd_event {
- int fd;
- int op_id;
- u32 tid;
+ __s32 fd;
+ __s32 op_id;
+ __u32 tid;
__u64 enter_time;
__u64 exit_time;
};