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
0: SocketFilter
TracePoint(TracePoint)
Tuple Fields
0: TracePoint
XDP(XDP)
Tuple Fields
0: XDP
StreamParser(StreamParser)
Tuple Fields
0: StreamParser
StreamVerdict(StreamVerdict)
Tuple Fields
TaskIter(TaskIter)
Tuple Fields
0: TaskIter
SkLookup(SkLookup)
Tuple Fields
0: SkLookup
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
impl RefUnwindSafe for Program
impl UnwindSafe for Program
Blanket Implementations
Mutably borrows from an owned value. Read more
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