|
@@ -94,7 +94,7 @@ impl Program {
|
|
|
load_program(self.prog_type(), self.data_mut())
|
|
|
}
|
|
|
|
|
|
- fn prog_type(&self) -> bpf_prog_type {
|
|
|
+ pub fn prog_type(&self) -> bpf_prog_type {
|
|
|
use crate::generated::bpf_prog_type::*;
|
|
|
match self {
|
|
|
Program::KProbe(_) => BPF_PROG_TYPE_KPROBE,
|
|
@@ -124,6 +124,10 @@ impl Program {
|
|
|
Program::Xdp(p) => &mut p.data,
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ pub fn name(&self) -> &str {
|
|
|
+ &self.data().name
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#[derive(Debug)]
|