#[repr(C)]pub struct BpfInstruction {
pub code: u8,
pub registers: u8,
pub offset: i16,
pub immediate: i32,
}Expand description
Miroir #[repr(C)] de struct bpf_insn (8 octets).
Type « miroir » : nom de type explicite (ADR-029), champs aux noms kernel.
Fields§
§code: u8Opcode.
registers: u84 bits dst_reg (poids faible) + 4 bits src_reg (poids fort).
offset: i16Décalage signé (saut, accès mémoire).
immediate: i32Immédiat 32 bits.
Implementations§
Trait Implementations§
Source§impl Clone for BpfInstruction
impl Clone for BpfInstruction
Source§fn clone(&self) -> BpfInstruction
fn clone(&self) -> BpfInstruction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BpfInstruction
Source§impl Debug for BpfInstruction
impl Debug for BpfInstruction
Source§impl Default for BpfInstruction
impl Default for BpfInstruction
Source§fn default() -> BpfInstruction
fn default() -> BpfInstruction
Returns the “default value” for a type. Read more
impl Eq for BpfInstruction
Source§impl PartialEq for BpfInstruction
impl PartialEq for BpfInstruction
impl StructuralPartialEq for BpfInstruction
Auto Trait Implementations§
impl Freeze for BpfInstruction
impl RefUnwindSafe for BpfInstruction
impl Send for BpfInstruction
impl Sync for BpfInstruction
impl Unpin for BpfInstruction
impl UnsafeUnpin for BpfInstruction
impl UnwindSafe for BpfInstruction
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