#[repr(C)]pub struct EbpfHeader {
pub ebpf_magic: u32,
pub header_version: u16,
pub program_type: u8,
pub attach_type: u8,
pub program_flags: u32,
pub insn_count: u16,
pub max_dimension: u16,
pub program_size: u64,
pub map_count: u32,
pub btf_size: u32,
pub program_hash: [u8; 32],
}Expand description
64-byte header for EBPF_SEG payloads.
Follows the standard 64-byte SegmentHeader. All multi-byte fields are
little-endian on the wire.
Fields§
§ebpf_magic: u32Magic: EBPF_MAGIC (0x52564250, “RVBP”).
header_version: u16EbpfHeader format version (currently 1).
program_type: u8eBPF program type (see EbpfProgramType).
attach_type: u8eBPF attach point (see EbpfAttachType).
program_flags: u32Bitfield flags for the eBPF program.
insn_count: u16Number of BPF instructions (max 65535).
max_dimension: u16Maximum vector dimension this program handles.
program_size: u64ELF object size (bytes).
map_count: u32Number of BPF maps defined.
btf_size: u32BTF (BPF Type Format) section size.
program_hash: [u8; 32]SHAKE-256-256 of the ELF object.
Implementations§
Trait Implementations§
Source§impl Clone for EbpfHeader
impl Clone for EbpfHeader
Source§fn clone(&self) -> EbpfHeader
fn clone(&self) -> EbpfHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EbpfHeader
impl Debug for EbpfHeader
impl Copy for EbpfHeader
Auto Trait Implementations§
impl Freeze for EbpfHeader
impl RefUnwindSafe for EbpfHeader
impl Send for EbpfHeader
impl Sync for EbpfHeader
impl Unpin for EbpfHeader
impl UnwindSafe for EbpfHeader
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