// use core::mem; // // use crate::bindings::bpf_map_type::BPF_MAP_TYPE_BLOOM_FILTER; // #[allow(dead_code)] // pub struct LpmTrieDef { // r#type: *const [i32; BPF_MAP_TYPE_BLOOM_FILTER as usize], // key_size: *const [i32; mem::size_of::>()], // value_size: *const [i32; mem::size_of::()], // max_entries: *const [i32; M], // map_flags: *const [i32; F], // } #[repr(C, packed)] pub struct Key { /// Represents the number of bits matched against. pub prefix_len: u32, /// Represents arbitrary data stored in the LpmTrie. pub data: K, } impl Key { pub fn new(prefix_len: u32, data: K) -> Self { Self { prefix_len, data } } }