Struct libseccomp::ScmpNotifReq
source · [−]#[non_exhaustive]pub struct ScmpNotifReq {
pub id: u64,
pub pid: u32,
pub flags: u32,
pub data: ScmpNotifData,
}
Expand description
Represents a userspace notification request.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: u64
Notification ID
pid: u32
Process that triggered the notification event
flags: u32
Filter flags (see seccomp(2))
data: ScmpNotifData
System call context that triggered the notification
Implementations
sourceimpl ScmpNotifReq
impl ScmpNotifReq
sourcepub fn receive(fd: ScmpFd) -> Result<Self, SeccompError>
pub fn receive(fd: ScmpFd) -> Result<Self, SeccompError>
Retrieves a userspace notification from a filter whose
crate::ScmpAction::Notify
action has triggered.
The caller is expected to process the notification and return a
response via ScmpNotifResp::respond()
. Each invocation of
this function returns one notification.
As multiple notifications may be pending at any time, this function is
normally called within a polling loop.
This function returns a userspace notification request.
This function corresponds to
seccomp_notify_receive
.
Arguments
fd
- A file descriptor for the userspace notification
Errors
If an issue is encountered getting a notification request, an error will be returned.
Trait Implementations
sourceimpl Clone for ScmpNotifReq
impl Clone for ScmpNotifReq
sourcefn clone(&self) -> ScmpNotifReq
fn clone(&self) -> ScmpNotifReq
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ScmpNotifReq
impl Debug for ScmpNotifReq
sourceimpl Hash for ScmpNotifReq
impl Hash for ScmpNotifReq
sourceimpl PartialEq<ScmpNotifReq> for ScmpNotifReq
impl PartialEq<ScmpNotifReq> for ScmpNotifReq
sourcefn eq(&self, other: &ScmpNotifReq) -> bool
fn eq(&self, other: &ScmpNotifReq) -> bool
impl Copy for ScmpNotifReq
impl Eq for ScmpNotifReq
impl StructuralEq for ScmpNotifReq
impl StructuralPartialEq for ScmpNotifReq
Auto Trait Implementations
impl RefUnwindSafe for ScmpNotifReq
impl Send for ScmpNotifReq
impl Sync for ScmpNotifReq
impl Unpin for ScmpNotifReq
impl UnwindSafe for ScmpNotifReq
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more