pub struct BpfProgMeta {
pub prog_flags: u32,
pub prog_type: bpf_prog_type,
pub expected_attach_type: bpf_attach_type,
pub insns: Option<Vec<u8>>,
pub license: String,
pub kern_version: u32,
pub name: String,
}Expand description
Metadata for a BPF program.
Fields§
§prog_flags: u32Program flags.
prog_type: bpf_prog_typeProgram type.
expected_attach_type: bpf_attach_typeExpected attach type.
insns: Option<Vec<u8>>eBPF instructions.
license: StringLicense string.
kern_version: u32Kernel version.
name: StringProgram name.
Implementations§
Source§impl BpfProgMeta
impl BpfProgMeta
Sourcepub fn take_insns(&mut self) -> Option<Vec<u8>>
pub fn take_insns(&mut self) -> Option<Vec<u8>>
Take the instructions out of the metadata.
Sourcepub fn try_from_bpf_attr<F: KernelAuxiliaryOps>(
attr: &bpf_attr,
) -> LinuxResult<Self>
pub fn try_from_bpf_attr<F: KernelAuxiliaryOps>( attr: &bpf_attr, ) -> LinuxResult<Self>
Try to create a BpfProgMeta from a bpf_attr structure.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BpfProgMeta
impl RefUnwindSafe for BpfProgMeta
impl Send for BpfProgMeta
impl Sync for BpfProgMeta
impl Unpin for BpfProgMeta
impl UnsafeUnpin for BpfProgMeta
impl UnwindSafe for BpfProgMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more