Module redbpf_probes::uprobe [−][src]
Expand description
User-space probes.
UProbes are hooks on the entry (uprobe) or exit (uretprobe) of user-space functions. For an overview of UProbes and how they work, see https://www.kernel.org/doc/Documentation/trace/uprobetracer.txt.
Example
Do something when the OpenSSL SSL_write
function is called:
use redbpf_probes::uprobe::prelude::*;
#[uprobe]
fn SSL_write(regs: Registers) {
let buf = regs.parm2() as *const c_void;
let num = regs.parm3() as i32;
// do something with the buffer
// ...
}
Modules
The Uprobe Prelude