Struct aya::programs::UProbe [−][src]
pub struct UProbe { /* fields omitted */ }
Expand description
An user space probe.
User probes are eBPF programs that can be attached to any userspace function. They can be of two kinds:
uprobe
: get attached to the start of the target functionsuretprobe
: get attached to the return address of the target functions
Implementations
Loads the program inside the kernel.
See also Program::load
.
Returns UProbe
if the program is a uprobe
, or URetProbe
if the
program is a uretprobe
.
Attaches the program.
Attaches the uprobe to the function fn_name
defined in the target
.
If offset
is non-zero, it is added to the address of the target
function. If pid
is not None
, the program executes only when the target
function is executed by the given pid
.
The target
argument can be an absolute path to a binary or library, or
a library name (eg: "libc"
).
If the program is an uprobe
, it is attached to the start address of the target
function. Instead if the program is a kretprobe
, it is attached to the return address of
the target function.
Trait Implementations
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
Auto Trait Implementations
impl !RefUnwindSafe for UProbe
impl !UnwindSafe for UProbe