Enum redbpf::Program[][src]

pub enum Program {
    KProbe(KProbe),
    KRetProbe(KProbe),
    UProbe(UProbe),
    URetProbe(UProbe),
    SocketFilter(SocketFilter),
    TracePoint(TracePoint),
    XDP(XDP),
    StreamParser(StreamParser),
    StreamVerdict(StreamVerdict),
    TaskIter(TaskIter),
}
Expand description

A BPF program defined in a Module.

Variants

KProbe(KProbe)

Tuple Fields of KProbe

0: KProbe
KRetProbe(KProbe)

Tuple Fields of KRetProbe

0: KProbe
UProbe(UProbe)

Tuple Fields of UProbe

0: UProbe
URetProbe(UProbe)

Tuple Fields of URetProbe

0: UProbe
SocketFilter(SocketFilter)

Tuple Fields of SocketFilter

0: SocketFilter
TracePoint(TracePoint)

Tuple Fields of TracePoint

0: TracePoint
XDP(XDP)

Tuple Fields of XDP

0: XDP
StreamParser(StreamParser)

Tuple Fields of StreamParser

0: StreamParser
StreamVerdict(StreamVerdict)

Tuple Fields of StreamVerdict

0: StreamVerdict
TaskIter(TaskIter)

Tuple Fields of TaskIter

0: TaskIter

Implementations

Load the BPF program.

BPF programs need to be loaded before they can be attached. Loading will fail if the BPF verifier rejects the code.

Example
use redbpf::Module;
let mut module = Module::parse(&std::fs::read("file.elf").unwrap()).unwrap();
for program in module.programs.iter_mut() {
    program
        .load(module.version, module.license.clone()).unwrap()
}

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more