fn into_masked_eq_bpf(self, offset: u8, mask: u64) -> Vec<sock_filter> {
        let (_, _, msb_offset, lsb_offset) = self.value_segments();
        let masked_value = self.value & mask;
        let (msb, lsb) = ((masked_value >> 32) as u32, masked_value as u32);
        let (mask_msb, mask_lsb) = ((mask >> 32) as u32, mask as u32);

        let mut bpf = match self.arg_len {
            SeccompCmpArgLen::Dword => vec![],
            SeccompCmpArgLen::Qword => vec![
                BPF_STMT(BPF_LD + BPF_W + BPF_ABS, u32::from(msb_offset)),
                BPF_STMT(BPF_ALU + BPF_AND + BPF_K, mask_msb),
                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, msb, 0, offset + 3),
            ],
        };

        bpf.append(&mut vec![
            BPF_STMT(BPF_LD + BPF_W + BPF_ABS, u32::from(lsb_offset)),
            BPF_STMT(BPF_ALU + BPF_AND + BPF_K, mask_lsb),
            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, lsb, 0, offset),
        ]);
        bpf
    }
/// Translates the `masked_eq` (masked equal) condition into BPF statements.
///
/// The `masked_eq` condition is `true` if the result of logical `AND` between the given value
/// and the mask is the value being compared against.
///
/// # Arguments
///
/// * `offset` - The given jump offset to the start of the next rule.
Translates the `masked_eq` (masked equal) condition into BPF statements.
Translates the ` masked_eq ` ( masked equal ) condition into BPF statements .
fn into_masked_eq_bpf(self, offset: u8, mask: u64) -> Vec<sock_filter> {
        let (_, _, msb_offset, lsb_offset) = self.value_segments();
        let masked_value = self.value & mask;
        let (msb, lsb) = ((masked_value >> 32) as u32, masked_value as u32);
        let (mask_msb, mask_lsb) = ((mask >> 32) as u32, mask as u32);
        let mut bpf = match self.arg_len {
            SeccompCmpArgLen::Dword => vec![],
            SeccompCmpArgLen::Qword => vec![
                BPF_STMT(BPF_LD + BPF_W + BPF_ABS, u32::from(msb_offset)),
                BPF_STMT(BPF_ALU + BPF_AND + BPF_K, mask_msb),
                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, msb, 0, offset + 3),
            ],
        };
        bpf.append(&mut vec![
            BPF_STMT(BPF_LD + BPF_W + BPF_ABS, u32::from(lsb_offset)),
            BPF_STMT(BPF_ALU + BPF_AND + BPF_K, mask_lsb),
            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, lsb, 0, offset),
        ]);
        bpf
    }
fn into_masked_eq_bpf ( self , offset : u8 , mask : u64 ) -> Vec < sock_filter > { let ( _ , _ , msb_offset , lsb_offset ) = self . value_segments ( ) ; let masked_value = self . value & mask ; let ( msb , lsb ) = ( ( masked_value >> 32 ) as u32 , masked_value as u32 ) ; let ( mask_msb , mask_lsb ) = ( ( mask >> 32 ) as u32 , mask as u32 ) ; let mut bpf = match self . arg_len { SeccompCmpArgLen :: Dword => vec ! [ ] , SeccompCmpArgLen :: Qword => vec ! [ BPF_STMT ( BPF_LD BPF_W BPF_ABS u32 from ( msb_offset ) ) BPF_STMT ( BPF_ALU BPF_AND BPF_K mask_msb ) BPF_JUMP ( BPF_JMP BPF_JEQ BPF_K msb 0 offset 3 ) ] , } ; bpf . append ( & mut vec ! [ BPF_STMT ( BPF_LD BPF_W BPF_ABS u32 from ( lsb_offset ) ) BPF_STMT ( BPF_ALU BPF_AND BPF_K mask_lsb ) BPF_JUMP ( BPF_JMP BPF_JEQ BPF_K lsb 0 offset ) ] ) ; bpf }
Translates the `masked_eq` (masked equal) condition into BPF statements.
Translates the ` masked_eq ` ( masked equal ) condition into BPF statements .
self
offset
u8
mask
u64
self
offset
u8
mask
u64