diff options
Diffstat (limited to 'fs-tracer-common')
-rw-r--r-- | fs-tracer-common/src/lib.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fs-tracer-common/src/lib.rs b/fs-tracer-common/src/lib.rs index 3615dec..fb36b74 100644 --- a/fs-tracer-common/src/lib.rs +++ b/fs-tracer-common/src/lib.rs @@ -15,6 +15,7 @@ use crate::vmlinux::umode_t; pub enum SyscallInfo { Write(WriteSyscallBPF), Open(OpenSyscallBPF), + Close(CloseSyscallBPF), } #[derive(Clone, Copy)] @@ -67,3 +68,23 @@ impl fmt::Debug for OpenSyscallBPF { .finish() } } + +#[derive(Clone, Copy)] +pub struct CloseSyscallBPF { + pub pid: u32, + pub fd: c_int, + + pub ret: c_long, +} + +unsafe impl Sync for CloseSyscallBPF {} + +impl fmt::Debug for CloseSyscallBPF { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.debug_struct("CloseSyscallBPF") + .field("pid", &self.pid) + .field("fd", &self.fd) + .field("ret", &self.ret) + .finish() + } +} |