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),
    SkLookup(SkLookup),
}
Expand description

A BPF program defined in a Module.

Variants

KProbe(KProbe)

Tuple Fields

0: KProbe

KRetProbe(KProbe)

Tuple Fields

0: KProbe

UProbe(UProbe)

Tuple Fields

0: UProbe

URetProbe(UProbe)

Tuple Fields

0: UProbe

SocketFilter(SocketFilter)

Tuple Fields

TracePoint(TracePoint)

Tuple Fields

XDP(XDP)

Tuple Fields

0: XDP

StreamParser(StreamParser)

Tuple Fields

StreamVerdict(StreamVerdict)

Tuple Fields

TaskIter(TaskIter)

Tuple Fields

SkLookup(SkLookup)

Tuple Fields

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