pub struct ProgramVersion<'a> { /* private fields */ }
Expand description

A group of eBPF Programs that a user wishes to load.

Implementations

Create a new ProgramVersion from a vector of Programs.

The newly created ProgramVersion should be given to a ProgramGroup for loading. The ProgramVersion encapsulates all the logic for loading, attaching, and returning events from a single clustering of eBPF Programs. Each ProgramVersion should be intended to act as an independent unit, in the absence of other ProgramVersions.

Panics
  • When dropping a ProgramVersion that uses debugfs, if the drop routine cannot reach the correct files in debugfs it will panic.
Example
use oxidebpf::{ProgramVersion, Program, ProgramType};

let program_vec = vec![
    Program::new(
        "sys_ptrace_write",
        &["sys_ptrace"],
    ).syscall(true),
    Program::new(
        "sys_process_vm_writev",
        &["sys_process_vm_writev"],
    ).syscall(true)
];

ProgramVersion::new(program_vec);

Manually specify the perfmap polling interval for this ProgramVersion.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.