From 984441118587f53663a705bc2ce77090c05b53a4 Mon Sep 17 00:00:00 2001 From: jxy_git Date: Wed, 21 Jun 2023 15:32:48 +0800 Subject: [PATCH] Define the structure to store key information in the file tracking process --- observation/src/filesnoop/filesnoop.bpf.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/observation/src/filesnoop/filesnoop.bpf.c b/observation/src/filesnoop/filesnoop.bpf.c index 2a60e1fc..479f0cf7 100644 --- a/observation/src/filesnoop/filesnoop.bpf.c +++ b/observation/src/filesnoop/filesnoop.bpf.c @@ -17,3 +17,17 @@ const volatile int target_op = F_ALL; #define MAX_ENTRIES 1024 char target_filename[FSFILENAME_MAX] = {}; + +struct key_t { + pid_t tid; + int fd; +}; + +struct fsfilename { + char name[FSFILENAME_MAX]; +}; + +struct print_value { + struct key_t key; + struct fsfilename *filename; +}; -- Gitee