Enum ProcEvent

Source
pub enum ProcEvent {
    Ack {
        err: u32,
    },
    Fork {
        parent_pid: i32,
        parent_tgid: i32,
        child_pid: i32,
        child_tgid: i32,
    },
    Exec {
        process_pid: i32,
        process_tgid: i32,
    },
    Uid {
        process_pid: i32,
        process_tgid: i32,
        ruid: u32,
        euid: u32,
    },
    Gid {
        process_pid: i32,
        process_tgid: i32,
        rgid: u32,
        egid: u32,
    },
    Sid {
        process_pid: i32,
        process_tgid: i32,
    },
    Ptrace {
        process_pid: i32,
        process_tgid: i32,
        tracer_pid: i32,
        tracer_tgid: i32,
    },
    Comm {
        process_pid: i32,
        process_tgid: i32,
        comm: [u8; 16],
    },
    Coredump {
        process_pid: i32,
        process_tgid: i32,
        parent_pid: i32,
        parent_tgid: i32,
    },
    Exit {
        process_pid: i32,
        process_tgid: i32,
        exit_code: u32,
        exit_signal: u32,
        parent_pid: i32,
        parent_tgid: i32,
    },
}
Expand description

Ergonomic enum for process event data.

Variants§

§

Ack

Acknowledgement event, typically for PROC_EVENT_NONE.

Fields

§err: u32

Error code (0 for success).

§

Fork

Fork event, triggered when a process forks.

Fields

§parent_pid: i32

Parent process PID.

§parent_tgid: i32

Parent process TGID (thread group ID).

§child_pid: i32

Child process PID.

§child_tgid: i32

Child process TGID.

§

Exec

Exec event, triggered when a process calls exec().

Fields

§process_pid: i32

Process PID.

§process_tgid: i32

Process TGID.

§

Uid

UID change event, triggered when a process changes its UID.

Fields

§process_pid: i32

Process PID.

§process_tgid: i32

Process TGID.

§ruid: u32

Real UID.

§euid: u32

Effective UID.

§

Gid

GID change event, triggered when a process changes its GID.

Fields

§process_pid: i32

Process PID.

§process_tgid: i32

Process TGID.

§rgid: u32

Real GID.

§egid: u32

Effective GID.

§

Sid

SID change event, triggered when a process changes its session ID.

Fields

§process_pid: i32

Process PID.

§process_tgid: i32

Process TGID.

§

Ptrace

Ptrace event, triggered when a process is traced.

Fields

§process_pid: i32

Process PID.

§process_tgid: i32

Process TGID.

§tracer_pid: i32

Tracer process PID.

§tracer_tgid: i32

Tracer process TGID.

§

Comm

Comm event, triggered when a process changes its command name.

Fields

§process_pid: i32

Process PID.

§process_tgid: i32

Process TGID.

§comm: [u8; 16]

Command name (null-terminated, max 16 bytes).

§

Coredump

Coredump event, triggered when a process dumps core.

Fields

§process_pid: i32

Process PID.

§process_tgid: i32

Process TGID.

§parent_pid: i32

Parent process PID.

§parent_tgid: i32

Parent process TGID.

§

Exit

Exit event, triggered when a process exits.

Fields

§process_pid: i32

Process PID.

§process_tgid: i32

Process TGID.

§exit_code: u32

Exit code.

§exit_signal: u32

Exit signal.

§parent_pid: i32

Parent process PID.

§parent_tgid: i32

Parent process TGID.

Trait Implementations§

Source§

impl Clone for ProcEvent

Source§

fn clone(&self) -> ProcEvent

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProcEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Size for ProcEvent

Source§

fn unpadded_size(&self) -> usize

Size of the unpadded data structure. This will usually only be unaligned for variable length types like strings or byte buffers.
Source§

fn padded_size(&self) -> usize

Get the size of the payload and align it to the required netlink byte alignment.
Source§

impl Copy for ProcEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.