Skip to main content

ProgramType

Enum ProgramType 

Source
#[non_exhaustive]
pub enum ProgramType {
Show 33 variants Unspecified, SocketFilter, KProbe, SchedClassifier, SchedAction, TracePoint, Xdp, PerfEvent, CgroupSkb, CgroupSock, LwtInput, LwtOutput, LwtXmit, SockOps, SkSkb, CgroupDevice, SkMsg, RawTracePoint, CgroupSockAddr, LwtSeg6local, LircMode2, SkReuseport, FlowDissector, CgroupSysctl, RawTracePointWritable, CgroupSockopt, Tracing, StructOps, Extension, Lsm(LsmAttachType), SkLookup, Syscall, Netfilter,
}
Expand description

The type of eBPF program.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Unspecified

An unspecified program type.

§

SocketFilter

A Socket Filter program type. See SocketFilter for the program implementation.

Introduced in kernel v3.19.

§

KProbe

A Kernel Probe program type. See KProbe and UProbe for the program implementations.

Introduced in kernel v4.1.

§

SchedClassifier

A Traffic Control (TC) Classifier program type. See SchedClassifier for the program implementation.

Introduced in kernel v4.1.

§

SchedAction

A Traffic Control (TC) Action program type.

Introduced in kernel v4.1.

§

TracePoint

A Tracepoint program type. See TracePoint for the program implementation.

Introduced in kernel v4.7.

§

Xdp

An Express Data Path (XDP) program type. See Xdp for the program implementation.

Introduced in kernel v4.8.

§

PerfEvent

A Perf Event program type. See PerfEvent for the program implementation.

Introduced in kernel v4.9.

§

CgroupSkb

A cGroup Socket Buffer program type. See CgroupSkb for the program implementation.

Introduced in kernel v4.10.

§

CgroupSock

A cGroup Socket program type. See CgroupSock for the program implementation.

Introduced in kernel v4.10.

§

LwtInput

A Lightweight Tunnel (LWT) Input program type.

Introduced in kernel v4.10.

§

LwtOutput

A Lightweight Tunnel (LWT) Output program type.

Introduced in kernel v4.10.

§

LwtXmit

A Lightweight Tunnel (LWT) Transmit program type.

Introduced in kernel v4.10.

§

SockOps

A Socket Operation program type. See SockOps for the program implementation.

Introduced in kernel v4.13.

§

SkSkb

A Socket-to-Socket Buffer program type. See SkSkb for the program implementation.

Introduced in kernel v4.14.

§

CgroupDevice

A cGroup Device program type. See CgroupDevice for the program implementation.

Introduced in kernel v4.15.

§

SkMsg

A Socket Message program type. See SkMsg for the program implementation.

Introduced in kernel v4.17.

§

RawTracePoint

A Raw Tracepoint program type. See RawTracePoint for the program implementation.

Introduced in kernel v4.17.

§

CgroupSockAddr

A cGroup Socket Address program type. See CgroupSockAddr for the program implementation.

Introduced in kernel v4.17.

§

LwtSeg6local

A Lightweight Tunnel (LWT) Seg6local program type.

Introduced in kernel v4.18.

§

LircMode2

A Linux Infrared Remote Control (LIRC) Mode2 program type. See LircMode2 for the program implementation.

Introduced in kernel v4.18.

§

SkReuseport

A Socket Reuseport program type.

Introduced in kernel v4.19.

§

FlowDissector

A Flow Dissector program type.

Introduced in kernel v4.20.

§

CgroupSysctl

A cGroup Sysctl program type. See CgroupSysctl for the program implementation.

Introduced in kernel v5.2.

§

RawTracePointWritable

A Writable Raw Tracepoint program type.

Introduced in kernel v5.2.

§

CgroupSockopt

A cGroup Socket Option program type. See CgroupSockopt for the program implementation.

Introduced in kernel v5.3.

§

Tracing

A Tracing program type. See FEntry, FExit, and BtfTracePoint for the program implementations.

Introduced in kernel v5.5.

§

StructOps

A Struct Ops program type.

Introduced in kernel v5.6.

§

Extension

A Extension program type. See Extension for the program implementation.

Introduced in kernel v5.6.

§

Lsm(LsmAttachType)

A Linux Security Module (LSM) program type. See Lsm for the program implementation.

Introduced in kernel v5.7.

§

SkLookup

A Socket Lookup program type. See SkLookup for the program implementation.

Introduced in kernel v5.9.

§

Syscall

A Syscall program type.

Introduced in kernel v5.14.

§

Netfilter

A Netfilter program type.

Introduced in kernel v6.4.

Trait Implementations§

Source§

impl Clone for ProgramType

Source§

fn clone(&self) -> ProgramType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProgramType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<ProgramType> for bpf_prog_type

Source§

fn from(value: ProgramType) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ProgramType

Source§

fn eq(&self, other: &ProgramType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ProgramType

Source§

impl StructuralPartialEq for ProgramType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.