Struct aya::programs::RawTracePoint
source · [−]pub struct RawTracePoint { /* private fields */ }
Expand description
A program that can be attached at a pre-defined kernel trace point, but also has an access to kernel internal arguments of trace points, which differentiates them from traditional tracepoint eBPF programs.
The kernel provides a set of pre-defined trace points that eBPF programs can
be attached to. See/sys/kernel/debug/tracing/events
for a list of which
events can be traced.
Minimum kernel version
The minimum kernel version required to use this feature is 4.17.
Examples
use aya::{Bpf, programs::RawTracePoint};
use std::convert::TryInto;
let program: &mut RawTracePoint = bpf.program_mut("sys_enter").unwrap().try_into()?;
program.load()?;
program.attach("sys_enter")?;
Implementations
sourceimpl RawTracePoint
impl RawTracePoint
sourcepub fn load(&mut self) -> Result<(), ProgramError>
pub fn load(&mut self) -> Result<(), ProgramError>
Loads the program inside the kernel.
See also Program::load
.
Trait Implementations
sourceimpl Debug for RawTracePoint
impl Debug for RawTracePoint
sourceimpl ProgramFd for RawTracePoint
impl ProgramFd for RawTracePoint
sourceimpl ProgramFd for &mut RawTracePoint
impl ProgramFd for &mut RawTracePoint
sourceimpl<'a> TryFrom<&'a Program> for &'a RawTracePoint
impl<'a> TryFrom<&'a Program> for &'a RawTracePoint
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(program: &'a Program) -> Result<&'a RawTracePoint, ProgramError>
fn try_from(program: &'a Program) -> Result<&'a RawTracePoint, ProgramError>
Performs the conversion.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut RawTracePoint
impl<'a> TryFrom<&'a mut Program> for &'a mut RawTracePoint
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(
program: &'a mut Program
) -> Result<&'a mut RawTracePoint, ProgramError>
fn try_from(
program: &'a mut Program
) -> Result<&'a mut RawTracePoint, ProgramError>
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for RawTracePoint
impl !Send for RawTracePoint
impl !Sync for RawTracePoint
impl Unpin for RawTracePoint
impl !UnwindSafe for RawTracePoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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