[−][src]Struct bcc::BPF
The BPF struct contains the compiled BPF code, any probes or programs that
have been attached, and can provide access to a userspace view of the
results of the running BPF programs.
Implementations
impl BPF[src]
pub fn new(code: &str) -> Result<BPF, BccError>[src]
code is a string containing C code. See https://github.com/iovisor/bcc for examples
pub fn table(&self, name: &str) -> Table[src]
Get access to a named table within the running BPF program.
pub fn load_net(&mut self, name: &str) -> Result<File, BccError>[src]
Load a network traffic-control action which has the provided name within the BPF program
pub fn load(
&mut self,
name: &str,
prog_type: u32,
log_level: i32,
log_size: u32
) -> Result<File, BccError>[src]
&mut self,
name: &str,
prog_type: u32,
log_level: i32,
log_size: u32
) -> Result<File, BccError>
load the named BPF program from within the compiled BPF code
pub fn get_syscall_prefix(&mut self) -> String[src]
Returns the syscall prefix for the running kernel
pub fn get_syscall_fnname(&mut self, name: &str) -> String[src]
Converts a syscall function name to a fully-qualified function name
pub fn get_kprobe_functions(
&mut self,
event_re: &str
) -> Result<Vec<String>, BccError>[src]
&mut self,
event_re: &str
) -> Result<Vec<String>, BccError>
Returns a list of kernel functions matching a provided regular expression
pub fn ksymname(&mut self, name: &str) -> Result<u64, BccError>[src]
Resulves the name to a kernel symbol
pub fn support_raw_tracepoint(&mut self) -> bool[src]
Returns true if raw tracepoints are supported by the running kernel
pub fn init_perf_map<F>(&mut self, table: Table, cb: F) -> Result<(), BccError> where
F: Fn() -> Box<dyn FnMut(&[u8]) + Send>, [src]
F: Fn() -> Box<dyn FnMut(&[u8]) + Send>,
pub fn perf_map_poll(&mut self, timeout: i32)[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BPF
impl Send for BPF
impl Sync for BPF
impl Unpin for BPF
impl UnwindSafe for BPF
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,