Struct greenhook::UNotifyEventRequest
source · pub struct UNotifyEventRequest { /* private fields */ }
Expand description
UNotifyEventRequest is the type of parameter that user’s function would get.
Implementations§
source§impl UNotifyEventRequest
impl UNotifyEventRequest
sourcepub fn get_request(&self) -> &ScmpNotifReq
pub fn get_request(&self) -> &ScmpNotifReq
Returns the unotify request (libseccomp::ScmpNotifReq
) of
this event.
sourcepub unsafe fn continue_syscall(&self) -> ScmpNotifResp
pub unsafe fn continue_syscall(&self) -> ScmpNotifResp
Let the kernel continue the syscall.
Safety
CAUTION! This method is unsafe because it may suffer TOCTOU attack. Please read seccomp_unotify(2) “NOTES/Design goals; use of SECCOMP_USER_NOTIF_FLAG_CONTINUE” before using this method.
sourcepub fn fail_syscall(&self, err: i32) -> ScmpNotifResp
pub fn fail_syscall(&self, err: i32) -> ScmpNotifResp
Returns error to supervised process.
err
parameter should be a number larger than 0.
sourcepub fn return_syscall(&self, val: i64) -> ScmpNotifResp
pub fn return_syscall(&self, val: i64) -> ScmpNotifResp
Returns value to supervised process.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for UNotifyEventRequest
impl Send for UNotifyEventRequest
impl Sync for UNotifyEventRequest
impl Unpin for UNotifyEventRequest
impl UnwindSafe for UNotifyEventRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more