pub enum Program {
Show 18 variants
KProbe(KProbe),
UProbe(UProbe),
TracePoint(TracePoint),
SocketFilter(SocketFilter),
Xdp(Xdp),
SkMsg(SkMsg),
SkSkb(SkSkb),
SockOps(SockOps),
SchedClassifier(SchedClassifier),
CgroupSkb(CgroupSkb),
LircMode2(LircMode2),
PerfEvent(PerfEvent),
RawTracePoint(RawTracePoint),
Lsm(Lsm),
BtfTracePoint(BtfTracePoint),
FEntry(FEntry),
FExit(FExit),
Extension(Extension),
}
Expand description
eBPF program type.
Variants
KProbe(KProbe)
A KProbe
program
UProbe(UProbe)
A UProbe
program
TracePoint(TracePoint)
A TracePoint
program
SocketFilter(SocketFilter)
A SocketFilter
program
Xdp(Xdp)
A Xdp
program
SkMsg(SkMsg)
A SkMsg
program
SkSkb(SkSkb)
A SkSkb
program
SockOps(SockOps)
A SockOps
program
SchedClassifier(SchedClassifier)
A SchedClassifier
program
CgroupSkb(CgroupSkb)
A CgroupSkb
program
LircMode2(LircMode2)
A LircMode2
program
PerfEvent(PerfEvent)
A PerfEvent
program
RawTracePoint(RawTracePoint)
A RawTracePoint
program
Lsm(Lsm)
A Lsm
program
BtfTracePoint(BtfTracePoint)
A BtfTracePoint
program
FEntry(FEntry)
A FEntry
program
FExit(FExit)
A FExit
program
Extension(Extension)
A Extension
program
Implementations
sourceimpl Program
impl Program
sourcepub fn load(&mut self) -> Result<(), ProgramError>
pub fn load(&mut self) -> Result<(), ProgramError>
Loads the program in the kernel.
Errors
If the load operation fails, the method returns
ProgramError::LoadError
and the error’s verifier_log
field
contains the output from the kernel verifier.
If the program is already loaded, ProgramError::AlreadyLoaded
is
returned.
Trait Implementations
sourceimpl<'a> TryFrom<&'a Program> for &'a KProbe
impl<'a> TryFrom<&'a Program> for &'a KProbe
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a Program> for &'a UProbe
impl<'a> TryFrom<&'a Program> for &'a UProbe
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a Program> for &'a LircMode2
impl<'a> TryFrom<&'a Program> for &'a LircMode2
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a Program> for &'a PerfEvent
impl<'a> TryFrom<&'a Program> for &'a PerfEvent
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a Program> for &'a Lsm
impl<'a> TryFrom<&'a Program> for &'a Lsm
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a Program> for &'a RawTracePoint
impl<'a> TryFrom<&'a Program> for &'a RawTracePoint
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(program: &'a Program) -> Result<&'a RawTracePoint, ProgramError>
fn try_from(program: &'a Program) -> Result<&'a RawTracePoint, ProgramError>
Performs the conversion.
sourceimpl<'a> TryFrom<&'a Program> for &'a BtfTracePoint
impl<'a> TryFrom<&'a Program> for &'a BtfTracePoint
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(program: &'a Program) -> Result<&'a BtfTracePoint, ProgramError>
fn try_from(program: &'a Program) -> Result<&'a BtfTracePoint, ProgramError>
Performs the conversion.
sourceimpl<'a> TryFrom<&'a Program> for &'a FEntry
impl<'a> TryFrom<&'a Program> for &'a FEntry
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a Program> for &'a FExit
impl<'a> TryFrom<&'a Program> for &'a FExit
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a Program> for &'a Extension
impl<'a> TryFrom<&'a Program> for &'a Extension
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a Program> for &'a TracePoint
impl<'a> TryFrom<&'a Program> for &'a TracePoint
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(program: &'a Program) -> Result<&'a TracePoint, ProgramError>
fn try_from(program: &'a Program) -> Result<&'a TracePoint, ProgramError>
Performs the conversion.
sourceimpl<'a> TryFrom<&'a Program> for &'a SocketFilter
impl<'a> TryFrom<&'a Program> for &'a SocketFilter
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(program: &'a Program) -> Result<&'a SocketFilter, ProgramError>
fn try_from(program: &'a Program) -> Result<&'a SocketFilter, ProgramError>
Performs the conversion.
sourceimpl<'a> TryFrom<&'a Program> for &'a Xdp
impl<'a> TryFrom<&'a Program> for &'a Xdp
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a Program> for &'a SkMsg
impl<'a> TryFrom<&'a Program> for &'a SkMsg
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a Program> for &'a SkSkb
impl<'a> TryFrom<&'a Program> for &'a SkSkb
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a Program> for &'a SockOps
impl<'a> TryFrom<&'a Program> for &'a SockOps
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a Program> for &'a SchedClassifier
impl<'a> TryFrom<&'a Program> for &'a SchedClassifier
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(program: &'a Program) -> Result<&'a SchedClassifier, ProgramError>
fn try_from(program: &'a Program) -> Result<&'a SchedClassifier, ProgramError>
Performs the conversion.
sourceimpl<'a> TryFrom<&'a Program> for &'a CgroupSkb
impl<'a> TryFrom<&'a Program> for &'a CgroupSkb
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut KProbe
impl<'a> TryFrom<&'a mut Program> for &'a mut KProbe
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut UProbe
impl<'a> TryFrom<&'a mut Program> for &'a mut UProbe
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut LircMode2
impl<'a> TryFrom<&'a mut Program> for &'a mut LircMode2
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut PerfEvent
impl<'a> TryFrom<&'a mut Program> for &'a mut PerfEvent
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut Lsm
impl<'a> TryFrom<&'a mut Program> for &'a mut Lsm
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut RawTracePoint
impl<'a> TryFrom<&'a mut Program> for &'a mut RawTracePoint
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(
program: &'a mut Program
) -> Result<&'a mut RawTracePoint, ProgramError>
fn try_from(
program: &'a mut Program
) -> Result<&'a mut RawTracePoint, ProgramError>
Performs the conversion.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut BtfTracePoint
impl<'a> TryFrom<&'a mut Program> for &'a mut BtfTracePoint
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(
program: &'a mut Program
) -> Result<&'a mut BtfTracePoint, ProgramError>
fn try_from(
program: &'a mut Program
) -> Result<&'a mut BtfTracePoint, ProgramError>
Performs the conversion.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut FEntry
impl<'a> TryFrom<&'a mut Program> for &'a mut FEntry
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut FExit
impl<'a> TryFrom<&'a mut Program> for &'a mut FExit
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut Extension
impl<'a> TryFrom<&'a mut Program> for &'a mut Extension
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut TracePoint
impl<'a> TryFrom<&'a mut Program> for &'a mut TracePoint
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(
program: &'a mut Program
) -> Result<&'a mut TracePoint, ProgramError>
fn try_from(
program: &'a mut Program
) -> Result<&'a mut TracePoint, ProgramError>
Performs the conversion.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut SocketFilter
impl<'a> TryFrom<&'a mut Program> for &'a mut SocketFilter
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(
program: &'a mut Program
) -> Result<&'a mut SocketFilter, ProgramError>
fn try_from(
program: &'a mut Program
) -> Result<&'a mut SocketFilter, ProgramError>
Performs the conversion.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut Xdp
impl<'a> TryFrom<&'a mut Program> for &'a mut Xdp
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut SkMsg
impl<'a> TryFrom<&'a mut Program> for &'a mut SkMsg
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut SkSkb
impl<'a> TryFrom<&'a mut Program> for &'a mut SkSkb
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut SockOps
impl<'a> TryFrom<&'a mut Program> for &'a mut SockOps
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut SchedClassifier
impl<'a> TryFrom<&'a mut Program> for &'a mut SchedClassifier
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(
program: &'a mut Program
) -> Result<&'a mut SchedClassifier, ProgramError>
fn try_from(
program: &'a mut Program
) -> Result<&'a mut SchedClassifier, ProgramError>
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for Program
impl !Send for Program
impl !Sync for Program
impl Unpin for Program
impl !UnwindSafe for Program
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more