summaryrefslogtreecommitdiff
path: root/types.bpf.h
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-02-16 00:39:50 +0200
committerPaul Buetow <paul@buetow.org>2024-02-16 00:39:50 +0200
commit5818548de594c17e4b6f5cfc3cf25ae0702e2e3d (patch)
tree3bc8a3d2ab0d5e7dcef9ab40f144917e841c638f /types.bpf.h
parent064c2499e887637e270a420a92e17f326c2ab268 (diff)
update Go types
Diffstat (limited to 'types.bpf.h')
-rw-r--r--types.bpf.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/types.bpf.h b/types.bpf.h
new file mode 100644
index 0000000..57feaaa
--- /dev/null
+++ b/types.bpf.h
@@ -0,0 +1,37 @@
+//+build ignore
+
+// These types mirror the Go types from internal/types/types.go
+//
+#define MAX_FILENAME_LENGTH 256
+#define MAX_PROGNAME_LENGTH 16
+
+#define OPENAT_ENTER_OP_ID 1
+#define OPENAT_EXIT_OP_ID 2
+#define CLOSE_ENTER_OP_ID 3
+#define CLOSE_EXIT_OP_ID 4
+
+struct null_event {
+ __u32 op_id;
+ __u32 tid;
+ __u64 time;
+};
+
+struct fd_event {
+ __u32 op_id;
+ __u32 tid;
+ __u64 time;
+ __s32 fd;
+};
+
+struct openat_enter_event {
+ __u32 op_id;
+ __u32 tid;
+ __u64 time;
+ char filename[MAX_FILENAME_LENGTH];
+ char comm[MAX_PROGNAME_LENGTH];
+};
+
+struct flags {
+ __u32 uid_filter;
+};
+