[][src]Struct bcc::BPF

pub struct BPF { /* fields omitted */ }

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]

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]

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]

pub fn perf_map_poll(&mut self, timeout: i32)[src]

Trait Implementations

impl Debug for BPF[src]

impl Drop for BPF[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.