From 15aacabd8fd2e178fefe01d2cdf96541c46f3e0c Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Mon, 16 Dec 2024 08:04:08 +0100 Subject: [PATCH] feat(aya-ebpf): BTF maps Before this change, Aya supported only legacy BPF map definitions, which are instances of the `bpf_map_def` struct and end up in the `maps` ELF section. This change introduces BTF maps, with custom structs indicating the metadata of the map, which end up in the `.maps` section. Legacy maps are not supported by libbpf anymore and not even by the kernel for newer types of maps like inode/task storage. Add support of BTF maps in aya-ebpf under the `btf-maps` feature flag. Usage of this feature requires emitting debug info for the eBPF crate and passing the `--btf` flag to bpf-linker. --- aya-build/src/lib.rs | 39 +- aya-ebpf-macros/Cargo.toml | 4 + aya-ebpf-macros/src/btf_map.rs | 73 + aya-ebpf-macros/src/lib.rs | 14 + aya-obj/src/obj.rs | 63 +- ebpf/aya-ebpf/Cargo.toml | 4 + ebpf/aya-ebpf/src/btf_maps/array.rs | 45 + ebpf/aya-ebpf/src/btf_maps/bloom_filter.rs | 64 + ebpf/aya-ebpf/src/btf_maps/hash_map.rs | 214 +++ ebpf/aya-ebpf/src/btf_maps/lpm_trie.rs | 26 + ebpf/aya-ebpf/src/btf_maps/mod.rs | 77 + ebpf/aya-ebpf/src/btf_maps/per_cpu_array.rs | 48 + ebpf/aya-ebpf/src/btf_maps/perf/mod.rs | 38 + .../src/btf_maps/perf/perf_event_array.rs | 44 + .../btf_maps/perf/perf_event_byte_array.rs | 38 + ebpf/aya-ebpf/src/btf_maps/program_array.rs | 84 + ebpf/aya-ebpf/src/btf_maps/queue.rs | 54 + ebpf/aya-ebpf/src/btf_maps/ring_buf.rs | 163 ++ ebpf/aya-ebpf/src/btf_maps/sock_hash.rs | 102 ++ ebpf/aya-ebpf/src/btf_maps/sock_map.rs | 95 ++ ebpf/aya-ebpf/src/btf_maps/stack.rs | 51 + ebpf/aya-ebpf/src/btf_maps/stack_trace.rs | 52 + ebpf/aya-ebpf/src/btf_maps/xdp/cpu_map.rs | 96 ++ ebpf/aya-ebpf/src/btf_maps/xdp/dev_map.rs | 142 ++ .../aya-ebpf/src/btf_maps/xdp/dev_map_hash.rs | 123 ++ ebpf/aya-ebpf/src/btf_maps/xdp/mod.rs | 30 + ebpf/aya-ebpf/src/btf_maps/xdp/xsk_map.rs | 146 ++ ebpf/aya-ebpf/src/lib.rs | 2 + ebpf/aya-ebpf/src/maps/stack.rs | 32 +- test/integration-ebpf/.cargo/config.toml | 5 + test/integration-ebpf/Cargo.toml | 20 +- .../src/{map_test.rs => map_info.rs} | 0 test/integration-ebpf/src/maps.rs | 93 ++ test/integration-ebpf/src/maps_btf.rs | 90 + test/integration-ebpf/src/redirect_btf.rs | 73 + test/integration-ebpf/src/ring_buf_btf.rs | 54 + test/integration-test/src/lib.rs | 6 +- test/integration-test/src/tests.rs | 1 + test/integration-test/src/tests/elf.rs | 2 +- test/integration-test/src/tests/info.rs | 4 +- test/integration-test/src/tests/maps.rs | 109 ++ test/integration-test/src/tests/ring_buf.rs | 53 +- test/integration-test/src/tests/xdp.rs | 14 +- xtask/public-api/aya-ebpf-macros.txt | 1 + xtask/public-api/aya-ebpf.txt | 1482 ++++++++++++++++- 45 files changed, 3881 insertions(+), 89 deletions(-) create mode 100644 aya-ebpf-macros/src/btf_map.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/array.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/bloom_filter.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/hash_map.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/lpm_trie.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/mod.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/per_cpu_array.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/perf/mod.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/perf/perf_event_array.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/perf/perf_event_byte_array.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/program_array.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/queue.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/ring_buf.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/sock_hash.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/sock_map.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/stack.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/stack_trace.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/xdp/cpu_map.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/xdp/dev_map.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/xdp/dev_map_hash.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/xdp/mod.rs create mode 100644 ebpf/aya-ebpf/src/btf_maps/xdp/xsk_map.rs create mode 100644 test/integration-ebpf/.cargo/config.toml rename test/integration-ebpf/src/{map_test.rs => map_info.rs} (100%) create mode 100644 test/integration-ebpf/src/maps.rs create mode 100644 test/integration-ebpf/src/maps_btf.rs create mode 100644 test/integration-ebpf/src/redirect_btf.rs create mode 100644 test/integration-ebpf/src/ring_buf_btf.rs create mode 100644 test/integration-test/src/tests/maps.rs diff --git a/aya-build/src/lib.rs b/aya-build/src/lib.rs index c8e9996ae..f662df5d1 100644 --- a/aya-build/src/lib.rs +++ b/aya-build/src/lib.rs @@ -38,6 +38,7 @@ pub fn build_ebpf(packages: impl IntoIterator) -> Result<()> { let arch = env::var_os("CARGO_CFG_TARGET_ARCH").ok_or(anyhow!("CARGO_CFG_TARGET_ARCH not set"))?; + let path = env::var_os("PATH").ok_or(anyhow!("PATH not set"))?; let target = format!("{target}-unknown-none"); @@ -58,26 +59,28 @@ pub fn build_ebpf(packages: impl IntoIterator) -> Result<()> { println!("cargo:rerun-if-changed={dir}"); let mut cmd = Command::new("cargo"); - cmd.args([ - "+nightly", - "build", - "--package", - &name, - "-Z", - "build-std=core", - "--bins", - "--message-format=json", - "--release", - "--target", - &target, - ]); - - cmd.env("CARGO_CFG_BPF_TARGET_ARCH", &arch); + cmd.current_dir(dir) + .args([ + "+nightly", + "build", + "-Z", + "build-std=core", + "--bins", + "--message-format=json", + "--release", + "--target", + &target, + ]) + .env_clear() + .env("CARGO_CFG_BPF_TARGET_ARCH", &arch) + // FIXME: Try to find which exact environment variable triggers the + // strip of debug info. + .env("PATH", &path); // Workaround to make sure that the correct toolchain is used. - for key in ["RUSTC", "RUSTC_WORKSPACE_WRAPPER"] { - cmd.env_remove(key); - } + // for key in ["RUSTC", "RUSTC_WORKSPACE_WRAPPER"] { + // cmd.env_remove(key); + // } // Workaround for https://github.com/rust-lang/cargo/issues/6412 where cargo flocks itself. let target_dir = out_dir.join(name); diff --git a/aya-ebpf-macros/Cargo.toml b/aya-ebpf-macros/Cargo.toml index e4a64b8bb..aef4b129a 100644 --- a/aya-ebpf-macros/Cargo.toml +++ b/aya-ebpf-macros/Cargo.toml @@ -19,3 +19,7 @@ syn = { workspace = true, default-features = true, features = ["full"] } [dev-dependencies] aya-ebpf = { path = "../ebpf/aya-ebpf", default-features = false } + +[features] +default = ["btf-maps"] +btf-maps = [] diff --git a/aya-ebpf-macros/src/btf_map.rs b/aya-ebpf-macros/src/btf_map.rs new file mode 100644 index 000000000..7a3bf4737 --- /dev/null +++ b/aya-ebpf-macros/src/btf_map.rs @@ -0,0 +1,73 @@ +use proc_macro2::TokenStream; +use quote::quote; +use syn::{ItemStatic, Result}; + +use crate::args::name_arg; + +pub(crate) struct BtfMap { + item: ItemStatic, + name: String, +} + +impl BtfMap { + pub(crate) fn parse(attrs: TokenStream, item: TokenStream) -> Result { + let item: ItemStatic = syn::parse2(item)?; + let mut args = syn::parse2(attrs)?; + let name = name_arg(&mut args).unwrap_or_else(|| item.ident.to_string()); + Ok(BtfMap { item, name }) + } + + pub(crate) fn expand(&self) -> TokenStream { + let section_name = ".maps"; + let name = &self.name; + let item = &self.item; + quote! { + #[link_section = #section_name] + #[export_name = #name] + #item + } + } +} + +#[cfg(test)] +mod tests { + use syn::parse_quote; + + use super::*; + + #[test] + fn test_map_with_name() { + let map = BtfMap::parse( + parse_quote!(name = "foo"), + parse_quote!( + static BAR: HashMap<&'static str, u32> = HashMap::new(); + ), + ) + .unwrap(); + let expanded = map.expand(); + let expected = quote!( + #[link_section = ".maps"] + #[export_name = "foo"] + static BAR: HashMap<&'static str, u32> = HashMap::new(); + ); + assert_eq!(expected.to_string(), expanded.to_string()); + } + + #[test] + fn test_map_no_name() { + let map = BtfMap::parse( + parse_quote!(), + parse_quote!( + static BAR: HashMap<&'static str, u32> = HashMap::new(); + ), + ) + .unwrap(); + let expanded = map.expand(); + let expected = quote!( + #[link_section = ".maps"] + #[export_name = "BAR"] + static BAR: HashMap<&'static str, u32> = HashMap::new(); + ); + assert_eq!(expected.to_string(), expanded.to_string()); + } +} diff --git a/aya-ebpf-macros/src/lib.rs b/aya-ebpf-macros/src/lib.rs index acb6fbd93..f7cb8b113 100644 --- a/aya-ebpf-macros/src/lib.rs +++ b/aya-ebpf-macros/src/lib.rs @@ -1,4 +1,6 @@ pub(crate) mod args; +#[cfg(feature = "btf-maps")] +mod btf_map; mod btf_tracepoint; mod cgroup_device; mod cgroup_skb; @@ -23,6 +25,8 @@ mod tracepoint; mod uprobe; mod xdp; +#[cfg(feature = "btf-maps")] +use btf_map::BtfMap; use btf_tracepoint::BtfTracePoint; use cgroup_device::CgroupDevice; use cgroup_skb::CgroupSkb; @@ -56,6 +60,16 @@ pub fn map(attrs: TokenStream, item: TokenStream) -> TokenStream { } .into() } + +#[proc_macro_attribute] +pub fn btf_map(attrs: TokenStream, item: TokenStream) -> TokenStream { + match BtfMap::parse(attrs.into(), item.into()) { + Ok(prog) => prog.expand(), + Err(err) => err.into_compile_error(), + } + .into() +} + #[proc_macro_attribute] pub fn kprobe(attrs: TokenStream, item: TokenStream) -> TokenStream { match KProbe::parse(KProbeKind::KProbe, attrs.into(), item.into()) { diff --git a/aya-obj/src/obj.rs b/aya-obj/src/obj.rs index 4f115024b..0804adad8 100644 --- a/aya-obj/src/obj.rs +++ b/aya-obj/src/obj.rs @@ -773,7 +773,7 @@ impl Object { if type_name == section.name { // each btf_var_secinfo contains a map for info in &datasec.entries { - let (map_name, def) = parse_btf_map_def(btf, info)?; + let (map_name, def) = parse_btf_map(btf, info)?; let symbol_index = maps.get(&map_name) .ok_or_else(|| ParseError::SymbolNotFound { @@ -1257,7 +1257,7 @@ fn parse_map_def(name: &str, data: &[u8]) -> Result { } } -fn parse_btf_map_def(btf: &Btf, info: &DataSecEntry) -> Result<(String, BtfMapDef), BtfError> { +fn parse_btf_map(btf: &Btf, info: &DataSecEntry) -> Result<(String, BtfMapDef), BtfError> { let ty = match btf.type_by_id(info.btf_type)? { BtfType::Var(var) => var, other => { @@ -1267,11 +1267,17 @@ fn parse_btf_map_def(btf: &Btf, info: &DataSecEntry) -> Result<(String, BtfMapDe } }; let map_name = btf.string_at(ty.name_offset)?; - let mut map_def = BtfMapDef::default(); - // Safety: union - let root_type = btf.resolve_type(ty.btf_type)?; - let s = match btf.type_by_id(root_type)? { + let root_type_id = btf.resolve_type(ty.btf_type)?; + parse_btf_map_def(btf, &map_name, root_type_id) +} + +fn parse_btf_map_def( + btf: &Btf, + map_name: &str, + btf_type_id: u32, +) -> Result<(String, BtfMapDef), BtfError> { + let s = match btf.type_by_id(btf_type_id)? { BtfType::Struct(s) => s, other => { return Err(BtfError::UnexpectedBtfType { @@ -1280,8 +1286,26 @@ fn parse_btf_map_def(btf: &Btf, info: &DataSecEntry) -> Result<(String, BtfMapDe } }; + let mut map_def = BtfMapDef::default(); + for m in &s.members { + // In aya-ebpf, the BTF map definition types are not used directly. + // Instead, they are wrapped in structs provided by aya-ebpf (e.g. + // `HashMap`, `Array`), which then wrap the definition type in + // `UnsafeCell`. + // To retrieve the definition type, we need to walk through all the + // wrapper types: + // + // - aya-ebpf wrappers like `HashMap`, `Array` etc. They wrap an + // `UnsafeCell` in a tuple struct with one member, hence the field + // name is `__0`. + // - `UnsafeCell`, which wraps the BTF map definition inside a `value` + // field. match btf.string_at(m.name_offset)?.as_ref() { + "__0" => { + let unsafe_cell_id = btf.resolve_type(m.btf_type)?; + return parse_btf_map_def(btf, map_name, unsafe_cell_id); + } "type" => { map_def.map_type = get_map_field(btf, m.btf_type)?; } @@ -1301,6 +1325,32 @@ fn parse_btf_map_def(btf: &Btf, info: &DataSecEntry) -> Result<(String, BtfMapDe map_def.key_size = get_map_field(btf, m.btf_type)?; } "value" => { + // There are two cases to handle: + // + // 1. We are parsing an actual BTF map type with fields like + // `type`, `value`, `key`. In this case, `value` is a + // pointer. + // 2. We are parsing an `UnsafeCell`, which wraps an actual BTF + // map type, and the `value` field of `UnsafeCell` is a + // struct which we want to parse. + match btf.type_by_id(m.btf_type)? { + // BTF map with `value` as a pointer field. + BtfType::Ptr(pty) => { + let t = pty.btf_type; + map_def.value_size = btf.type_size(t)? as u32; + map_def.btf_value_type_id = t; + } + // `UnsafeCell` wrapping a BTF map in a `value field`. + BtfType::Struct(_) => { + let map_type_id = btf.resolve_type(m.btf_type)?; + return parse_btf_map_def(btf, map_name, map_type_id); + } + _ => { + return Err(BtfError::UnexpectedBtfType { + type_id: m.btf_type, + }); + } + } if let BtfType::Ptr(pty) = btf.type_by_id(m.btf_type)? { let t = pty.btf_type; map_def.value_size = btf.type_size(t)? as u32; @@ -1333,6 +1383,7 @@ fn parse_btf_map_def(btf: &Btf, info: &DataSecEntry) -> Result<(String, BtfMapDe } } } + Ok((map_name.to_string(), map_def)) } diff --git a/ebpf/aya-ebpf/Cargo.toml b/ebpf/aya-ebpf/Cargo.toml index 3495ddf50..fd4a2896a 100644 --- a/ebpf/aya-ebpf/Cargo.toml +++ b/ebpf/aya-ebpf/Cargo.toml @@ -15,3 +15,7 @@ aya-ebpf-bindings = { version = "^0.1.1", path = "../aya-ebpf-bindings" } [build-dependencies] rustversion = { workspace = true } + +[features] +default = ["btf-maps"] +btf-maps = ["aya-ebpf-macros/btf-maps"] diff --git a/ebpf/aya-ebpf/src/btf_maps/array.rs b/ebpf/aya-ebpf/src/btf_maps/array.rs new file mode 100644 index 000000000..21724630b --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/array.rs @@ -0,0 +1,45 @@ +use core::{cell::UnsafeCell, ptr::NonNull}; + +use crate::{ + bindings::bpf_map_type::BPF_MAP_TYPE_ARRAY, btf_map_def, cty::c_void, + helpers::bpf_map_lookup_elem, +}; + +btf_map_def!(ArrayDef, BPF_MAP_TYPE_ARRAY); + +#[repr(transparent)] +pub struct Array(UnsafeCell>); + +unsafe impl Sync for Array {} + +impl Array { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Array(UnsafeCell::new(ArrayDef::new())) + } + + #[inline(always)] + pub fn get(&self, index: u32) -> Option<&T> { + // FIXME: alignment + unsafe { self.lookup(index).map(|p| p.as_ref()) } + } + + #[inline(always)] + pub fn get_ptr(&self, index: u32) -> Option<*const T> { + unsafe { self.lookup(index).map(|p| p.as_ptr() as *const T) } + } + + #[inline(always)] + pub fn get_ptr_mut(&self, index: u32) -> Option<*mut T> { + unsafe { self.lookup(index).map(|p| p.as_ptr()) } + } + + #[inline(always)] + unsafe fn lookup(&self, index: u32) -> Option> { + let ptr = bpf_map_lookup_elem(self.0.get() as *mut _, &index as *const _ as *const c_void); + NonNull::new(ptr as *mut T) + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/bloom_filter.rs b/ebpf/aya-ebpf/src/btf_maps/bloom_filter.rs new file mode 100644 index 000000000..2e23229b4 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/bloom_filter.rs @@ -0,0 +1,64 @@ +use core::{cell::UnsafeCell, ptr}; + +use aya_ebpf_bindings::helpers::{bpf_map_peek_elem, bpf_map_push_elem}; + +use crate::{ + bindings::bpf_map_type::BPF_MAP_TYPE_BLOOM_FILTER, btf_maps::AyaBtfMapMarker, cty::c_void, +}; + +#[allow(dead_code)] +pub struct BloomFilterDef { + r#type: *const [i32; BPF_MAP_TYPE_BLOOM_FILTER as usize], + value: *const T, + max_entries: *const [i32; M], + map_extra: *const [i32; H], + map_flags: *const [i32; F], + + // Anonymize the struct. + _anon: AyaBtfMapMarker, +} + +#[repr(transparent)] +pub struct BloomFilter( + UnsafeCell>, +); + +impl BloomFilter { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + BloomFilter(UnsafeCell::new(BloomFilterDef { + r#type: &[0i32; BPF_MAP_TYPE_BLOOM_FILTER as usize] as *const _, + value: ptr::null(), + max_entries: &[0i32; M] as *const _, + map_extra: &[0i32; H] as *const _, + map_flags: &[0i32; F] as *const _, + _anon: AyaBtfMapMarker::new(), + })) + } + + #[inline] + pub fn contains(&mut self, value: &T) -> Result<(), i64> { + let ret = unsafe { + bpf_map_peek_elem( + &mut self.0.get() as *mut _ as *mut _, + value as *const _ as *mut c_void, + ) + }; + (ret == 0).then_some(()).ok_or(ret) + } + + #[inline] + pub fn insert(&mut self, value: &T, flags: u64) -> Result<(), i64> { + let ret = unsafe { + bpf_map_push_elem( + &mut self.0.get() as *mut _ as *mut _, + value as *const _ as *const _, + flags, + ) + }; + (ret == 0).then_some(()).ok_or(ret) + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/hash_map.rs b/ebpf/aya-ebpf/src/btf_maps/hash_map.rs new file mode 100644 index 000000000..a00544655 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/hash_map.rs @@ -0,0 +1,214 @@ +use core::{cell::UnsafeCell, ptr::NonNull}; + +use aya_ebpf_bindings::bindings::bpf_map_type::BPF_MAP_TYPE_PERCPU_HASH; + +use crate::{ + bindings::bpf_map_type::{BPF_MAP_TYPE_HASH, BPF_MAP_TYPE_LRU_HASH}, + btf_map_def, + cty::{c_long, c_void}, + helpers::{bpf_map_delete_elem, bpf_map_lookup_elem, bpf_map_update_elem}, +}; + +btf_map_def!(HashMapDef, BPF_MAP_TYPE_HASH); + +#[repr(transparent)] +pub struct HashMap(UnsafeCell>); + +unsafe impl Sync for HashMap {} + +impl HashMap { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> HashMap { + HashMap(UnsafeCell::new(HashMapDef::new())) + } + + /// Retrieve the value associate with `key` from the map. + /// This function is unsafe. Unless the map flag `BPF_F_NO_PREALLOC` is used, the kernel does not + /// make guarantee on the atomicity of `insert` or `remove`, and any element removed from the + /// map might get aliased by another element in the map, causing garbage to be read, or + /// corruption in case of writes. + #[inline] + pub unsafe fn get(&self, key: &K) -> Option<&V> { + get(self.0.get() as _, key) + } + + /// Retrieve the value associate with `key` from the map. + /// The same caveat as `get` applies, but this returns a raw pointer and it's up to the caller + /// to decide whether it's safe to dereference the pointer or not. + #[inline] + pub fn get_ptr(&self, key: &K) -> Option<*const V> { + get_ptr(self.0.get() as _, key) + } + + /// Retrieve the value associate with `key` from the map. + /// The same caveat as `get` applies, and additionally cares should be taken to avoid + /// concurrent writes, but it's up to the caller to decide whether it's safe to dereference the + /// pointer or not. + #[inline] + pub fn get_ptr_mut(&self, key: &K) -> Option<*mut V> { + get_ptr_mut(self.0.get() as _, key) + } + + #[inline] + pub fn insert(&self, key: &K, value: &V, flags: u64) -> Result<(), c_long> { + insert(self.0.get() as _, key, value, flags) + } + + #[inline] + pub fn remove(&self, key: &K) -> Result<(), c_long> { + remove(self.0.get() as _, key) + } +} + +btf_map_def!(LruHashMapDef, BPF_MAP_TYPE_LRU_HASH); + +#[repr(transparent)] +pub struct LruHashMap( + UnsafeCell>, +); + +unsafe impl Sync for LruHashMap {} + +impl LruHashMap { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> LruHashMap { + LruHashMap(UnsafeCell::new(LruHashMapDef::new())) + } + + /// Retrieve the value associate with `key` from the map. + /// This function is unsafe. Unless the map flag `BPF_F_NO_PREALLOC` is used, the kernel does not + /// make guarantee on the atomicity of `insert` or `remove`, and any element removed from the + /// map might get aliased by another element in the map, causing garbage to be read, or + /// corruption in case of writes. + #[inline] + pub unsafe fn get(&self, key: &K) -> Option<&V> { + get(self.0.get() as _, key) + } + + /// Retrieve the value associate with `key` from the map. + /// The same caveat as `get` applies, but this returns a raw pointer and it's up to the caller + /// to decide whether it's safe to dereference the pointer or not. + #[inline] + pub fn get_ptr(&self, key: &K) -> Option<*const V> { + get_ptr(self.0.get() as _, key) + } + + /// Retrieve the value associate with `key` from the map. + /// The same caveat as `get` applies, and additionally cares should be taken to avoid + /// concurrent writes, but it's up to the caller to decide whether it's safe to dereference the + /// pointer or not. + #[inline] + pub fn get_ptr_mut(&self, key: &K) -> Option<*mut V> { + get_ptr_mut(self.0.get() as _, key) + } + + #[inline] + pub fn insert(&self, key: &K, value: &V, flags: u64) -> Result<(), c_long> { + insert(self.0.get() as _, key, value, flags) + } + + #[inline] + pub fn remove(&self, key: &K) -> Result<(), c_long> { + remove(self.0.get() as _, key) + } +} + +btf_map_def!(PerCpuHashMapDef, BPF_MAP_TYPE_PERCPU_HASH); + +#[repr(transparent)] +pub struct PerCpuHashMap( + UnsafeCell>, +); + +unsafe impl Sync for PerCpuHashMap {} + +impl PerCpuHashMap { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> PerCpuHashMap { + PerCpuHashMap(UnsafeCell::new(PerCpuHashMapDef::new())) + } + + /// Retrieve the value associate with `key` from the map. + /// This function is unsafe. Unless the map flag `BPF_F_NO_PREALLOC` is used, the kernel does not + /// make guarantee on the atomicity of `insert` or `remove`, and any element removed from the + /// map might get aliased by another element in the map, causing garbage to be read, or + /// corruption in case of writes. + #[inline] + pub unsafe fn get(&self, key: &K) -> Option<&V> { + get(self.0.get() as _, key) + } + + /// Retrieve the value associate with `key` from the map. + /// The same caveat as `get` applies, but this returns a raw pointer and it's up to the caller + /// to decide whether it's safe to dereference the pointer or not. + #[inline] + pub fn get_ptr(&self, key: &K) -> Option<*const V> { + get_ptr(self.0.get() as _, key) + } + + /// Retrieve the value associate with `key` from the map. + /// The same caveat as `get` applies, and additionally cares should be taken to avoid + /// concurrent writes, but it's up to the caller to decide whether it's safe to dereference the + /// pointer or not. + #[inline] + pub fn get_ptr_mut(&self, key: &K) -> Option<*mut V> { + get_ptr_mut(self.0.get() as _, key) + } + + #[inline] + pub fn insert(&self, key: &K, value: &V, flags: u64) -> Result<(), c_long> { + insert(self.0.get() as _, key, value, flags) + } + + #[inline] + pub fn remove(&self, key: &K) -> Result<(), c_long> { + remove(self.0.get() as _, key) + } +} + +#[inline] +fn get_ptr_mut(def: *mut c_void, key: &K) -> Option<*mut V> { + unsafe { + let value = bpf_map_lookup_elem(def as *mut _, key as *const _ as *const c_void); + // FIXME: alignment + NonNull::new(value as *mut V).map(|p| p.as_ptr()) + } +} + +#[inline] +fn get_ptr(def: *mut c_void, key: &K) -> Option<*const V> { + get_ptr_mut(def, key).map(|p| p as *const V) +} + +#[inline] +unsafe fn get<'a, K, V>(def: *mut c_void, key: &K) -> Option<&'a V> { + get_ptr(def, key).map(|p| &*p) +} + +#[inline] +fn insert(def: *mut c_void, key: &K, value: &V, flags: u64) -> Result<(), c_long> { + let ret = unsafe { + bpf_map_update_elem( + def as *mut _, + key as *const _ as *const _, + value as *const _ as *const _, + flags, + ) + }; + (ret == 0).then_some(()).ok_or(ret) +} + +#[inline] +fn remove(def: *mut c_void, key: &K) -> Result<(), c_long> { + let ret = unsafe { bpf_map_delete_elem(def as *mut _, key as *const _ as *const c_void) }; + (ret == 0).then_some(()).ok_or(ret) +} diff --git a/ebpf/aya-ebpf/src/btf_maps/lpm_trie.rs b/ebpf/aya-ebpf/src/btf_maps/lpm_trie.rs new file mode 100644 index 000000000..0bf6e8419 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/lpm_trie.rs @@ -0,0 +1,26 @@ +// 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 } + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/mod.rs b/ebpf/aya-ebpf/src/btf_maps/mod.rs new file mode 100644 index 000000000..40c91cb42 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/mod.rs @@ -0,0 +1,77 @@ +use core::marker::PhantomData; + +pub mod array; +pub mod bloom_filter; +pub mod hash_map; +pub mod lpm_trie; +pub mod per_cpu_array; +pub mod perf; +pub mod program_array; +pub mod queue; +pub mod ring_buf; +pub mod sock_hash; +pub mod sock_map; +pub mod stack; +pub mod stack_trace; +pub mod xdp; + +pub use array::Array; +pub use bloom_filter::BloomFilter; +pub use hash_map::{HashMap, LruHashMap, PerCpuHashMap}; +pub use per_cpu_array::PerCpuArray; +pub use perf::{PerfEventArray, PerfEventByteArray}; +pub use program_array::ProgramArray; +pub use queue::Queue; +pub use ring_buf::RingBuf; +pub use sock_hash::SockHash; +pub use sock_map::SockMap; +pub use stack::Stack; +pub use stack_trace::StackTrace; +pub use xdp::{CpuMap, DevMap, DevMapHash, XskMap}; + +/// A marker used to remove names of annotated types in LLVM debug info and +/// therefore also in BTF. +/// +/// # Example +#[repr(transparent)] +pub(crate) struct AyaBtfMapMarker(PhantomData<()>); + +impl AyaBtfMapMarker { + pub(crate) const fn new() -> Self { + Self(PhantomData) + } +} + +#[macro_export] +macro_rules! btf_map_def { + ($name:ident, $t:ident) => { + #[allow(dead_code)] + pub struct $name { + r#type: *const [i32; $t as usize], + key: *const K, + value: *const V, + max_entries: *const [i32; M], + map_flags: *const [i32; F], + + // Anonymize the struct. + _anon: $crate::btf_maps::AyaBtfMapMarker, + } + + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` + // method. `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + impl $name { + pub const fn new() -> $name { + $name { + r#type: &[0i32; $t as usize], + key: ::core::ptr::null(), + value: ::core::ptr::null(), + max_entries: &[0i32; M], + map_flags: &[0i32; F], + _anon: $crate::btf_maps::AyaBtfMapMarker::new(), + } + } + } + }; +} diff --git a/ebpf/aya-ebpf/src/btf_maps/per_cpu_array.rs b/ebpf/aya-ebpf/src/btf_maps/per_cpu_array.rs new file mode 100644 index 000000000..28940097c --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/per_cpu_array.rs @@ -0,0 +1,48 @@ +use core::{cell::UnsafeCell, ptr::NonNull}; + +use aya_ebpf_bindings::helpers::bpf_map_lookup_elem; + +use crate::{bindings::bpf_map_type::BPF_MAP_TYPE_PERCPU_ARRAY, btf_map_def, cty::c_void}; + +btf_map_def!(PerCpuArrayDef, BPF_MAP_TYPE_PERCPU_ARRAY); + +#[repr(transparent)] +pub struct PerCpuArray( + UnsafeCell>, +); + +unsafe impl Sync for PerCpuArray {} + +impl PerCpuArray { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(PerCpuArrayDef::new())) + } + + #[inline(always)] + pub fn get(&self, index: u32) -> Option<&T> { + unsafe { + // FIXME: alignment + self.lookup(index).map(|p| p.as_ref()) + } + } + + #[inline(always)] + pub fn get_ptr(&self, index: u32) -> Option<*const T> { + unsafe { self.lookup(index).map(|p| p.as_ptr() as *const T) } + } + + #[inline(always)] + pub fn get_ptr_mut(&self, index: u32) -> Option<*mut T> { + unsafe { self.lookup(index).map(|p| p.as_ptr()) } + } + + #[inline(always)] + unsafe fn lookup(&self, index: u32) -> Option> { + let ptr = bpf_map_lookup_elem(self.0.get() as *mut _, &index as *const _ as *const c_void); + NonNull::new(ptr as *mut T) + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/perf/mod.rs b/ebpf/aya-ebpf/src/btf_maps/perf/mod.rs new file mode 100644 index 000000000..5e0df5fb3 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/perf/mod.rs @@ -0,0 +1,38 @@ +use core::mem; + +mod perf_event_array; +mod perf_event_byte_array; + +pub use perf_event_array::PerfEventArray; +pub use perf_event_byte_array::PerfEventByteArray; + +use crate::{bindings::bpf_map_type::BPF_MAP_TYPE_PERF_EVENT_ARRAY, btf_maps::AyaBtfMapMarker}; + +#[allow(dead_code)] +pub struct PerfEventArrayDef { + r#type: *const [i32; BPF_MAP_TYPE_PERF_EVENT_ARRAY as usize], + key_size: *const [i32; mem::size_of::()], + value_size: *const [i32; mem::size_of::()], + max_entries: *const [i32; 0], + map_flags: *const [i32; F], + + // Anonymize the struct. + _anon: AyaBtfMapMarker, +} + +impl PerfEventArrayDef { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self { + r#type: &[0i32; BPF_MAP_TYPE_PERF_EVENT_ARRAY as usize], + key_size: &[0i32; mem::size_of::()], + value_size: &[0i32; mem::size_of::()], + max_entries: &[0i32; 0], + map_flags: &[0i32; F], + _anon: AyaBtfMapMarker::new(), + } + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/perf/perf_event_array.rs b/ebpf/aya-ebpf/src/btf_maps/perf/perf_event_array.rs new file mode 100644 index 000000000..7576d5c73 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/perf/perf_event_array.rs @@ -0,0 +1,44 @@ +use core::{cell::UnsafeCell, marker::PhantomData, mem}; + +use crate::{ + bindings::BPF_F_CURRENT_CPU, btf_maps::perf::PerfEventArrayDef, helpers::bpf_perf_event_output, + EbpfContext, +}; + +#[repr(transparent)] +pub struct PerfEventArray { + def: UnsafeCell>, + _t: PhantomData, +} + +unsafe impl Sync for PerfEventArray {} + +impl PerfEventArray { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self { + def: UnsafeCell::new(PerfEventArrayDef::new()), + _t: PhantomData, + } + } + + pub fn output(&self, ctx: &C, data: &T, flags: u32) { + self.output_at_index(ctx, BPF_F_CURRENT_CPU as u32, data, flags) + } + + pub fn output_at_index(&self, ctx: &C, index: u32, data: &T, flags: u32) { + let flags = (u64::from(flags) << 32) | u64::from(index); + unsafe { + bpf_perf_event_output( + ctx.as_ptr(), + self.def.get() as *mut _, + flags, + data as *const _ as *mut _, + mem::size_of::() as u64, + ); + } + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/perf/perf_event_byte_array.rs b/ebpf/aya-ebpf/src/btf_maps/perf/perf_event_byte_array.rs new file mode 100644 index 000000000..723d3bcc4 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/perf/perf_event_byte_array.rs @@ -0,0 +1,38 @@ +use core::cell::UnsafeCell; + +use crate::{ + bindings::BPF_F_CURRENT_CPU, btf_maps::perf::PerfEventArrayDef, helpers::bpf_perf_event_output, + EbpfContext, +}; + +#[repr(transparent)] +pub struct PerfEventByteArray(UnsafeCell>); + +unsafe impl Sync for PerfEventByteArray {} + +impl PerfEventByteArray { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(PerfEventArrayDef::new())) + } + + pub fn output(&self, ctx: &C, data: &[u8], flags: u32) { + self.output_at_index(ctx, BPF_F_CURRENT_CPU as u32, data, flags) + } + + pub fn output_at_index(&self, ctx: &C, index: u32, data: &[u8], flags: u32) { + let flags = (u64::from(flags) << 32) | u64::from(index); + unsafe { + bpf_perf_event_output( + ctx.as_ptr(), + self.0.get() as *mut _, + flags, + data.as_ptr() as *mut _, + data.len() as u64, + ); + } + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/program_array.rs b/ebpf/aya-ebpf/src/btf_maps/program_array.rs new file mode 100644 index 000000000..07c059345 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/program_array.rs @@ -0,0 +1,84 @@ +use core::{cell::UnsafeCell, hint::unreachable_unchecked, mem}; + +use crate::{ + bindings::bpf_map_type::BPF_MAP_TYPE_PROG_ARRAY, btf_maps::AyaBtfMapMarker, cty::c_long, + helpers::bpf_tail_call, EbpfContext, +}; + +#[allow(dead_code)] +pub struct ProgramArrayDef { + r#type: *const [i32; BPF_MAP_TYPE_PROG_ARRAY 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], + + // Anonymize the struct. + _anon: AyaBtfMapMarker, +} + +#[repr(transparent)] +pub struct ProgramArray(UnsafeCell>); + +impl ProgramArray { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(ProgramArrayDef { + r#type: &[0i32; BPF_MAP_TYPE_PROG_ARRAY as usize] as *const _, + key_size: &[0i32; mem::size_of::()] as *const _, + value_size: &[0i32; mem::size_of::()] as *const _, + max_entries: &[0i32; M] as *const _, + map_flags: &[0i32; F] as *const _, + _anon: AyaBtfMapMarker::new(), + })) + } + + /// Perform a tail call into a program indexed by this map. + /// + /// # Safety + /// + /// This function is inherently unsafe, since it causes control flow to jump into + /// another eBPF program. This can have side effects, such as drop methods not being + /// called. Note that tail calling into an eBPF program is not the same thing as + /// a function call -- control flow never returns to the caller. + /// + /// # Return Value + /// + /// On success, this function **does not return** into the original program. + /// On failure, a negative error is returned, wrapped in `Err()`. + #[cfg(not(unstable))] + pub unsafe fn tail_call(&self, ctx: &C, index: u32) -> Result<(), c_long> { + let res = bpf_tail_call(ctx.as_ptr(), self.0.get() as *mut _, index); + if res != 0 { + Err(res) + } else { + unreachable_unchecked() + } + } + + /// Perform a tail call into a program indexed by this map. + /// + /// # Safety + /// + /// This function is inherently unsafe, since it causes control flow to jump into + /// another eBPF program. This can have side effects, such as drop methods not being + /// called. Note that tail calling into an eBPF program is not the same thing as + /// a function call -- control flow never returns to the caller. + /// + /// # Return Value + /// + /// On success, this function **does not return** into the original program. + /// On failure, a negative error is returned, wrapped in `Err()`. + #[cfg(unstable)] + pub unsafe fn tail_call(&self, ctx: &C, index: u32) -> Result { + let res = bpf_tail_call(ctx.as_ptr(), self.0.get() as *mut _, index); + if res != 0 { + Err(res) + } else { + unreachable_unchecked() + } + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/queue.rs b/ebpf/aya-ebpf/src/btf_maps/queue.rs new file mode 100644 index 000000000..14990efce --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/queue.rs @@ -0,0 +1,54 @@ +use core::{cell::UnsafeCell, mem, ptr}; + +use crate::{ + bindings::bpf_map_type::BPF_MAP_TYPE_QUEUE, + btf_maps::AyaBtfMapMarker, + helpers::{bpf_map_pop_elem, bpf_map_push_elem}, +}; + +#[allow(dead_code)] +pub struct QueueDef { + r#type: *const [i32; BPF_MAP_TYPE_QUEUE as usize], + value: *const T, + max_entries: *const [i32; M], + map_flags: *const [i32; F], + + // Anonymize the struct. + _anon: AyaBtfMapMarker, +} + +#[repr(transparent)] +pub struct Queue(UnsafeCell>); + +unsafe impl Sync for Queue {} + +impl Queue { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(QueueDef { + r#type: &[0i32; BPF_MAP_TYPE_QUEUE as usize], + value: ptr::null(), + max_entries: &[0i32; M], + map_flags: &[0i32; F], + _anon: AyaBtfMapMarker::new(), + })) + } + + pub fn push(&self, value: &T, flags: u64) -> Result<(), i64> { + let ret = unsafe { + bpf_map_push_elem(self.0.get() as *mut _, value as *const _ as *const _, flags) + }; + (ret == 0).then_some(()).ok_or(ret) + } + + pub fn pop(&self) -> Option { + unsafe { + let mut value = mem::MaybeUninit::uninit(); + let ret = bpf_map_pop_elem(self.0.get() as *mut _, value.as_mut_ptr() as *mut _); + (ret == 0).then_some(value.assume_init()) + } + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/ring_buf.rs b/ebpf/aya-ebpf/src/btf_maps/ring_buf.rs new file mode 100644 index 000000000..3159bec67 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/ring_buf.rs @@ -0,0 +1,163 @@ +use core::{ + cell::UnsafeCell, + mem::{self, MaybeUninit}, + ops::{Deref, DerefMut}, +}; + +#[cfg(unstable)] +mod const_assert { + pub struct Assert {} + + pub trait IsTrue {} + + impl IsTrue for Assert {} +} +#[cfg(unstable)] +use const_assert::{Assert, IsTrue}; + +use crate::{ + bindings::bpf_map_type::BPF_MAP_TYPE_RINGBUF, + btf_maps::AyaBtfMapMarker, + helpers::{ + bpf_ringbuf_discard, bpf_ringbuf_output, bpf_ringbuf_query, bpf_ringbuf_reserve, + bpf_ringbuf_submit, + }, +}; + +#[allow(dead_code)] +pub struct RingBufDef { + r#type: *const [i32; BPF_MAP_TYPE_RINGBUF as usize], + max_entries: *const [i32; S], + + // Anonymize the struct. + _anon: AyaBtfMapMarker, +} + +#[repr(transparent)] +pub struct RingBuf(UnsafeCell>); + +unsafe impl Sync for RingBuf {} + +/// A ring buffer entry, returned from [`RingBuf::reserve`]. +/// +/// You must [`submit`] or [`discard`] this entry before it gets dropped. +/// +/// [`submit`]: RingBufEntry::submit +/// [`discard`]: RingBufEntry::discard +#[must_use = "eBPF verifier requires ring buffer entries to be either submitted or discarded"] +pub struct RingBufEntry(&'static mut MaybeUninit); + +impl Deref for RingBufEntry { + type Target = MaybeUninit; + + fn deref(&self) -> &Self::Target { + self.0 + } +} + +impl DerefMut for RingBufEntry { + fn deref_mut(&mut self) -> &mut Self::Target { + self.0 + } +} + +impl RingBufEntry { + /// Discard this ring buffer entry. The entry will be skipped by the userspace reader. + pub fn discard(self, flags: u64) { + unsafe { bpf_ringbuf_discard(self.0.as_mut_ptr() as *mut _, flags) }; + } + + /// Commit this ring buffer entry. The entry will be made visible to the userspace reader. + pub fn submit(self, flags: u64) { + unsafe { bpf_ringbuf_submit(self.0.as_mut_ptr() as *mut _, flags) }; + } +} + +impl RingBuf { + /// Declare an eBPF ring buffer. + /// + /// The linux kernel requires that `byte_size` be a power-of-2 multiple of the page size. The + /// loading program may coerce the size when loading the map. + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(RingBufDef { + r#type: &[0i32; BPF_MAP_TYPE_RINGBUF as usize], + max_entries: &[0i32; S], + _anon: AyaBtfMapMarker::new(), + })) + } + + /// Reserve memory in the ring buffer that can fit `T`. + /// + /// Returns `None` if the ring buffer is full. + #[cfg(unstable)] + pub fn reserve(&self, flags: u64) -> Option> + where + Assert<{ 8 % mem::align_of::() == 0 }>: IsTrue, + { + self.reserve_impl(flags) + } + + /// Reserve memory in the ring buffer that can fit `T`. + /// + /// Returns `None` if the ring buffer is full. + /// + /// The kernel will reserve memory at an 8-bytes aligned boundary, so `mem::align_of()` must + /// be equal or smaller than 8. If you use this with a `T` that isn't properly aligned, this + /// function will be compiled to a panic; depending on your panic_handler, this may make + /// the eBPF program fail to load, or it may make it have undefined behavior. + #[cfg(not(unstable))] + pub fn reserve(&self, flags: u64) -> Option> { + assert_eq!(8 % mem::align_of::(), 0); + self.reserve_impl(flags) + } + + fn reserve_impl(&self, flags: u64) -> Option> { + let ptr = + unsafe { bpf_ringbuf_reserve(self.0.get() as *mut _, mem::size_of::() as _, flags) } + as *mut MaybeUninit; + unsafe { ptr.as_mut() }.map(|ptr| RingBufEntry(ptr)) + } + + /// Copy `data` to the ring buffer output. + /// + /// Consider using [`reserve`] and [`submit`] if `T` is statically sized and you want to save a + /// copy from either a map buffer or the stack. + /// + /// Unlike [`reserve`], this function can handle dynamically sized types (which is hard to + /// create in eBPF but still possible, e.g. by slicing an array). + /// + /// Note: `T` must be aligned to no more than 8 bytes; it's not possible to fulfill larger + /// alignment requests. If you use this with a `T` that isn't properly aligned, this function will + /// be compiled to a panic and silently make your eBPF program fail to load. + /// See [here](https://github.com/torvalds/linux/blob/3f01e9fed/kernel/bpf/ringbuf.c#L418). + /// + /// [`reserve`]: RingBuf::reserve + /// [`submit`]: RingBufEntry::submit + pub fn output(&self, data: &T, flags: u64) -> Result<(), i64> { + assert_eq!(8 % mem::align_of_val(data), 0); + let ret = unsafe { + bpf_ringbuf_output( + self.0.get() as *mut _, + data as *const _ as *mut _, + mem::size_of_val(data) as _, + flags, + ) + }; + if ret < 0 { + Err(ret) + } else { + Ok(()) + } + } + + /// Query various information about the ring buffer. + /// + /// Consult `bpf_ringbuf_query` documentation for a list of allowed flags. + pub fn query(&self, flags: u64) -> u64 { + unsafe { bpf_ringbuf_query(self.0.get() as *mut _, flags) } + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/sock_hash.rs b/ebpf/aya-ebpf/src/btf_maps/sock_hash.rs new file mode 100644 index 000000000..69c885e14 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/sock_hash.rs @@ -0,0 +1,102 @@ +use core::{borrow::Borrow, cell::UnsafeCell, ptr}; + +use aya_ebpf_cty::c_void; + +use crate::{ + bindings::{bpf_map_type::BPF_MAP_TYPE_SOCKHASH, bpf_sock_ops}, + btf_maps::AyaBtfMapMarker, + helpers::{ + bpf_map_lookup_elem, bpf_msg_redirect_hash, bpf_sk_assign, bpf_sk_redirect_hash, + bpf_sk_release, bpf_sock_hash_update, + }, + programs::{SkBuffContext, SkLookupContext, SkMsgContext}, + EbpfContext, +}; + +#[allow(dead_code)] +pub struct SockHashDef { + r#type: *const [i32; BPF_MAP_TYPE_SOCKHASH as usize], + key: *const K, + value: *const u32, + max_entries: *const [i32; M], + map_flags: *const [i32; F], + + // Anonymize the struct. + _anon: AyaBtfMapMarker, +} + +#[repr(transparent)] +pub struct SockHash(UnsafeCell>); + +unsafe impl Sync for SockHash {} + +impl SockHash { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(SockHashDef { + r#type: &[0i32; BPF_MAP_TYPE_SOCKHASH as usize], + key: ptr::null(), + value: ptr::null(), + max_entries: &[0i32; M], + map_flags: &[0i32; F], + _anon: AyaBtfMapMarker::new(), + })) + } + + pub fn update(&self, key: &mut K, sk_ops: &mut bpf_sock_ops, flags: u64) -> Result<(), i64> { + let ret = unsafe { + bpf_sock_hash_update( + sk_ops as *mut _, + self.0.get() as *mut _, + key as *mut _ as *mut c_void, + flags, + ) + }; + (ret == 0).then_some(()).ok_or(ret) + } + + pub fn redirect_msg(&self, ctx: &SkMsgContext, key: &mut K, flags: u64) -> i64 { + unsafe { + bpf_msg_redirect_hash( + ctx.as_ptr() as *mut _, + self.0.get() as *mut _, + key as *mut _ as *mut _, + flags, + ) + } + } + + pub fn redirect_skb(&self, ctx: &SkBuffContext, key: &mut K, flags: u64) -> i64 { + unsafe { + bpf_sk_redirect_hash( + ctx.as_ptr() as *mut _, + self.0.get() as *mut _, + key as *mut _ as *mut _, + flags, + ) + } + } + + pub fn redirect_sk_lookup( + &mut self, + ctx: &SkLookupContext, + key: impl Borrow, + flags: u64, + ) -> Result<(), u32> { + unsafe { + let sk = bpf_map_lookup_elem( + &mut self.0 as *mut _ as *mut _, + &key as *const _ as *const c_void, + ); + if sk.is_null() { + return Err(1); + } + let ret = bpf_sk_assign(ctx.as_ptr() as *mut _, sk, flags); + bpf_sk_release(sk); + (ret == 0).then_some(()).ok_or(1) + } + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/sock_map.rs b/ebpf/aya-ebpf/src/btf_maps/sock_map.rs new file mode 100644 index 000000000..126232d55 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/sock_map.rs @@ -0,0 +1,95 @@ +use core::{cell::UnsafeCell, ptr}; + +use aya_ebpf_cty::c_void; + +use crate::{ + bindings::{bpf_map_type::BPF_MAP_TYPE_SOCKMAP, bpf_sock_ops}, + btf_maps::AyaBtfMapMarker, + helpers::{ + bpf_map_lookup_elem, bpf_msg_redirect_map, bpf_sk_assign, bpf_sk_redirect_map, + bpf_sk_release, bpf_sock_map_update, + }, + programs::{SkBuffContext, SkLookupContext, SkMsgContext}, + EbpfContext, +}; + +#[allow(dead_code)] +pub struct SockMapDef { + r#type: *const [i32; BPF_MAP_TYPE_SOCKMAP as usize], + key: *const u32, + value: *const u32, + max_entries: *const [i32; M], + map_flags: *const [i32; F], + + // Anonymize the struct. + _anon: AyaBtfMapMarker, +} + +#[repr(transparent)] +pub struct SockMap(UnsafeCell>); + +unsafe impl Sync for SockMap {} + +impl SockMap { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(SockMapDef { + r#type: &[0i32; BPF_MAP_TYPE_SOCKMAP as usize], + key: ptr::null(), + value: ptr::null(), + max_entries: &[0i32; M], + map_flags: &[0i32; F], + _anon: AyaBtfMapMarker::new(), + })) + } + + pub unsafe fn update( + &self, + mut index: u32, + sk_ops: *mut bpf_sock_ops, + flags: u64, + ) -> Result<(), i64> { + let ret = bpf_sock_map_update( + sk_ops, + self.0.get() as *mut _, + &mut index as *mut _ as *mut c_void, + flags, + ); + if ret == 0 { + Ok(()) + } else { + Err(ret) + } + } + + pub unsafe fn redirect_msg(&self, ctx: &SkMsgContext, index: u32, flags: u64) -> i64 { + bpf_msg_redirect_map(ctx.as_ptr() as *mut _, self.0.get() as *mut _, index, flags) + } + + pub unsafe fn redirect_skb(&self, ctx: &SkBuffContext, index: u32, flags: u64) -> i64 { + bpf_sk_redirect_map(ctx.as_ptr() as *mut _, self.0.get() as *mut _, index, flags) + } + + pub fn redirect_sk_lookup( + &mut self, + ctx: &SkLookupContext, + index: u32, + flags: u64, + ) -> Result<(), u32> { + unsafe { + let sk = bpf_map_lookup_elem( + &mut self.0 as *mut _ as *mut _, + &index as *const _ as *const c_void, + ); + if sk.is_null() { + return Err(1); + } + let ret = bpf_sk_assign(ctx.as_ptr() as *mut _, sk, flags); + bpf_sk_release(sk); + (ret == 0).then_some(()).ok_or(1) + } + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/stack.rs b/ebpf/aya-ebpf/src/btf_maps/stack.rs new file mode 100644 index 000000000..bca886621 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/stack.rs @@ -0,0 +1,51 @@ +use core::{cell::UnsafeCell, mem, ptr}; + +use crate::{ + bindings::bpf_map_type::BPF_MAP_TYPE_STACK, + btf_maps::AyaBtfMapMarker, + helpers::{bpf_map_pop_elem, bpf_map_push_elem}, +}; + +#[allow(dead_code)] +pub struct StackDef { + r#type: *const [i32; BPF_MAP_TYPE_STACK as usize], + value: *const T, + max_entries: *const [i32; M], + + // Anonymize the struct. + _anon: AyaBtfMapMarker, +} + +#[repr(transparent)] +pub struct Stack(UnsafeCell>); + +unsafe impl Sync for Stack {} + +impl Stack { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(StackDef { + r#type: &[0i32; BPF_MAP_TYPE_STACK as usize], + value: ptr::null(), + max_entries: &[0i32; M], + _anon: AyaBtfMapMarker::new(), + })) + } + + pub fn push(&self, value: &T, flags: u64) -> Result<(), i64> { + let ret = + unsafe { bpf_map_push_elem(self.0.get() as _, value as *const _ as *const _, flags) }; + (ret == 0).then_some(()).ok_or(ret) + } + + pub fn pop(&self) -> Option { + unsafe { + let mut value = mem::MaybeUninit::uninit(); + let ret = bpf_map_pop_elem(self.0.get() as _, value.as_mut_ptr() as *mut _); + (ret == 0).then_some(value.assume_init()) + } + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/stack_trace.rs b/ebpf/aya-ebpf/src/btf_maps/stack_trace.rs new file mode 100644 index 000000000..903473eae --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/stack_trace.rs @@ -0,0 +1,52 @@ +use core::{cell::UnsafeCell, mem}; + +use crate::{ + bindings::bpf_map_type::BPF_MAP_TYPE_STACK_TRACE, btf_maps::AyaBtfMapMarker, + helpers::bpf_get_stackid, EbpfContext, +}; + +const PERF_MAX_STACK_DEPTH: usize = 127; +const VALUE_SIZE: usize = mem::size_of::() * PERF_MAX_STACK_DEPTH; + +#[allow(dead_code)] +pub struct StackTraceDef { + r#type: *const [i32; BPF_MAP_TYPE_STACK_TRACE as usize], + key_size: *const [i32; mem::size_of::()], + value_size: *const [i32; VALUE_SIZE], + max_entries: *const [i32; M], + map_flags: *const [i32; F], + + // Anonymize the struct. + _anon: AyaBtfMapMarker, +} + +#[repr(transparent)] +pub struct StackTrace(UnsafeCell>); + +unsafe impl Sync for StackTrace {} + +impl StackTrace { + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(StackTraceDef { + r#type: &[0i32; BPF_MAP_TYPE_STACK_TRACE as usize], + key_size: &[0i32; mem::size_of::()], + value_size: &[0i32; VALUE_SIZE], + max_entries: &[0i32; M], + map_flags: &[0i32; F], + _anon: AyaBtfMapMarker::new(), + })) + } + + pub unsafe fn get_stackid(&self, ctx: &C, flags: u64) -> Result { + let ret = bpf_get_stackid(ctx.as_ptr(), self.0.get() as *mut _, flags); + if ret < 0 { + Err(ret) + } else { + Ok(ret) + } + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/xdp/cpu_map.rs b/ebpf/aya-ebpf/src/btf_maps/xdp/cpu_map.rs new file mode 100644 index 000000000..6f10e533a --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/xdp/cpu_map.rs @@ -0,0 +1,96 @@ +use core::{cell::UnsafeCell, mem}; + +use aya_ebpf_bindings::bindings::bpf_cpumap_val; + +use super::try_redirect_map; +use crate::bindings::bpf_map_type::BPF_MAP_TYPE_CPUMAP; + +#[allow(dead_code)] +pub struct CpuMapDef { + r#type: *const [i32; BPF_MAP_TYPE_CPUMAP 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], +} + +/// An array of available CPUs. +/// +/// XDP programs can use this map to redirect packets to a target CPU for processing. +/// +/// # Minimum kernel version +/// +/// The minimum kernel version required to use this feature is 4.15. +/// +/// # Examples +/// +/// ```rust,no_run +/// use aya_ebpf::{bindings::xdp_action, btf_maps::CpuMap, macros::{btf_map, xdp}, programs::XdpContext}; +/// +/// #[btf_map] +/// static MAP: CpuMap<8> = CpuMap::new(); +/// +/// #[xdp] +/// fn xdp(_ctx: XdpContext) -> u32 { +/// // Redirect to CPU 7 or drop packet if no entry found. +/// MAP.redirect(7, xdp_action::XDP_DROP as u64).unwrap_or(xdp_action::XDP_DROP) +/// } +/// ``` +#[repr(transparent)] +pub struct CpuMap(UnsafeCell>); + +unsafe impl Sync for CpuMap {} + +impl CpuMap { + /// Creates a [`CpuMap`] with a set maximum number of elements. + /// + /// In a CPU map, an entry represents a CPU core. Thus there should be as many entries as there + /// are CPU cores on the system. `max_entries` can be set to zero here, and updated by userspace + /// at runtime. Refer to the userspace documentation for more information. + /// + /// # Examples + /// + /// ```rust,no_run + /// use aya_ebpf::{macros::btf_map, btf_maps::CpuMap}; + /// + /// #[btf_map] + /// static MAP: CpuMap<8, 0> = CpuMap::new(); + /// ``` + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(CpuMapDef { + r#type: &[0i32; BPF_MAP_TYPE_CPUMAP as usize], + key_size: &[0i32; mem::size_of::()], + value_size: &[0i32; mem::size_of::()], + max_entries: &[0i32; M], + map_flags: &[0i32; F], + })) + } + + /// Redirects the current packet on the CPU at `index`. + /// + /// The lower two bits of `flags` are used for the return code if the map lookup fails, which + /// can be used as the XDP program's return code if a CPU cannot be found. + /// + /// # Examples + /// + /// ```rust,no_run + /// use aya_ebpf::{bindings::xdp_action, btf_maps::CpuMap, macros::{btf_map, xdp}, programs::XdpContext}; + /// + /// #[btf_map] + /// static MAP: CpuMap<8> = CpuMap::new(); + /// + /// #[xdp] + /// fn xdp(_ctx: XdpContext) -> u32 { + /// // Redirect to CPU 7 or drop packet if no entry found. + /// MAP.redirect(7, 0).unwrap_or(xdp_action::XDP_DROP) + /// } + /// ``` + #[inline(always)] + pub fn redirect(&self, index: u32, flags: u64) -> Result { + try_redirect_map(&self.0, index, flags) + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/xdp/dev_map.rs b/ebpf/aya-ebpf/src/btf_maps/xdp/dev_map.rs new file mode 100644 index 000000000..2661e40d7 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/xdp/dev_map.rs @@ -0,0 +1,142 @@ +use core::{cell::UnsafeCell, mem, num::NonZeroU32, ptr::NonNull}; + +use aya_ebpf_bindings::bindings::bpf_devmap_val; +use aya_ebpf_cty::c_void; + +use super::try_redirect_map; +use crate::{ + bindings::bpf_map_type::BPF_MAP_TYPE_DEVMAP, btf_maps::AyaBtfMapMarker, + helpers::bpf_map_lookup_elem, +}; + +#[allow(dead_code)] +pub struct DevMapDef { + r#type: *const [i32; BPF_MAP_TYPE_DEVMAP 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], + + // Anonymize the struct. + _anon: AyaBtfMapMarker, +} + +/// An array of network devices. +/// +/// XDP programs can use this map to redirect packets to other network deviecs. +/// +/// # Minimum kernel version +/// +/// The minimum kernel version required to use this feature is 4.14. +/// +/// # Examples +/// +/// ```rust,no_run +/// use aya_ebpf::{ +/// bindings::xdp_action, +/// btf_maps::DevMap, +/// macros::{btf_map, xdp}, +/// programs::XdpContext, +/// }; +/// +/// #[btf_map] +/// static MAP: DevMap<1> = DevMap::new(); +/// +/// #[xdp] +/// fn xdp(_ctx: XdpContext) -> u32 { +/// MAP.redirect(0, xdp_action::XDP_PASS as u64).unwrap_or(xdp_action::XDP_DROP) +/// } +/// ``` +#[repr(transparent)] +pub struct DevMap(UnsafeCell>); + +unsafe impl Sync for DevMap {} + +impl DevMap { + /// Creates a [`DevMap`] with a set maximum number of elements. + /// + /// # Examples + /// + /// ```rust,no_run + /// use aya_ebpf::{macros::btf_map, btf_maps::DevMap}; + /// + /// #[btf_map] + /// static MAP: DevMap<8> = DevMap::new(); + /// ``` + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(DevMapDef { + r#type: &[0; BPF_MAP_TYPE_DEVMAP as usize], + key_size: &[0; mem::size_of::()], + value_size: &[0; mem::size_of::()], + max_entries: &[0; M], + map_flags: &[0; F], + _anon: AyaBtfMapMarker::new(), + })) + } + + /// Retrieves the interface index at `index` in the array. + /// + /// To actually redirect a packet, see [`DevMap::redirect`]. + /// + /// # Examples + /// + /// ```rust,no_run + /// use aya_ebpf::{macros::map, maps::DevMap}; + /// + /// #[map] + /// static MAP: DevMap = DevMap::with_max_entries(1, 0); + /// + /// let target_if_index = MAP.get(0).unwrap().if_index; + /// + /// // redirect to if_index + /// ``` + #[inline(always)] + pub fn get(&self, index: u32) -> Option { + unsafe { + let value = + bpf_map_lookup_elem(self.0.get() as *mut _, &index as *const _ as *const c_void); + NonNull::new(value as *mut bpf_devmap_val).map(|p| DevMapValue { + if_index: p.as_ref().ifindex, + // SAFETY: map writes use fd, map reads use id. + // https://elixir.bootlin.com/linux/v6.2/source/include/uapi/linux/bpf.h#L6136 + prog_id: NonZeroU32::new(p.as_ref().bpf_prog.id), + }) + } + } + + /// Redirects the current packet on the interface at `index`. + /// + /// The lower two bits of `flags` are used for the return code if the map lookup fails, which + /// can be used as the XDP program's return code if a CPU cannot be found. + /// + /// # Examples + /// + /// ```rust,no_run + /// use aya_ebpf::{bindings::xdp_action, macros::{map, xdp}, maps::DevMap, programs::XdpContext}; + /// + /// #[map] + /// static MAP: DevMap = DevMap::with_max_entries(8, 0); + /// + /// #[xdp] + /// fn xdp(_ctx: XdpContext) -> u32 { + /// MAP.redirect(7, 0).unwrap_or(xdp_action::XDP_DROP) + /// } + /// ``` + #[inline(always)] + pub fn redirect(&self, index: u32, flags: u64) -> Result { + try_redirect_map(&self.0, index, flags) + } +} + +#[derive(Clone, Copy)] +/// The value of a device map. +pub struct DevMapValue { + /// Target interface index to redirect to. + pub if_index: u32, + /// Chained XDP program ID. + pub prog_id: Option, +} diff --git a/ebpf/aya-ebpf/src/btf_maps/xdp/dev_map_hash.rs b/ebpf/aya-ebpf/src/btf_maps/xdp/dev_map_hash.rs new file mode 100644 index 000000000..4438938de --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/xdp/dev_map_hash.rs @@ -0,0 +1,123 @@ +use core::{cell::UnsafeCell, mem, num::NonZeroU32, ptr::NonNull}; + +use aya_ebpf_bindings::bindings::bpf_devmap_val; +use aya_ebpf_cty::c_void; + +use super::{dev_map::DevMapValue, try_redirect_map}; +use crate::{bindings::bpf_map_type::BPF_MAP_TYPE_DEVMAP_HASH, helpers::bpf_map_lookup_elem}; + +#[allow(dead_code)] +pub struct DevMapHashDef { + r#type: *const [i32; BPF_MAP_TYPE_DEVMAP_HASH 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], +} + +/// A map of network devices. +/// +/// XDP programs can use this map to redirect packets to other network devices. It is similar to +/// [`DevMap`](super::DevMap), but is an hash map rather than an array. Keys do not need to be +/// contiguous nor start at zero, but there is a hashing cost to every lookup. +/// +/// # Minimum kernel version +/// +/// The minimum kernel version required to use this feature is 5.4. +/// +/// # Examples +/// +/// ```rust,no_run +/// use aya_ebpf::{bindings::xdp_action, btf_maps::DevMapHash, macros::{btf_map, xdp}, programs::XdpContext}; +/// +/// #[btf_map] +/// static MAP: DevMapHash<1> = DevMapHash::new(); +/// +/// #[xdp] +/// fn xdp(_ctx: XdpContext) -> u32 { +/// MAP.redirect(42, xdp_action::XDP_PASS as u64).unwrap_or(xdp_action::XDP_DROP) +/// } +/// ``` +#[repr(transparent)] +pub struct DevMapHash(UnsafeCell>); + +unsafe impl Sync for DevMapHash {} + +impl DevMapHash { + /// Creates a [`DevMapHash`] with a set maximum number of elements. + /// + /// # Examples + /// + /// ```rust,no_run + /// use aya_ebpf::{btf_maps::DevMapHash, macros::btf_map}; + /// + /// #[btf_map] + /// static MAP: DevMapHash<8> = DevMapHash::new(); + /// ``` + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(DevMapHashDef { + r#type: &[0; BPF_MAP_TYPE_DEVMAP_HASH as usize], + key_size: &[0; mem::size_of::()], + value_size: &[0; mem::size_of::()], + max_entries: &[0; M], + map_flags: &[0; F], + })) + } + + /// Retrieves the interface index with `key` in the map. + /// + /// To actually redirect a packet, see [`DevMapHash::redirect`]. + /// + /// # Examples + /// + /// ```rust,no_run + /// use aya_ebpf::{btf_maps::DevMapHash, macros::btf_map}; + /// + /// #[btf_map] + /// static MAP: DevMapHash<1> = DevMapHash::new(); + /// + /// let target_if_index = MAP.get(42).unwrap().if_index; + /// + /// // redirect to ifindex + /// ``` + #[inline(always)] + pub fn get(&self, key: u32) -> Option { + unsafe { + let value = + bpf_map_lookup_elem(self.0.get() as *mut _, &key as *const _ as *const c_void); + NonNull::new(value as *mut bpf_devmap_val).map(|p| DevMapValue { + if_index: p.as_ref().ifindex, + // SAFETY: map writes use fd, map reads use id. + // https://elixir.bootlin.com/linux/v6.2/source/include/uapi/linux/bpf.h#L6136 + prog_id: NonZeroU32::new(p.as_ref().bpf_prog.id), + }) + } + } + + /// Redirects the current packet on the interface at `key`. + /// + /// The lower two bits of `flags` are used for the return code if the map lookup fails, which + /// can be used as the XDP program's return code if a CPU cannot be found. + /// + /// # Examples + /// + /// ```rust,no_run + /// use aya_ebpf::{bindings::xdp_action, btf_maps::DevMapHash, macros::{btf_map, xdp}, programs::XdpContext}; + /// + /// #[btf_map] + /// static MAP: DevMapHash<8> = DevMapHash::new(); + /// + /// #[xdp] + /// fn xdp(_ctx: XdpContext) -> u32 { + /// MAP.redirect(7, 0).unwrap_or(xdp_action::XDP_DROP) + /// } + /// ``` + #[inline(always)] + pub fn redirect(&self, key: u32, flags: u64) -> Result { + try_redirect_map(&self.0, key, flags) + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/xdp/mod.rs b/ebpf/aya-ebpf/src/btf_maps/xdp/mod.rs new file mode 100644 index 000000000..0bf341777 --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/xdp/mod.rs @@ -0,0 +1,30 @@ +mod cpu_map; +mod dev_map; +mod dev_map_hash; +mod xsk_map; + +use core::cell::UnsafeCell; + +use aya_ebpf_bindings::{bindings::xdp_action::XDP_REDIRECT, helpers::bpf_redirect_map}; +pub use cpu_map::CpuMap; +pub use dev_map::DevMap; +pub use dev_map_hash::DevMapHash; +pub use xsk_map::XskMap; + +/// Wrapper aroung the `bpf_redirect_map` function. +/// +/// # Return value +/// +/// - `Ok(XDP_REDIRECT)` on success. +/// - `Err(_)` of the lowest two bits of `flags` on failure. +#[inline(always)] +fn try_redirect_map(def: &UnsafeCell, key: u32, flags: u64) -> Result { + // Return XDP_REDIRECT on success, or the value of the two lower bits of the flags argument on + // error. Thus I have no idea why it returns a long (i64) instead of something saner, hence the + // unsigned_abs. + let ret = unsafe { bpf_redirect_map(def.get() as *mut _, key.into(), flags) }; + match ret.unsigned_abs() as u32 { + XDP_REDIRECT => Ok(XDP_REDIRECT), + ret => Err(ret), + } +} diff --git a/ebpf/aya-ebpf/src/btf_maps/xdp/xsk_map.rs b/ebpf/aya-ebpf/src/btf_maps/xdp/xsk_map.rs new file mode 100644 index 000000000..4016d0f2b --- /dev/null +++ b/ebpf/aya-ebpf/src/btf_maps/xdp/xsk_map.rs @@ -0,0 +1,146 @@ +use core::{cell::UnsafeCell, mem, ptr::NonNull}; + +use aya_ebpf_bindings::bindings::bpf_xdp_sock; +use aya_ebpf_cty::c_void; + +use crate::{ + bindings::bpf_map_type::BPF_MAP_TYPE_XSKMAP, + btf_maps::{xdp::try_redirect_map, AyaBtfMapMarker}, + helpers::bpf_map_lookup_elem, +}; + +#[allow(dead_code)] +pub struct XskMapDef { + r#type: *const [i32; BPF_MAP_TYPE_XSKMAP 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], + + // Anonymize the struct. + _anon: AyaBtfMapMarker, +} + +/// An array of AF_XDP sockets. +/// +/// XDP programs can use this map to redirect packets to a target AF_XDP socket using the +/// `XDP_REDIRECT` action. +/// +/// # Minimum kernel version +/// +/// The minimum kernel version required to use this feature is 4.18. +/// +/// # Examples +/// +/// ```rust,no_run +/// use aya_ebpf::{bindings::xdp_action, btf_maps::XskMap, macros::{btf_map, xdp}, programs::XdpContext}; +/// +/// #[btf_map] +/// static SOCKS: XskMap<8> = XskMap::new(); +/// +/// #[xdp] +/// fn xdp(ctx: XdpContext) -> u32 { +/// let queue_id = unsafe { (*ctx.ctx).rx_queue_index }; +/// SOCKS.redirect(queue_id, xdp_action::XDP_DROP as u64).unwrap_or(xdp_action::XDP_DROP) +/// } +/// ``` +/// +/// # Queue management +/// +/// Packets received on a RX queue can only be redirected to sockets bound on the same queue. Most +/// hardware NICs have multiple RX queue to spread the load across multiple CPU cores using RSS. +/// +/// Three strategies are possible: +/// +/// - Reduce the RX queue count to a single one. This option is great for development, but is +/// detrimental for performance as the single CPU core recieving packets will get overwhelmed. +/// Setting the queue count for a NIC can be achieved using `ethtool -L combined 1`. +/// - Create a socket for every RX queue. Most modern NICs will have an RX queue per CPU thread, so +/// a socket per CPU thread is best for performance. To dynamically size the map depending on the +/// recieve queue count, see the userspace documentation of `CpuMap`. +/// - Create a single socket and use a [`CpuMap`](super::CpuMap) to redirect the packet to the +/// correct CPU core. This way, the packet is sent to another CPU, and a chained XDP program can +/// the redirect to the AF_XDP socket. Using a single socket simplifies the userspace code but +/// will not perform great unless not a lot of traffic is redirected to the socket. Regular +/// traffic however will not be impacted, contrary to reducing the queue count. +#[repr(transparent)] +pub struct XskMap(UnsafeCell>); + +unsafe impl Sync for XskMap {} + +impl XskMap { + /// Creates a [`XskMap`] with a set maximum number of elements. + /// + /// # Examples + /// + /// ```rust,no_run + /// use aya_ebpf::{btf_maps::XskMap, macros::btf_map}; + /// + /// #[btf_map] + /// static SOCKS: XskMap<8> = XskMap::new(); + /// ``` + // Implementing `Default` makes no sense in this case. Maps are always + // global variables, so they need to be instantiated with a `const` method. + // The `Default::default` method is not `const`. + #[allow(clippy::new_without_default)] + pub const fn new() -> Self { + Self(UnsafeCell::new(XskMapDef { + r#type: &[0; BPF_MAP_TYPE_XSKMAP as usize], + key_size: &[0; mem::size_of::()], + value_size: &[0; mem::size_of::()], + max_entries: &[0; M], + map_flags: &[0; F], + _anon: AyaBtfMapMarker::new(), + })) + } + + /// Retrieves the queue to which the socket is bound at `index` in the array. + /// + /// To actually redirect a packet, see [`XskMap::redirect`]. + /// + /// # Examples + /// + /// ```rust,no_run + /// use aya_ebpf::{macros::map, maps::XskMap}; + /// + /// #[map] + /// static SOCKS: XskMap = XskMap::with_max_entries(8, 0); + /// + /// let queue_id = SOCKS.get(0); + /// ``` + #[inline(always)] + pub fn get(&self, index: u32) -> Option { + unsafe { + let value = + bpf_map_lookup_elem(self.0.get() as *mut _, &index as *const _ as *const c_void); + NonNull::new(value as *mut bpf_xdp_sock).map(|p| p.as_ref().queue_id) + } + } + + /// Redirects the current packet to the AF_XDP socket at `index`. + /// + /// The lower two bits of `flags` are used for the return code if the map lookup fails, which + /// can be used as the XDP program's return code if a matching socket cannot be found. + /// + /// However, if the socket at `index` is bound to a RX queue which is not the current RX queue, + /// the packet will be dropped. + /// + /// # Examples + /// + /// ```rust,no_run + /// use aya_ebpf::{bindings::xdp_action, macros::{map, xdp}, maps::XskMap, programs::XdpContext}; + /// + /// #[map] + /// static SOCKS: XskMap = XskMap::with_max_entries(8, 0); + /// + /// #[xdp] + /// fn xdp(ctx: XdpContext) -> u32 { + /// let queue_id = unsafe { (*ctx.ctx).rx_queue_index }; + /// SOCKS.redirect(queue_id, 0).unwrap_or(xdp_action::XDP_DROP) + /// } + /// ``` + #[inline(always)] + pub fn redirect(&self, index: u32, flags: u64) -> Result { + try_redirect_map(&self.0, index, flags) + } +} diff --git a/ebpf/aya-ebpf/src/lib.rs b/ebpf/aya-ebpf/src/lib.rs index d3bcf8196..dcb4cd6c8 100644 --- a/ebpf/aya-ebpf/src/lib.rs +++ b/ebpf/aya-ebpf/src/lib.rs @@ -20,6 +20,8 @@ pub use aya_ebpf_bindings::bindings; mod args; pub use args::{PtRegs, RawTracepointArgs}; +#[cfg(feature = "btf-maps")] +pub mod btf_maps; pub mod helpers; pub mod maps; pub mod programs; diff --git a/ebpf/aya-ebpf/src/maps/stack.rs b/ebpf/aya-ebpf/src/maps/stack.rs index 6328693d8..41ad6b842 100644 --- a/ebpf/aya-ebpf/src/maps/stack.rs +++ b/ebpf/aya-ebpf/src/maps/stack.rs @@ -1,4 +1,4 @@ -use core::{marker::PhantomData, mem}; +use core::{cell::UnsafeCell, marker::PhantomData, mem}; use crate::{ bindings::{bpf_map_def, bpf_map_type::BPF_MAP_TYPE_STACK}, @@ -8,14 +8,16 @@ use crate::{ #[repr(transparent)] pub struct Stack { - def: bpf_map_def, + def: UnsafeCell, _t: PhantomData, } +unsafe impl Sync for Stack {} + impl Stack { pub const fn with_max_entries(max_entries: u32, flags: u32) -> Stack { Stack { - def: bpf_map_def { + def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_STACK, key_size: 0, value_size: mem::size_of::() as u32, @@ -23,14 +25,14 @@ impl Stack { map_flags: flags, id: 0, pinning: PinningType::None as u32, - }, + }), _t: PhantomData, } } pub const fn pinned(max_entries: u32, flags: u32) -> Stack { Stack { - def: bpf_map_def { + def: UnsafeCell::new(bpf_map_def { type_: BPF_MAP_TYPE_STACK, key_size: 0, value_size: mem::size_of::() as u32, @@ -38,29 +40,21 @@ impl Stack { map_flags: flags, id: 0, pinning: PinningType::ByName as u32, - }, + }), _t: PhantomData, } } - pub fn push(&mut self, value: &T, flags: u64) -> Result<(), i64> { - let ret = unsafe { - bpf_map_push_elem( - &mut self.def as *mut _ as *mut _, - value as *const _ as *const _, - flags, - ) - }; + pub fn push(&self, value: &T, flags: u64) -> Result<(), i64> { + let ret = + unsafe { bpf_map_push_elem(self.def.get() as _, value as *const _ as *const _, flags) }; (ret == 0).then_some(()).ok_or(ret) } - pub fn pop(&mut self) -> Option { + pub fn pop(&self) -> Option { unsafe { let mut value = mem::MaybeUninit::uninit(); - let ret = bpf_map_pop_elem( - &mut self.def as *mut _ as *mut _, - value.as_mut_ptr() as *mut _, - ); + let ret = bpf_map_pop_elem(self.def.get() as _, value.as_mut_ptr() as *mut _); (ret == 0).then_some(value.assume_init()) } } diff --git a/test/integration-ebpf/.cargo/config.toml b/test/integration-ebpf/.cargo/config.toml new file mode 100644 index 000000000..43d034b74 --- /dev/null +++ b/test/integration-ebpf/.cargo/config.toml @@ -0,0 +1,5 @@ +[target.bpfeb-unknown-none] +rustflags = "-C debuginfo=2 -C link-arg=--btf" + +[target.bpfel-unknown-none] +rustflags = "-C debuginfo=2 -C link-arg=--btf" diff --git a/test/integration-ebpf/Cargo.toml b/test/integration-ebpf/Cargo.toml index 247807171..d2abff0d4 100644 --- a/test/integration-ebpf/Cargo.toml +++ b/test/integration-ebpf/Cargo.toml @@ -27,8 +27,16 @@ name = "log" path = "src/log.rs" [[bin]] -name = "map_test" -path = "src/map_test.rs" +name = "map_info" +path = "src/map_info.rs" + +[[bin]] +name = "maps" +path = "src/maps.rs" + +[[bin]] +name = "maps_btf" +path = "src/maps_btf.rs" [[bin]] name = "memmove_test" @@ -50,6 +58,10 @@ path = "src/raw_tracepoint.rs" name = "redirect" path = "src/redirect.rs" +[[bin]] +name = "redirect_btf" +path = "src/redirect_btf.rs" + [[bin]] name = "relocations" path = "src/relocations.rs" @@ -58,6 +70,10 @@ path = "src/relocations.rs" name = "ring_buf" path = "src/ring_buf.rs" +[[bin]] +name = "ring_buf_btf" +path = "src/ring_buf_btf.rs" + [[bin]] name = "simple_prog" path = "src/simple_prog.rs" diff --git a/test/integration-ebpf/src/map_test.rs b/test/integration-ebpf/src/map_info.rs similarity index 100% rename from test/integration-ebpf/src/map_test.rs rename to test/integration-ebpf/src/map_info.rs diff --git a/test/integration-ebpf/src/maps.rs b/test/integration-ebpf/src/maps.rs new file mode 100644 index 000000000..999132999 --- /dev/null +++ b/test/integration-ebpf/src/maps.rs @@ -0,0 +1,93 @@ +#![no_std] +#![no_main] + +use aya_ebpf::{ + cty::c_long, + macros::{map, uprobe}, + maps::{Array, HashMap, Stack}, + programs::ProbeContext, +}; + +#[map] +static HASH_MAP: HashMap = HashMap::with_max_entries(10, 0); +#[map] +static STACK: Stack = Stack::with_max_entries(10, 0); +#[map] +static RESULT: Array = Array::with_max_entries(1, 0); + +#[uprobe] +pub fn hash_map_insert(ctx: ProbeContext) { + let _ = try_hash_map_insert(ctx); +} + +fn try_hash_map_insert(ctx: ProbeContext) -> Result<(), c_long> { + let key: u32 = ctx.arg(0).ok_or(1)?; + let value: u32 = ctx.arg(1).ok_or(1)?; + + HASH_MAP.insert(&key, &value, 0)?; + + Ok(()) +} + +#[uprobe] +pub fn hash_map_get(ctx: ProbeContext) { + let _ = try_hash_map_get(ctx); +} + +fn try_hash_map_get(ctx: ProbeContext) -> Result<(), c_long> { + // Retrieve the value from the map. + let key: u32 = ctx.arg(0).ok_or(1)?; + let res = unsafe { HASH_MAP.get(&key).ok_or(1)? }; + + // Save it in the array. + let ptr = RESULT.get_ptr_mut(0).ok_or(1)?; + unsafe { *ptr = *res }; + + Ok(()) +} + +#[uprobe] +pub fn hash_map_remove(ctx: ProbeContext) { + let _ = try_hash_map_remove(ctx); +} + +fn try_hash_map_remove(ctx: ProbeContext) -> Result<(), c_long> { + let key: u32 = ctx.arg(0).ok_or(1)?; + + HASH_MAP.remove(&key)?; + + Ok(()) +} + +#[uprobe] +pub fn stack_push(ctx: ProbeContext) { + let _ = try_stack_push(ctx); +} + +fn try_stack_push(ctx: ProbeContext) -> Result<(), c_long> { + let value: u32 = ctx.arg(0).ok_or(1)?; + STACK.push(&value, 0)?; + Ok(()) +} + +#[uprobe] +pub fn stack_pop(_ctx: ProbeContext) { + let _ = try_stack_pop(); +} + +fn try_stack_pop() -> Result<(), c_long> { + // Get the value from stack. + let value = STACK.pop(); + if let Some(value) = value { + // Save it in the array. + let ptr = RESULT.get_ptr_mut(0).ok_or(1)?; + unsafe { *ptr = value }; + } + Ok(()) +} + +#[cfg(not(test))] +#[panic_handler] +fn panic(_info: &core::panic::PanicInfo) -> ! { + loop {} +} diff --git a/test/integration-ebpf/src/maps_btf.rs b/test/integration-ebpf/src/maps_btf.rs new file mode 100644 index 000000000..14278a03c --- /dev/null +++ b/test/integration-ebpf/src/maps_btf.rs @@ -0,0 +1,90 @@ +#![no_std] +#![no_main] + +use aya_ebpf::{ + btf_maps::{Array, HashMap, Stack}, + cty::c_long, + macros::{btf_map, uprobe}, + programs::ProbeContext, +}; + +#[btf_map] +static HASH_MAP: HashMap = HashMap::new(); +#[btf_map] +static STACK: Stack = Stack::new(); + +#[btf_map] +static RESULT: Array = Array::new(); + +#[uprobe] +pub fn hash_map_insert(ctx: ProbeContext) { + let _ = try_hash_map_insert(ctx); +} + +fn try_hash_map_insert(ctx: ProbeContext) -> Result<(), c_long> { + let key: u32 = ctx.arg(0).ok_or(1)?; + let value: u32 = ctx.arg(1).ok_or(1)?; + HASH_MAP.insert(&key, &value, 0)?; + Ok(()) +} + +#[uprobe] +pub fn hash_map_get(ctx: ProbeContext) { + let _ = try_hash_map_get(ctx); +} + +fn try_hash_map_get(ctx: ProbeContext) -> Result<(), c_long> { + // Retrieve the value from the map. + let key: u32 = ctx.arg(0).ok_or(1)?; + let res = unsafe { HASH_MAP.get(&key).ok_or(1)? }; + // Save it in the array. + let ptr = RESULT.get_ptr_mut(0).ok_or(1)?; + unsafe { *ptr = *res }; + Ok(()) +} + +#[uprobe] +pub fn hash_map_remove(ctx: ProbeContext) { + let _ = try_hash_map_remove(ctx); +} + +fn try_hash_map_remove(ctx: ProbeContext) -> Result<(), c_long> { + let key: u32 = ctx.arg(0).ok_or(1)?; + + HASH_MAP.remove(&key)?; + + Ok(()) +} + +#[uprobe] +pub fn stack_push(ctx: ProbeContext) { + let _ = try_stack_push(ctx); +} + +fn try_stack_push(ctx: ProbeContext) -> Result<(), c_long> { + let value: u32 = ctx.arg(0).ok_or(1)?; + STACK.push(&value, 0)?; + Ok(()) +} + +#[uprobe] +pub fn stack_pop(_ctx: ProbeContext) { + let _ = try_stack_pop(); +} + +fn try_stack_pop() -> Result<(), c_long> { + // Get the value from stack. + let value = STACK.pop(); + if let Some(value) = value { + // Save it in the array. + let ptr = RESULT.get_ptr_mut(0).ok_or(1)?; + unsafe { *ptr = value }; + } + Ok(()) +} + +#[cfg(not(test))] +#[panic_handler] +fn panic(_info: &core::panic::PanicInfo) -> ! { + loop {} +} diff --git a/test/integration-ebpf/src/redirect_btf.rs b/test/integration-ebpf/src/redirect_btf.rs new file mode 100644 index 000000000..2c144d178 --- /dev/null +++ b/test/integration-ebpf/src/redirect_btf.rs @@ -0,0 +1,73 @@ +#![no_std] +#![no_main] + +use aya_ebpf::{ + bindings::xdp_action, + btf_maps::{Array, CpuMap, DevMap, DevMapHash, XskMap}, + macros::{btf_map, xdp}, + programs::XdpContext, +}; + +#[btf_map] +static SOCKS: XskMap<1> = XskMap::new(); +#[btf_map] +static DEVS: DevMap<1> = DevMap::new(); +#[btf_map] +static DEVS_HASH: DevMapHash<1> = DevMapHash::new(); +#[btf_map] +static CPUS: CpuMap<1> = CpuMap::new(); + +/// Hits of a probe, used to test program chaining through CpuMap/DevMap. +/// The first slot counts how many times the "raw" xdp program got executed, while the second slot +/// counts how many times the map programs got executed. +/// This allows the test harness to assert that a specific step got executed. +#[btf_map] +static HITS: Array = Array::new(); + +#[xdp] +pub fn redirect_sock(_ctx: XdpContext) -> u32 { + SOCKS.redirect(0, 0).unwrap_or(xdp_action::XDP_ABORTED) +} + +#[xdp] +pub fn redirect_dev(_ctx: XdpContext) -> u32 { + inc_hit(0); + DEVS.redirect(0, 0).unwrap_or(xdp_action::XDP_ABORTED) +} + +#[xdp] +pub fn redirect_dev_hash(_ctx: XdpContext) -> u32 { + inc_hit(0); + DEVS_HASH.redirect(10, 0).unwrap_or(xdp_action::XDP_ABORTED) +} + +#[xdp] +pub fn redirect_cpu(_ctx: XdpContext) -> u32 { + inc_hit(0); + CPUS.redirect(0, 0).unwrap_or(xdp_action::XDP_ABORTED) +} + +#[xdp(map = "cpumap")] +pub fn redirect_cpu_chain(_ctx: XdpContext) -> u32 { + inc_hit(1); + xdp_action::XDP_PASS +} + +#[xdp(map = "devmap")] +pub fn redirect_dev_chain(_ctx: XdpContext) -> u32 { + inc_hit(1); + xdp_action::XDP_PASS +} + +#[inline(always)] +fn inc_hit(index: u32) { + if let Some(hit) = HITS.get_ptr_mut(index) { + unsafe { *hit += 1 }; + } +} + +#[cfg(not(test))] +#[panic_handler] +fn panic(_info: &core::panic::PanicInfo) -> ! { + loop {} +} diff --git a/test/integration-ebpf/src/ring_buf_btf.rs b/test/integration-ebpf/src/ring_buf_btf.rs new file mode 100644 index 000000000..94024a624 --- /dev/null +++ b/test/integration-ebpf/src/ring_buf_btf.rs @@ -0,0 +1,54 @@ +#![no_std] +#![no_main] + +use aya_ebpf::{ + btf_maps::{PerCpuArray, RingBuf}, + macros::{btf_map, uprobe}, + programs::ProbeContext, +}; + +use integration_common::ring_buf::Registers; + +#[btf_map] +static RING_BUF: RingBuf<0> = RingBuf::new(); + +// Use a PerCpuArray to store the registers so that we can update the values from multiple CPUs +// without needing synchronization. Atomics exist [1], but aren't exposed. +// +// [1]: https://lwn.net/Articles/838884/ +#[btf_map] +static REGISTERS: PerCpuArray = PerCpuArray::new(); + +#[uprobe] +pub fn ring_buf_test(ctx: ProbeContext) { + let Registers { dropped, rejected } = match REGISTERS.get_ptr_mut(0) { + Some(regs) => unsafe { &mut *regs }, + None => return, + }; + let mut entry = match RING_BUF.reserve::(0) { + Some(entry) => entry, + None => { + *dropped += 1; + return; + } + }; + // Write the first argument to the function back out to RING_BUF if it is even, + // otherwise increment the counter in REJECTED. This exercises discarding data. + let arg: u64 = match ctx.arg(0) { + Some(arg) => arg, + None => return, + }; + if arg % 2 == 0 { + entry.write(arg); + entry.submit(0); + } else { + *rejected += 1; + entry.discard(0); + } +} + +#[cfg(not(test))] +#[panic_handler] +fn panic(_info: &core::panic::PanicInfo) -> ! { + loop {} +} diff --git a/test/integration-test/src/lib.rs b/test/integration-test/src/lib.rs index 5dcef22ad..949550176 100644 --- a/test/integration-test/src/lib.rs +++ b/test/integration-test/src/lib.rs @@ -16,15 +16,19 @@ pub const VARIABLES_RELOC: &[u8] = pub const BPF_PROBE_READ: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/bpf_probe_read")); pub const LOG: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/log")); -pub const MAP_TEST: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/map_test")); +pub const MAP_INFO: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/map_info")); +pub const MAPS: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/maps")); +pub const MAPS_BTF: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/maps_btf")); pub const MEMMOVE_TEST: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/memmove_test")); pub const NAME_TEST: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/name_test")); pub const PASS: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/pass")); pub const RAW_TRACEPOINT: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/raw_tracepoint")); pub const REDIRECT: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/redirect")); +pub const REDIRECT_BTF: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/redirect_btf")); pub const RELOCATIONS: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/relocations")); pub const RING_BUF: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/ring_buf")); +pub const RING_BUF_BTF: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/ring_buf_btf")); pub const SIMPLE_PROG: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/simple_prog")); pub const STRNCMP: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/strncmp")); pub const TCX: &[u8] = include_bytes_aligned!(concat!(env!("OUT_DIR"), "/tcx")); diff --git a/test/integration-test/src/tests.rs b/test/integration-test/src/tests.rs index 9ca83669f..76e073876 100644 --- a/test/integration-test/src/tests.rs +++ b/test/integration-test/src/tests.rs @@ -5,6 +5,7 @@ mod info; mod iter; mod load; mod log; +mod maps; mod raw_tracepoint; mod rbpf; mod relocations; diff --git a/test/integration-test/src/tests/elf.rs b/test/integration-test/src/tests/elf.rs index 3a5ad0a34..624ffe0f6 100644 --- a/test/integration-test/src/tests/elf.rs +++ b/test/integration-test/src/tests/elf.rs @@ -3,7 +3,7 @@ use test_log::test; #[test] fn test_maps() { - let obj_file = object::File::parse(crate::MAP_TEST).unwrap(); + let obj_file = object::File::parse(crate::MAP_INFO).unwrap(); assert!(obj_file.section_by_name("maps").is_some()); assert!(obj_file.symbols().any(|sym| sym.name() == Ok("BAR"))); } diff --git a/test/integration-test/src/tests/info.rs b/test/integration-test/src/tests/info.rs index 6a84100d4..e01abae4a 100644 --- a/test/integration-test/src/tests/info.rs +++ b/test/integration-test/src/tests/info.rs @@ -227,7 +227,7 @@ fn test_prog_stats() { #[test] fn list_loaded_maps() { // Load a program with maps. - let mut bpf: Ebpf = Ebpf::load(crate::MAP_TEST).unwrap(); + let mut bpf: Ebpf = Ebpf::load(crate::MAP_INFO).unwrap(); let prog: &mut SocketFilter = bpf.program_mut("simple_prog").unwrap().try_into().unwrap(); prog.load().unwrap(); @@ -280,7 +280,7 @@ fn list_loaded_maps() { #[test] fn test_map_info() { - let mut bpf: Ebpf = Ebpf::load(crate::MAP_TEST).unwrap(); + let mut bpf: Ebpf = Ebpf::load(crate::MAP_INFO).unwrap(); let prog: &mut SocketFilter = bpf.program_mut("simple_prog").unwrap().try_into().unwrap(); prog.load().unwrap(); diff --git a/test/integration-test/src/tests/maps.rs b/test/integration-test/src/tests/maps.rs new file mode 100644 index 000000000..a9f63eb45 --- /dev/null +++ b/test/integration-test/src/tests/maps.rs @@ -0,0 +1,109 @@ +// These tests are triggering the programs by calling local functions, to which +// the programs are attached. That requires debug symbols. +#![cfg(debug_assertions)] + +use aya::{ + maps::{Array, HashMap, MapError, Stack}, + programs::UProbe, + Ebpf, +}; + +#[no_mangle] +#[inline(never)] +pub extern "C" fn trigger_hash_map_insert(_key: u32, _value: u32) { + core::hint::black_box(trigger_hash_map_insert); +} + +#[no_mangle] +#[inline(never)] +pub extern "C" fn trigger_hash_map_get(_key: u32) { + core::hint::black_box(trigger_hash_map_get); +} + +#[no_mangle] +#[inline(never)] +pub extern "C" fn trigger_hash_map_remove(_key: u32) { + core::hint::black_box(trigger_hash_map_remove); +} + +#[no_mangle] +#[inline(never)] +pub extern "C" fn trigger_stack_push(_value: u32) { + core::hint::black_box(trigger_stack_push); +} + +#[test_case::test_case(crate::MAPS; "legacy maps")] +#[test_case::test_case(crate::MAPS_BTF; "BTF maps")] +fn test_maps(prog: &[u8]) { + let mut ebpf = Ebpf::load(prog).unwrap(); + + { + let insert_prog: &mut UProbe = ebpf + .program_mut("hash_map_insert") + .unwrap() + .try_into() + .unwrap(); + insert_prog.load().unwrap(); + insert_prog + .attach("trigger_hash_map_insert", "/proc/self/exe", None, None) + .unwrap(); + + trigger_hash_map_insert(69, 420); + + let hash_map: HashMap<_, u32, u32> = + HashMap::try_from(ebpf.map_mut("HASH_MAP").unwrap()).unwrap(); + for res in hash_map.iter() { + let (key, value) = res.unwrap(); + println!("{key} -> {value}"); + } + let value = hash_map.get(&69, 0).unwrap(); + assert_eq!(value, 420); + } + { + let get_prog: &mut UProbe = ebpf + .program_mut("hash_map_get") + .unwrap() + .try_into() + .unwrap(); + get_prog.load().unwrap(); + get_prog + .attach("trigger_hash_map_get", "/proc/self/exe", None, None) + .unwrap(); + + trigger_hash_map_get(69); + + let results: Array<_, u32> = Array::try_from(ebpf.map_mut("RESULT").unwrap()).unwrap(); + let value = results.get(&0, 0).unwrap(); + assert_eq!(value, 420); + } + { + let remove_prog: &mut UProbe = ebpf + .program_mut("hash_map_remove") + .unwrap() + .try_into() + .unwrap(); + remove_prog.load().unwrap(); + remove_prog + .attach("trigger_hash_map_remove", "/proc/self/exe", None, None) + .unwrap(); + + trigger_hash_map_remove(69); + let hash_map: HashMap<_, u32, u32> = + HashMap::try_from(ebpf.map_mut("HASH_MAP").unwrap()).unwrap(); + let res = hash_map.get(&69, 0); + assert!(matches!(res.err(), Some(MapError::KeyNotFound))); + } + { + let push_prog: &mut UProbe = ebpf.program_mut("stack_push").unwrap().try_into().unwrap(); + push_prog.load().unwrap(); + push_prog + .attach("trigger_stack_push", "/proc/self/exe", None, None) + .unwrap(); + + trigger_stack_push(69); + + let mut stack: Stack<_, u32> = Stack::try_from(ebpf.map_mut("STACK").unwrap()).unwrap(); + let value = stack.pop(0).unwrap(); + assert_eq!(value, 69); + } +} diff --git a/test/integration-test/src/tests/ring_buf.rs b/test/integration-test/src/tests/ring_buf.rs index 515ed421a..ec9f8fd1f 100644 --- a/test/integration-test/src/tests/ring_buf.rs +++ b/test/integration-test/src/tests/ring_buf.rs @@ -18,7 +18,6 @@ use aya::{ use aya_obj::generated::BPF_RINGBUF_HDR_SZ; use integration_common::ring_buf::Registers; use rand::Rng as _; -use test_log::test; use tokio::{ io::unix::AsyncFd, time::{sleep, Duration}, @@ -37,14 +36,14 @@ struct RingBufTest { const RING_BUF_MAX_ENTRIES: usize = 512; impl RingBufTest { - fn new() -> Self { + fn new(prog: &[u8]) -> Self { const RING_BUF_BYTE_SIZE: u32 = (RING_BUF_MAX_ENTRIES * (mem::size_of::() + BPF_RINGBUF_HDR_SZ as usize)) as u32; // Use the loader API to control the size of the ring_buf. let mut bpf = EbpfLoader::new() .set_max_entries("RING_BUF", RING_BUF_BYTE_SIZE) - .load(crate::RING_BUF) + .load(prog) .unwrap(); let ring_buf = bpf.take_map("RING_BUF").unwrap(); let ring_buf = RingBuf::try_from(ring_buf).unwrap(); @@ -75,20 +74,19 @@ impl RingBufTest { struct WithData(RingBufTest, Vec); impl WithData { - fn new(n: usize) -> Self { - Self(RingBufTest::new(), { + fn new(prog: &[u8], n: usize) -> Self { + Self(RingBufTest::new(prog), { let mut rng = rand::thread_rng(); std::iter::repeat_with(|| rng.gen()).take(n).collect() }) } } -#[test_case::test_case(0; "write zero items")] -#[test_case::test_case(1; "write one item")] -#[test_case::test_case(RING_BUF_MAX_ENTRIES / 2; "write half the capacity items")] -#[test_case::test_case(RING_BUF_MAX_ENTRIES - 1; "write one less than capacity items")] -#[test_case::test_case(RING_BUF_MAX_ENTRIES * 8; "write more items than capacity")] -fn ring_buf(n: usize) { +#[test_case::test_matrix( + [crate::RING_BUF, crate::RING_BUF_BTF], + [0, 1, RING_BUF_MAX_ENTRIES / 2, RING_BUF_MAX_ENTRIES - 1, RING_BUF_MAX_ENTRIES * 8] +)] +fn ring_buf(prog: &[u8], n: usize) { let WithData( RingBufTest { mut ring_buf, @@ -96,7 +94,7 @@ fn ring_buf(n: usize) { _bpf, }, data, - ) = WithData::new(n); + ) = WithData::new(prog, n); // Note that after expected_capacity has been submitted, reserve calls in the probe will fail // and the probe will give up. @@ -151,8 +149,10 @@ pub extern "C" fn ring_buf_trigger_ebpf_program(arg: u64) { // to fill the ring_buf. We just ensure that the number of events we see is sane given // what the producer sees, and that the logic does not hang. This exercises interleaving // discards, successful commits, and drops due to the ring_buf being full. -#[test(tokio::test(flavor = "multi_thread"))] -async fn ring_buf_async_with_drops() { +#[test_case::test_case(crate::RING_BUF)] +#[test_case::test_case(crate::RING_BUF_BTF)] +#[tokio::test(flavor = "multi_thread")] +async fn ring_buf_async_with_drops(prog: &[u8]) { let WithData( RingBufTest { ring_buf, @@ -160,7 +160,7 @@ async fn ring_buf_async_with_drops() { _bpf, }, data, - ) = WithData::new(RING_BUF_MAX_ENTRIES * 8); + ) = WithData::new(prog, RING_BUF_MAX_ENTRIES * 8); let mut async_fd = AsyncFd::new(ring_buf).unwrap(); @@ -258,8 +258,10 @@ async fn ring_buf_async_with_drops() { ); } -#[test(tokio::test(flavor = "multi_thread"))] -async fn ring_buf_async_no_drop() { +#[test_case::test_case(crate::RING_BUF)] +#[test_case::test_case(crate::RING_BUF_BTF)] +#[tokio::test(flavor = "multi_thread")] +async fn ring_buf_async_no_drop(prog: &[u8]) { let WithData( RingBufTest { ring_buf, @@ -267,7 +269,7 @@ async fn ring_buf_async_no_drop() { _bpf, }, data, - ) = WithData::new(RING_BUF_MAX_ENTRIES * 3); + ) = WithData::new(prog, RING_BUF_MAX_ENTRIES * 3); let writer = { let data = data.to_owned(); @@ -322,13 +324,14 @@ async fn ring_buf_async_no_drop() { // This test reproduces a bug where the ring buffer would not be notified of new entries if the // state was not properly synchronized between the producer and consumer. This would result in the // consumer never being woken up and the test hanging. -#[test] -fn ring_buf_epoll_wakeup() { +#[test_case::test_case(crate::RING_BUF)] +#[test_case::test_case(crate::RING_BUF_BTF)] +fn ring_buf_epoll_wakeup(prog: &[u8]) { let RingBufTest { mut ring_buf, _bpf, regs: _, - } = RingBufTest::new(); + } = RingBufTest::new(prog); let epoll_fd = epoll::create(false).unwrap(); epoll::ctl( @@ -356,13 +359,15 @@ fn ring_buf_epoll_wakeup() { } // This test is like the above test but uses tokio and AsyncFd instead of raw epoll. -#[test(tokio::test)] -async fn ring_buf_asyncfd_events() { +#[test_case::test_case(crate::RING_BUF)] +#[test_case::test_case(crate::RING_BUF_BTF)] +#[tokio::test] +async fn ring_buf_asyncfd_events(prog: &[u8]) { let RingBufTest { ring_buf, regs: _, _bpf, - } = RingBufTest::new(); + } = RingBufTest::new(prog); let mut async_fd = AsyncFd::new(ring_buf).unwrap(); let mut total_events = 0; diff --git a/test/integration-test/src/tests/xdp.rs b/test/integration-test/src/tests/xdp.rs index 5a9859d5a..bacb3aca1 100644 --- a/test/integration-test/src/tests/xdp.rs +++ b/test/integration-test/src/tests/xdp.rs @@ -11,11 +11,12 @@ use xdpilone::{BufIdx, IfInfo, Socket, SocketConfig, Umem, UmemConfig}; use crate::utils::NetNsGuard; -#[test] -fn af_xdp() { +#[test_case::test_case(crate::REDIRECT)] +#[test_case::test_case(crate::REDIRECT_BTF)] +fn af_xdp(prog: &[u8]) { let _netns = NetNsGuard::new(); - let mut bpf = Ebpf::load(crate::REDIRECT).unwrap(); + let mut bpf = Ebpf::load(prog).unwrap(); let mut socks: XskMap<_> = bpf.take_map("SOCKS").unwrap().try_into().unwrap(); let xdp: &mut Xdp = bpf @@ -130,11 +131,12 @@ fn map_load() { bpf.program("xdp_frags_devmap").unwrap(); } -#[test] -fn cpumap_chain() { +#[test_case::test_case(crate::REDIRECT)] +#[test_case::test_case(crate::REDIRECT_BTF)] +fn cpumap_chain(prog: &[u8]) { let _netns = NetNsGuard::new(); - let mut bpf = Ebpf::load(crate::REDIRECT).unwrap(); + let mut bpf = Ebpf::load(prog).unwrap(); // Load our cpumap and our canary map let mut cpus: CpuMap<_> = bpf.take_map("CPUS").unwrap().try_into().unwrap(); diff --git a/xtask/public-api/aya-ebpf-macros.txt b/xtask/public-api/aya-ebpf-macros.txt index 4ebcc5903..850e761b7 100644 --- a/xtask/public-api/aya-ebpf-macros.txt +++ b/xtask/public-api/aya-ebpf-macros.txt @@ -1,4 +1,5 @@ pub mod aya_ebpf_macros +pub proc macro aya_ebpf_macros::#[btf_map] pub proc macro aya_ebpf_macros::#[btf_tracepoint] pub proc macro aya_ebpf_macros::#[cgroup_device] pub proc macro aya_ebpf_macros::#[cgroup_skb] diff --git a/xtask/public-api/aya-ebpf.txt b/xtask/public-api/aya-ebpf.txt index 5d0ffdabb..41e3c6cd1 100644 --- a/xtask/public-api/aya-ebpf.txt +++ b/xtask/public-api/aya-ebpf.txt @@ -2,6 +2,1467 @@ pub mod aya_ebpf pub use aya_ebpf::bindings pub use aya_ebpf::cty pub use aya_ebpf::macros +pub mod aya_ebpf::btf_maps +pub mod aya_ebpf::btf_maps::array +#[repr(transparent)] pub struct aya_ebpf::btf_maps::array::Array(_) +impl aya_ebpf::btf_maps::array::Array +pub fn aya_ebpf::btf_maps::array::Array::get(&self, index: u32) -> core::option::Option<&T> +pub fn aya_ebpf::btf_maps::array::Array::get_ptr(&self, index: u32) -> core::option::Option<*const T> +pub fn aya_ebpf::btf_maps::array::Array::get_ptr_mut(&self, index: u32) -> core::option::Option<*mut T> +pub const fn aya_ebpf::btf_maps::array::Array::new() -> Self +impl core::marker::Sync for aya_ebpf::btf_maps::array::Array +impl !core::marker::Freeze for aya_ebpf::btf_maps::array::Array +impl !core::marker::Send for aya_ebpf::btf_maps::array::Array +impl core::marker::Unpin for aya_ebpf::btf_maps::array::Array +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::array::Array +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::array::Array where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::array::Array where U: core::convert::From +pub fn aya_ebpf::btf_maps::array::Array::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::array::Array where U: core::convert::Into +pub type aya_ebpf::btf_maps::array::Array::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::array::Array::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::array::Array where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::array::Array::Error = >::Error +pub fn aya_ebpf::btf_maps::array::Array::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::array::Array where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::Array::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::array::Array where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::Array::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::array::Array where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::Array::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::array::Array +pub fn aya_ebpf::btf_maps::array::Array::from(t: T) -> T +pub struct aya_ebpf::btf_maps::array::ArrayDef +impl aya_ebpf::btf_maps::array::ArrayDef +pub const fn aya_ebpf::btf_maps::array::ArrayDef::new() -> aya_ebpf::btf_maps::array::ArrayDef +impl core::marker::Freeze for aya_ebpf::btf_maps::array::ArrayDef +impl !core::marker::Send for aya_ebpf::btf_maps::array::ArrayDef +impl !core::marker::Sync for aya_ebpf::btf_maps::array::ArrayDef +impl core::marker::Unpin for aya_ebpf::btf_maps::array::ArrayDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::array::ArrayDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::array::ArrayDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::array::ArrayDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::array::ArrayDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::array::ArrayDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::array::ArrayDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::array::ArrayDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::array::ArrayDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::array::ArrayDef::Error = >::Error +pub fn aya_ebpf::btf_maps::array::ArrayDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::array::ArrayDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::ArrayDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::array::ArrayDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::ArrayDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::array::ArrayDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::ArrayDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::array::ArrayDef +pub fn aya_ebpf::btf_maps::array::ArrayDef::from(t: T) -> T +pub mod aya_ebpf::btf_maps::bloom_filter +#[repr(transparent)] pub struct aya_ebpf::btf_maps::bloom_filter::BloomFilter(_) +impl aya_ebpf::btf_maps::bloom_filter::BloomFilter +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::contains(&mut self, value: &T) -> core::result::Result<(), i64> +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::insert(&mut self, value: &T, flags: u64) -> core::result::Result<(), i64> +pub const fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::new() -> Self +impl !core::marker::Freeze for aya_ebpf::btf_maps::bloom_filter::BloomFilter +impl !core::marker::Send for aya_ebpf::btf_maps::bloom_filter::BloomFilter +impl !core::marker::Sync for aya_ebpf::btf_maps::bloom_filter::BloomFilter +impl core::marker::Unpin for aya_ebpf::btf_maps::bloom_filter::BloomFilter +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::bloom_filter::BloomFilter +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::bloom_filter::BloomFilter where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::bloom_filter::BloomFilter where U: core::convert::From +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::bloom_filter::BloomFilter where U: core::convert::Into +pub type aya_ebpf::btf_maps::bloom_filter::BloomFilter::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::bloom_filter::BloomFilter where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::bloom_filter::BloomFilter::Error = >::Error +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::bloom_filter::BloomFilter where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::bloom_filter::BloomFilter where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::bloom_filter::BloomFilter where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::bloom_filter::BloomFilter +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::from(t: T) -> T +pub struct aya_ebpf::btf_maps::bloom_filter::BloomFilterDef +impl core::marker::Freeze for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef +impl !core::marker::Send for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef +impl !core::marker::Sync for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef +impl core::marker::Unpin for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef where T: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilterDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::bloom_filter::BloomFilterDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilterDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::bloom_filter::BloomFilterDef::Error = >::Error +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilterDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilterDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilterDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilterDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::bloom_filter::BloomFilterDef +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilterDef::from(t: T) -> T +pub mod aya_ebpf::btf_maps::hash_map +#[repr(transparent)] pub struct aya_ebpf::btf_maps::hash_map::HashMap(_) +impl aya_ebpf::btf_maps::hash_map::HashMap +pub unsafe fn aya_ebpf::btf_maps::hash_map::HashMap::get(&self, key: &K) -> core::option::Option<&V> +pub fn aya_ebpf::btf_maps::hash_map::HashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> +pub fn aya_ebpf::btf_maps::hash_map::HashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> +pub fn aya_ebpf::btf_maps::hash_map::HashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::btf_maps::hash_map::HashMap::new() -> aya_ebpf::btf_maps::hash_map::HashMap +pub fn aya_ebpf::btf_maps::hash_map::HashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +impl core::marker::Sync for aya_ebpf::btf_maps::hash_map::HashMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::hash_map::HashMap +impl !core::marker::Send for aya_ebpf::btf_maps::hash_map::HashMap +impl core::marker::Unpin for aya_ebpf::btf_maps::hash_map::HashMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::hash_map::HashMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::hash_map::HashMap where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::hash_map::HashMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::hash_map::HashMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::hash_map::HashMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::hash_map::HashMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::hash_map::HashMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::hash_map::HashMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::hash_map::HashMap::Error = >::Error +pub fn aya_ebpf::btf_maps::hash_map::HashMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::hash_map::HashMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::HashMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::hash_map::HashMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::HashMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::hash_map::HashMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::HashMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::hash_map::HashMap +pub fn aya_ebpf::btf_maps::hash_map::HashMap::from(t: T) -> T +pub struct aya_ebpf::btf_maps::hash_map::HashMapDef +impl aya_ebpf::btf_maps::hash_map::HashMapDef +pub const fn aya_ebpf::btf_maps::hash_map::HashMapDef::new() -> aya_ebpf::btf_maps::hash_map::HashMapDef +impl core::marker::Freeze for aya_ebpf::btf_maps::hash_map::HashMapDef +impl !core::marker::Send for aya_ebpf::btf_maps::hash_map::HashMapDef +impl !core::marker::Sync for aya_ebpf::btf_maps::hash_map::HashMapDef +impl core::marker::Unpin for aya_ebpf::btf_maps::hash_map::HashMapDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::hash_map::HashMapDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::hash_map::HashMapDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::hash_map::HashMapDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::hash_map::HashMapDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::hash_map::HashMapDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::hash_map::HashMapDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::hash_map::HashMapDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::hash_map::HashMapDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::hash_map::HashMapDef::Error = >::Error +pub fn aya_ebpf::btf_maps::hash_map::HashMapDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::hash_map::HashMapDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::HashMapDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::hash_map::HashMapDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::HashMapDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::hash_map::HashMapDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::HashMapDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::hash_map::HashMapDef +pub fn aya_ebpf::btf_maps::hash_map::HashMapDef::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::hash_map::LruHashMap(_) +impl aya_ebpf::btf_maps::hash_map::LruHashMap +pub unsafe fn aya_ebpf::btf_maps::hash_map::LruHashMap::get(&self, key: &K) -> core::option::Option<&V> +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::btf_maps::hash_map::LruHashMap::new() -> aya_ebpf::btf_maps::hash_map::LruHashMap +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +impl core::marker::Sync for aya_ebpf::btf_maps::hash_map::LruHashMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::hash_map::LruHashMap +impl !core::marker::Send for aya_ebpf::btf_maps::hash_map::LruHashMap +impl core::marker::Unpin for aya_ebpf::btf_maps::hash_map::LruHashMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::hash_map::LruHashMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::hash_map::LruHashMap where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::hash_map::LruHashMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::hash_map::LruHashMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::hash_map::LruHashMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::hash_map::LruHashMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::hash_map::LruHashMap::Error = >::Error +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::hash_map::LruHashMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::hash_map::LruHashMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::hash_map::LruHashMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::hash_map::LruHashMap +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::from(t: T) -> T +pub struct aya_ebpf::btf_maps::hash_map::LruHashMapDef +impl aya_ebpf::btf_maps::hash_map::LruHashMapDef +pub const fn aya_ebpf::btf_maps::hash_map::LruHashMapDef::new() -> aya_ebpf::btf_maps::hash_map::LruHashMapDef +impl core::marker::Freeze for aya_ebpf::btf_maps::hash_map::LruHashMapDef +impl !core::marker::Send for aya_ebpf::btf_maps::hash_map::LruHashMapDef +impl !core::marker::Sync for aya_ebpf::btf_maps::hash_map::LruHashMapDef +impl core::marker::Unpin for aya_ebpf::btf_maps::hash_map::LruHashMapDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::hash_map::LruHashMapDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::hash_map::LruHashMapDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::hash_map::LruHashMapDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::hash_map::LruHashMapDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::hash_map::LruHashMapDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::hash_map::LruHashMapDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::hash_map::LruHashMapDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::hash_map::LruHashMapDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::hash_map::LruHashMapDef::Error = >::Error +pub fn aya_ebpf::btf_maps::hash_map::LruHashMapDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::hash_map::LruHashMapDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::LruHashMapDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::hash_map::LruHashMapDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::LruHashMapDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::hash_map::LruHashMapDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::LruHashMapDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::hash_map::LruHashMapDef +pub fn aya_ebpf::btf_maps::hash_map::LruHashMapDef::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::hash_map::PerCpuHashMap(_) +impl aya_ebpf::btf_maps::hash_map::PerCpuHashMap +pub unsafe fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::get(&self, key: &K) -> core::option::Option<&V> +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::new() -> aya_ebpf::btf_maps::hash_map::PerCpuHashMap +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +impl core::marker::Sync for aya_ebpf::btf_maps::hash_map::PerCpuHashMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::hash_map::PerCpuHashMap +impl !core::marker::Send for aya_ebpf::btf_maps::hash_map::PerCpuHashMap +impl core::marker::Unpin for aya_ebpf::btf_maps::hash_map::PerCpuHashMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::hash_map::PerCpuHashMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::hash_map::PerCpuHashMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::hash_map::PerCpuHashMap::Error = >::Error +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::hash_map::PerCpuHashMap +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::from(t: T) -> T +pub struct aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef +impl aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef +pub const fn aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef::new() -> aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef +impl core::marker::Freeze for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef +impl !core::marker::Send for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef +impl !core::marker::Sync for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef +impl core::marker::Unpin for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef::Error = >::Error +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMapDef::from(t: T) -> T +pub mod aya_ebpf::btf_maps::lpm_trie +#[repr(C, packed)] pub struct aya_ebpf::btf_maps::lpm_trie::Key +pub aya_ebpf::btf_maps::lpm_trie::Key::data: K +pub aya_ebpf::btf_maps::lpm_trie::Key::prefix_len: u32 +impl aya_ebpf::btf_maps::lpm_trie::Key +pub fn aya_ebpf::btf_maps::lpm_trie::Key::new(prefix_len: u32, data: K) -> Self +impl core::marker::Freeze for aya_ebpf::btf_maps::lpm_trie::Key where K: core::marker::Freeze +impl core::marker::Send for aya_ebpf::btf_maps::lpm_trie::Key where K: core::marker::Send +impl core::marker::Sync for aya_ebpf::btf_maps::lpm_trie::Key where K: core::marker::Sync +impl core::marker::Unpin for aya_ebpf::btf_maps::lpm_trie::Key where K: core::marker::Unpin +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::lpm_trie::Key where K: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::lpm_trie::Key where K: core::panic::unwind_safe::UnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::lpm_trie::Key where U: core::convert::From +pub fn aya_ebpf::btf_maps::lpm_trie::Key::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::lpm_trie::Key where U: core::convert::Into +pub type aya_ebpf::btf_maps::lpm_trie::Key::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::lpm_trie::Key::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::lpm_trie::Key where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::lpm_trie::Key::Error = >::Error +pub fn aya_ebpf::btf_maps::lpm_trie::Key::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::lpm_trie::Key where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::lpm_trie::Key::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::lpm_trie::Key where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::lpm_trie::Key::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::lpm_trie::Key where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::lpm_trie::Key::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::lpm_trie::Key +pub fn aya_ebpf::btf_maps::lpm_trie::Key::from(t: T) -> T +pub mod aya_ebpf::btf_maps::per_cpu_array +#[repr(transparent)] pub struct aya_ebpf::btf_maps::per_cpu_array::PerCpuArray(_) +impl aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::get(&self, index: u32) -> core::option::Option<&T> +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::get_ptr(&self, index: u32) -> core::option::Option<*const T> +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::get_ptr_mut(&self, index: u32) -> core::option::Option<*mut T> +pub const fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::new() -> Self +impl core::marker::Sync for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +impl !core::marker::Freeze for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +impl !core::marker::Send for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +impl core::marker::Unpin for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where U: core::convert::From +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where U: core::convert::Into +pub type aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::Error = >::Error +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::from(t: T) -> T +pub struct aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef +impl aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef +pub const fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef::new() -> aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef +impl core::marker::Freeze for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef +impl !core::marker::Send for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef +impl !core::marker::Sync for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef +impl core::marker::Unpin for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef::Error = >::Error +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArrayDef::from(t: T) -> T +pub mod aya_ebpf::btf_maps::perf +#[repr(transparent)] pub struct aya_ebpf::btf_maps::perf::PerfEventArray +impl aya_ebpf::btf_maps::PerfEventArray +pub const fn aya_ebpf::btf_maps::PerfEventArray::new() -> Self +pub fn aya_ebpf::btf_maps::PerfEventArray::output(&self, ctx: &C, data: &T, flags: u32) +pub fn aya_ebpf::btf_maps::PerfEventArray::output_at_index(&self, ctx: &C, index: u32, data: &T, flags: u32) +impl core::marker::Sync for aya_ebpf::btf_maps::PerfEventArray +impl !core::marker::Freeze for aya_ebpf::btf_maps::PerfEventArray +impl !core::marker::Send for aya_ebpf::btf_maps::PerfEventArray +impl core::marker::Unpin for aya_ebpf::btf_maps::PerfEventArray where T: core::marker::Unpin +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::PerfEventArray +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::PerfEventArray where T: core::panic::unwind_safe::UnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::PerfEventArray where U: core::convert::From +pub fn aya_ebpf::btf_maps::PerfEventArray::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::PerfEventArray where U: core::convert::Into +pub type aya_ebpf::btf_maps::PerfEventArray::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::PerfEventArray::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::PerfEventArray where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::PerfEventArray::Error = >::Error +pub fn aya_ebpf::btf_maps::PerfEventArray::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::PerfEventArray where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::PerfEventArray::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::PerfEventArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::PerfEventArray::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::PerfEventArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::PerfEventArray::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::PerfEventArray +pub fn aya_ebpf::btf_maps::PerfEventArray::from(t: T) -> T +pub struct aya_ebpf::btf_maps::perf::PerfEventArrayDef +impl aya_ebpf::btf_maps::perf::PerfEventArrayDef +pub const fn aya_ebpf::btf_maps::perf::PerfEventArrayDef::new() -> Self +impl core::marker::Freeze for aya_ebpf::btf_maps::perf::PerfEventArrayDef +impl !core::marker::Send for aya_ebpf::btf_maps::perf::PerfEventArrayDef +impl !core::marker::Sync for aya_ebpf::btf_maps::perf::PerfEventArrayDef +impl core::marker::Unpin for aya_ebpf::btf_maps::perf::PerfEventArrayDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::perf::PerfEventArrayDef +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::perf::PerfEventArrayDef +impl core::convert::Into for aya_ebpf::btf_maps::perf::PerfEventArrayDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::perf::PerfEventArrayDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::perf::PerfEventArrayDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::perf::PerfEventArrayDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::perf::PerfEventArrayDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::perf::PerfEventArrayDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::perf::PerfEventArrayDef::Error = >::Error +pub fn aya_ebpf::btf_maps::perf::PerfEventArrayDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::perf::PerfEventArrayDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::perf::PerfEventArrayDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::perf::PerfEventArrayDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::perf::PerfEventArrayDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::perf::PerfEventArrayDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::perf::PerfEventArrayDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::perf::PerfEventArrayDef +pub fn aya_ebpf::btf_maps::perf::PerfEventArrayDef::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::perf::PerfEventByteArray(_) +impl aya_ebpf::btf_maps::PerfEventByteArray +pub const fn aya_ebpf::btf_maps::PerfEventByteArray::new() -> Self +pub fn aya_ebpf::btf_maps::PerfEventByteArray::output(&self, ctx: &C, data: &[u8], flags: u32) +pub fn aya_ebpf::btf_maps::PerfEventByteArray::output_at_index(&self, ctx: &C, index: u32, data: &[u8], flags: u32) +impl core::marker::Sync for aya_ebpf::btf_maps::PerfEventByteArray +impl !core::marker::Freeze for aya_ebpf::btf_maps::PerfEventByteArray +impl !core::marker::Send for aya_ebpf::btf_maps::PerfEventByteArray +impl core::marker::Unpin for aya_ebpf::btf_maps::PerfEventByteArray +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::PerfEventByteArray +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::PerfEventByteArray +impl core::convert::Into for aya_ebpf::btf_maps::PerfEventByteArray where U: core::convert::From +pub fn aya_ebpf::btf_maps::PerfEventByteArray::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::PerfEventByteArray where U: core::convert::Into +pub type aya_ebpf::btf_maps::PerfEventByteArray::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::PerfEventByteArray::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::PerfEventByteArray where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::PerfEventByteArray::Error = >::Error +pub fn aya_ebpf::btf_maps::PerfEventByteArray::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::PerfEventByteArray where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::PerfEventByteArray::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::PerfEventByteArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::PerfEventByteArray::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::PerfEventByteArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::PerfEventByteArray::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::PerfEventByteArray +pub fn aya_ebpf::btf_maps::PerfEventByteArray::from(t: T) -> T +pub mod aya_ebpf::btf_maps::program_array +#[repr(transparent)] pub struct aya_ebpf::btf_maps::program_array::ProgramArray(_) +impl aya_ebpf::btf_maps::program_array::ProgramArray +pub const fn aya_ebpf::btf_maps::program_array::ProgramArray::new() -> Self +pub unsafe fn aya_ebpf::btf_maps::program_array::ProgramArray::tail_call(&self, ctx: &C, index: u32) -> core::result::Result +impl !core::marker::Freeze for aya_ebpf::btf_maps::program_array::ProgramArray +impl !core::marker::Send for aya_ebpf::btf_maps::program_array::ProgramArray +impl !core::marker::Sync for aya_ebpf::btf_maps::program_array::ProgramArray +impl core::marker::Unpin for aya_ebpf::btf_maps::program_array::ProgramArray +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::program_array::ProgramArray +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::program_array::ProgramArray +impl core::convert::Into for aya_ebpf::btf_maps::program_array::ProgramArray where U: core::convert::From +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::program_array::ProgramArray where U: core::convert::Into +pub type aya_ebpf::btf_maps::program_array::ProgramArray::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::program_array::ProgramArray where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::program_array::ProgramArray::Error = >::Error +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::program_array::ProgramArray where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::program_array::ProgramArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::program_array::ProgramArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::program_array::ProgramArray +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::from(t: T) -> T +pub struct aya_ebpf::btf_maps::program_array::ProgramArrayDef +impl core::marker::Freeze for aya_ebpf::btf_maps::program_array::ProgramArrayDef +impl !core::marker::Send for aya_ebpf::btf_maps::program_array::ProgramArrayDef +impl !core::marker::Sync for aya_ebpf::btf_maps::program_array::ProgramArrayDef +impl core::marker::Unpin for aya_ebpf::btf_maps::program_array::ProgramArrayDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::program_array::ProgramArrayDef +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::program_array::ProgramArrayDef +impl core::convert::Into for aya_ebpf::btf_maps::program_array::ProgramArrayDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::program_array::ProgramArrayDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::program_array::ProgramArrayDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::program_array::ProgramArrayDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::program_array::ProgramArrayDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::program_array::ProgramArrayDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::program_array::ProgramArrayDef::Error = >::Error +pub fn aya_ebpf::btf_maps::program_array::ProgramArrayDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::program_array::ProgramArrayDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::program_array::ProgramArrayDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::program_array::ProgramArrayDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::program_array::ProgramArrayDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::program_array::ProgramArrayDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::program_array::ProgramArrayDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::program_array::ProgramArrayDef +pub fn aya_ebpf::btf_maps::program_array::ProgramArrayDef::from(t: T) -> T +pub mod aya_ebpf::btf_maps::queue +#[repr(transparent)] pub struct aya_ebpf::btf_maps::queue::Queue(_) +impl aya_ebpf::btf_maps::queue::Queue +pub const fn aya_ebpf::btf_maps::queue::Queue::new() -> Self +pub fn aya_ebpf::btf_maps::queue::Queue::pop(&self) -> core::option::Option +pub fn aya_ebpf::btf_maps::queue::Queue::push(&self, value: &T, flags: u64) -> core::result::Result<(), i64> +impl core::marker::Sync for aya_ebpf::btf_maps::queue::Queue +impl !core::marker::Freeze for aya_ebpf::btf_maps::queue::Queue +impl !core::marker::Send for aya_ebpf::btf_maps::queue::Queue +impl core::marker::Unpin for aya_ebpf::btf_maps::queue::Queue +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::queue::Queue +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::queue::Queue where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::queue::Queue where U: core::convert::From +pub fn aya_ebpf::btf_maps::queue::Queue::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::queue::Queue where U: core::convert::Into +pub type aya_ebpf::btf_maps::queue::Queue::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::queue::Queue::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::queue::Queue where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::queue::Queue::Error = >::Error +pub fn aya_ebpf::btf_maps::queue::Queue::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::queue::Queue where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::queue::Queue::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::queue::Queue where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::queue::Queue::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::queue::Queue where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::queue::Queue::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::queue::Queue +pub fn aya_ebpf::btf_maps::queue::Queue::from(t: T) -> T +pub struct aya_ebpf::btf_maps::queue::QueueDef +impl core::marker::Freeze for aya_ebpf::btf_maps::queue::QueueDef +impl !core::marker::Send for aya_ebpf::btf_maps::queue::QueueDef +impl !core::marker::Sync for aya_ebpf::btf_maps::queue::QueueDef +impl core::marker::Unpin for aya_ebpf::btf_maps::queue::QueueDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::queue::QueueDef where T: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::queue::QueueDef where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::queue::QueueDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::queue::QueueDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::queue::QueueDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::queue::QueueDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::queue::QueueDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::queue::QueueDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::queue::QueueDef::Error = >::Error +pub fn aya_ebpf::btf_maps::queue::QueueDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::queue::QueueDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::queue::QueueDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::queue::QueueDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::queue::QueueDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::queue::QueueDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::queue::QueueDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::queue::QueueDef +pub fn aya_ebpf::btf_maps::queue::QueueDef::from(t: T) -> T +pub mod aya_ebpf::btf_maps::ring_buf +#[repr(transparent)] pub struct aya_ebpf::btf_maps::ring_buf::RingBuf(_) +impl aya_ebpf::btf_maps::ring_buf::RingBuf +pub const fn aya_ebpf::btf_maps::ring_buf::RingBuf::new() -> Self +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::output(&self, data: &T, flags: u64) -> core::result::Result<(), i64> +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::query(&self, flags: u64) -> u64 +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::reserve(&self, flags: u64) -> core::option::Option> where aya_ebpf::btf_maps::ring_buf::const_assert::Assert<{ _ }>: aya_ebpf::btf_maps::ring_buf::const_assert::IsTrue +impl core::marker::Sync for aya_ebpf::btf_maps::ring_buf::RingBuf +impl !core::marker::Freeze for aya_ebpf::btf_maps::ring_buf::RingBuf +impl !core::marker::Send for aya_ebpf::btf_maps::ring_buf::RingBuf +impl core::marker::Unpin for aya_ebpf::btf_maps::ring_buf::RingBuf +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::ring_buf::RingBuf +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::ring_buf::RingBuf +impl core::convert::Into for aya_ebpf::btf_maps::ring_buf::RingBuf where U: core::convert::From +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::ring_buf::RingBuf where U: core::convert::Into +pub type aya_ebpf::btf_maps::ring_buf::RingBuf::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::ring_buf::RingBuf where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::ring_buf::RingBuf::Error = >::Error +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::ring_buf::RingBuf where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::ring_buf::RingBuf where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::ring_buf::RingBuf where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::ring_buf::RingBuf +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::from(t: T) -> T +pub struct aya_ebpf::btf_maps::ring_buf::RingBufDef +impl core::marker::Freeze for aya_ebpf::btf_maps::ring_buf::RingBufDef +impl !core::marker::Send for aya_ebpf::btf_maps::ring_buf::RingBufDef +impl !core::marker::Sync for aya_ebpf::btf_maps::ring_buf::RingBufDef +impl core::marker::Unpin for aya_ebpf::btf_maps::ring_buf::RingBufDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::ring_buf::RingBufDef +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::ring_buf::RingBufDef +impl core::convert::Into for aya_ebpf::btf_maps::ring_buf::RingBufDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::ring_buf::RingBufDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::ring_buf::RingBufDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::ring_buf::RingBufDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::ring_buf::RingBufDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::ring_buf::RingBufDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::ring_buf::RingBufDef::Error = >::Error +pub fn aya_ebpf::btf_maps::ring_buf::RingBufDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::ring_buf::RingBufDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::ring_buf::RingBufDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::ring_buf::RingBufDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::ring_buf::RingBufDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::ring_buf::RingBufDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::ring_buf::RingBufDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::ring_buf::RingBufDef +pub fn aya_ebpf::btf_maps::ring_buf::RingBufDef::from(t: T) -> T +pub struct aya_ebpf::btf_maps::ring_buf::RingBufEntry(_) +impl aya_ebpf::btf_maps::ring_buf::RingBufEntry +pub fn aya_ebpf::btf_maps::ring_buf::RingBufEntry::discard(self, flags: u64) +pub fn aya_ebpf::btf_maps::ring_buf::RingBufEntry::submit(self, flags: u64) +impl core::ops::deref::Deref for aya_ebpf::btf_maps::ring_buf::RingBufEntry +pub type aya_ebpf::btf_maps::ring_buf::RingBufEntry::Target = core::mem::maybe_uninit::MaybeUninit +pub fn aya_ebpf::btf_maps::ring_buf::RingBufEntry::deref(&self) -> &Self::Target +impl core::ops::deref::DerefMut for aya_ebpf::btf_maps::ring_buf::RingBufEntry +pub fn aya_ebpf::btf_maps::ring_buf::RingBufEntry::deref_mut(&mut self) -> &mut Self::Target +impl core::marker::Freeze for aya_ebpf::btf_maps::ring_buf::RingBufEntry +impl core::marker::Send for aya_ebpf::btf_maps::ring_buf::RingBufEntry where T: core::marker::Send +impl core::marker::Sync for aya_ebpf::btf_maps::ring_buf::RingBufEntry where T: core::marker::Sync +impl core::marker::Unpin for aya_ebpf::btf_maps::ring_buf::RingBufEntry +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::ring_buf::RingBufEntry where T: core::panic::unwind_safe::RefUnwindSafe +impl !core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::ring_buf::RingBufEntry +impl core::ops::deref::Receiver for aya_ebpf::btf_maps::ring_buf::RingBufEntry where P: core::ops::deref::Deref + ?core::marker::Sized, T: ?core::marker::Sized +pub type aya_ebpf::btf_maps::ring_buf::RingBufEntry::Target = T +impl core::convert::Into for aya_ebpf::btf_maps::ring_buf::RingBufEntry where U: core::convert::From +pub fn aya_ebpf::btf_maps::ring_buf::RingBufEntry::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::ring_buf::RingBufEntry where U: core::convert::Into +pub type aya_ebpf::btf_maps::ring_buf::RingBufEntry::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::ring_buf::RingBufEntry::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::ring_buf::RingBufEntry where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::ring_buf::RingBufEntry::Error = >::Error +pub fn aya_ebpf::btf_maps::ring_buf::RingBufEntry::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::ring_buf::RingBufEntry where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::ring_buf::RingBufEntry::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::ring_buf::RingBufEntry where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::ring_buf::RingBufEntry::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::ring_buf::RingBufEntry where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::ring_buf::RingBufEntry::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::ring_buf::RingBufEntry +pub fn aya_ebpf::btf_maps::ring_buf::RingBufEntry::from(t: T) -> T +pub mod aya_ebpf::btf_maps::sock_hash +#[repr(transparent)] pub struct aya_ebpf::btf_maps::sock_hash::SockHash(_) +impl aya_ebpf::btf_maps::sock_hash::SockHash +pub const fn aya_ebpf::btf_maps::sock_hash::SockHash::new() -> Self +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::redirect_msg(&self, ctx: &aya_ebpf::programs::sk_msg::SkMsgContext, key: &mut K, flags: u64) -> i64 +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::redirect_sk_lookup(&mut self, ctx: &aya_ebpf::programs::sk_lookup::SkLookupContext, key: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), u32> +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::redirect_skb(&self, ctx: &aya_ebpf::programs::sk_buff::SkBuffContext, key: &mut K, flags: u64) -> i64 +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::update(&self, key: &mut K, sk_ops: &mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_ops, flags: u64) -> core::result::Result<(), i64> +impl core::marker::Sync for aya_ebpf::btf_maps::sock_hash::SockHash +impl !core::marker::Freeze for aya_ebpf::btf_maps::sock_hash::SockHash +impl !core::marker::Send for aya_ebpf::btf_maps::sock_hash::SockHash +impl core::marker::Unpin for aya_ebpf::btf_maps::sock_hash::SockHash +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::sock_hash::SockHash +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::sock_hash::SockHash where K: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::sock_hash::SockHash where U: core::convert::From +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::sock_hash::SockHash where U: core::convert::Into +pub type aya_ebpf::btf_maps::sock_hash::SockHash::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::sock_hash::SockHash where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::sock_hash::SockHash::Error = >::Error +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::sock_hash::SockHash where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::sock_hash::SockHash where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::sock_hash::SockHash where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::sock_hash::SockHash +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::from(t: T) -> T +pub struct aya_ebpf::btf_maps::sock_hash::SockHashDef +impl core::marker::Freeze for aya_ebpf::btf_maps::sock_hash::SockHashDef +impl !core::marker::Send for aya_ebpf::btf_maps::sock_hash::SockHashDef +impl !core::marker::Sync for aya_ebpf::btf_maps::sock_hash::SockHashDef +impl core::marker::Unpin for aya_ebpf::btf_maps::sock_hash::SockHashDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::sock_hash::SockHashDef where K: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::sock_hash::SockHashDef where K: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::sock_hash::SockHashDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::sock_hash::SockHashDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::sock_hash::SockHashDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::sock_hash::SockHashDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::sock_hash::SockHashDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::sock_hash::SockHashDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::sock_hash::SockHashDef::Error = >::Error +pub fn aya_ebpf::btf_maps::sock_hash::SockHashDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::sock_hash::SockHashDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_hash::SockHashDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::sock_hash::SockHashDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_hash::SockHashDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::sock_hash::SockHashDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_hash::SockHashDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::sock_hash::SockHashDef +pub fn aya_ebpf::btf_maps::sock_hash::SockHashDef::from(t: T) -> T +pub mod aya_ebpf::btf_maps::sock_map +#[repr(transparent)] pub struct aya_ebpf::btf_maps::sock_map::SockMap(_) +impl aya_ebpf::btf_maps::sock_map::SockMap +pub const fn aya_ebpf::btf_maps::sock_map::SockMap::new() -> Self +pub unsafe fn aya_ebpf::btf_maps::sock_map::SockMap::redirect_msg(&self, ctx: &aya_ebpf::programs::sk_msg::SkMsgContext, index: u32, flags: u64) -> i64 +pub fn aya_ebpf::btf_maps::sock_map::SockMap::redirect_sk_lookup(&mut self, ctx: &aya_ebpf::programs::sk_lookup::SkLookupContext, index: u32, flags: u64) -> core::result::Result<(), u32> +pub unsafe fn aya_ebpf::btf_maps::sock_map::SockMap::redirect_skb(&self, ctx: &aya_ebpf::programs::sk_buff::SkBuffContext, index: u32, flags: u64) -> i64 +pub unsafe fn aya_ebpf::btf_maps::sock_map::SockMap::update(&self, index: u32, sk_ops: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_ops, flags: u64) -> core::result::Result<(), i64> +impl core::marker::Sync for aya_ebpf::btf_maps::sock_map::SockMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::sock_map::SockMap +impl !core::marker::Send for aya_ebpf::btf_maps::sock_map::SockMap +impl core::marker::Unpin for aya_ebpf::btf_maps::sock_map::SockMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::sock_map::SockMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::sock_map::SockMap +impl core::convert::Into for aya_ebpf::btf_maps::sock_map::SockMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::sock_map::SockMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::sock_map::SockMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::sock_map::SockMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::sock_map::SockMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::sock_map::SockMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::sock_map::SockMap::Error = >::Error +pub fn aya_ebpf::btf_maps::sock_map::SockMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::sock_map::SockMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_map::SockMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::sock_map::SockMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_map::SockMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::sock_map::SockMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_map::SockMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::sock_map::SockMap +pub fn aya_ebpf::btf_maps::sock_map::SockMap::from(t: T) -> T +pub struct aya_ebpf::btf_maps::sock_map::SockMapDef +impl core::marker::Freeze for aya_ebpf::btf_maps::sock_map::SockMapDef +impl !core::marker::Send for aya_ebpf::btf_maps::sock_map::SockMapDef +impl !core::marker::Sync for aya_ebpf::btf_maps::sock_map::SockMapDef +impl core::marker::Unpin for aya_ebpf::btf_maps::sock_map::SockMapDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::sock_map::SockMapDef +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::sock_map::SockMapDef +impl core::convert::Into for aya_ebpf::btf_maps::sock_map::SockMapDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::sock_map::SockMapDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::sock_map::SockMapDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::sock_map::SockMapDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::sock_map::SockMapDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::sock_map::SockMapDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::sock_map::SockMapDef::Error = >::Error +pub fn aya_ebpf::btf_maps::sock_map::SockMapDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::sock_map::SockMapDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_map::SockMapDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::sock_map::SockMapDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_map::SockMapDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::sock_map::SockMapDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_map::SockMapDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::sock_map::SockMapDef +pub fn aya_ebpf::btf_maps::sock_map::SockMapDef::from(t: T) -> T +pub mod aya_ebpf::btf_maps::stack +#[repr(transparent)] pub struct aya_ebpf::btf_maps::stack::Stack(_) +impl aya_ebpf::btf_maps::stack::Stack +pub const fn aya_ebpf::btf_maps::stack::Stack::new() -> Self +pub fn aya_ebpf::btf_maps::stack::Stack::pop(&self) -> core::option::Option +pub fn aya_ebpf::btf_maps::stack::Stack::push(&self, value: &T, flags: u64) -> core::result::Result<(), i64> +impl core::marker::Sync for aya_ebpf::btf_maps::stack::Stack +impl !core::marker::Freeze for aya_ebpf::btf_maps::stack::Stack +impl !core::marker::Send for aya_ebpf::btf_maps::stack::Stack +impl core::marker::Unpin for aya_ebpf::btf_maps::stack::Stack +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::stack::Stack +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::stack::Stack where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::stack::Stack where U: core::convert::From +pub fn aya_ebpf::btf_maps::stack::Stack::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::stack::Stack where U: core::convert::Into +pub type aya_ebpf::btf_maps::stack::Stack::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::stack::Stack::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::stack::Stack where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::stack::Stack::Error = >::Error +pub fn aya_ebpf::btf_maps::stack::Stack::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::stack::Stack where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack::Stack::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::stack::Stack where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack::Stack::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::stack::Stack where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack::Stack::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::stack::Stack +pub fn aya_ebpf::btf_maps::stack::Stack::from(t: T) -> T +pub struct aya_ebpf::btf_maps::stack::StackDef +impl core::marker::Freeze for aya_ebpf::btf_maps::stack::StackDef +impl !core::marker::Send for aya_ebpf::btf_maps::stack::StackDef +impl !core::marker::Sync for aya_ebpf::btf_maps::stack::StackDef +impl core::marker::Unpin for aya_ebpf::btf_maps::stack::StackDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::stack::StackDef where T: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::stack::StackDef where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::stack::StackDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::stack::StackDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::stack::StackDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::stack::StackDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::stack::StackDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::stack::StackDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::stack::StackDef::Error = >::Error +pub fn aya_ebpf::btf_maps::stack::StackDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::stack::StackDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack::StackDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::stack::StackDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack::StackDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::stack::StackDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack::StackDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::stack::StackDef +pub fn aya_ebpf::btf_maps::stack::StackDef::from(t: T) -> T +pub mod aya_ebpf::btf_maps::stack_trace +#[repr(transparent)] pub struct aya_ebpf::btf_maps::stack_trace::StackTrace(_) +impl aya_ebpf::btf_maps::stack_trace::StackTrace +pub unsafe fn aya_ebpf::btf_maps::stack_trace::StackTrace::get_stackid(&self, ctx: &C, flags: u64) -> core::result::Result +pub const fn aya_ebpf::btf_maps::stack_trace::StackTrace::new() -> Self +impl core::marker::Sync for aya_ebpf::btf_maps::stack_trace::StackTrace +impl !core::marker::Freeze for aya_ebpf::btf_maps::stack_trace::StackTrace +impl !core::marker::Send for aya_ebpf::btf_maps::stack_trace::StackTrace +impl core::marker::Unpin for aya_ebpf::btf_maps::stack_trace::StackTrace +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::stack_trace::StackTrace +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::stack_trace::StackTrace +impl core::convert::Into for aya_ebpf::btf_maps::stack_trace::StackTrace where U: core::convert::From +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::stack_trace::StackTrace where U: core::convert::Into +pub type aya_ebpf::btf_maps::stack_trace::StackTrace::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::stack_trace::StackTrace where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::stack_trace::StackTrace::Error = >::Error +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::stack_trace::StackTrace where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::stack_trace::StackTrace where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::stack_trace::StackTrace where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::stack_trace::StackTrace +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::from(t: T) -> T +pub struct aya_ebpf::btf_maps::stack_trace::StackTraceDef +impl core::marker::Freeze for aya_ebpf::btf_maps::stack_trace::StackTraceDef +impl !core::marker::Send for aya_ebpf::btf_maps::stack_trace::StackTraceDef +impl !core::marker::Sync for aya_ebpf::btf_maps::stack_trace::StackTraceDef +impl core::marker::Unpin for aya_ebpf::btf_maps::stack_trace::StackTraceDef +impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::stack_trace::StackTraceDef +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::stack_trace::StackTraceDef +impl core::convert::Into for aya_ebpf::btf_maps::stack_trace::StackTraceDef where U: core::convert::From +pub fn aya_ebpf::btf_maps::stack_trace::StackTraceDef::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::stack_trace::StackTraceDef where U: core::convert::Into +pub type aya_ebpf::btf_maps::stack_trace::StackTraceDef::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::stack_trace::StackTraceDef::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::stack_trace::StackTraceDef where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::stack_trace::StackTraceDef::Error = >::Error +pub fn aya_ebpf::btf_maps::stack_trace::StackTraceDef::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::stack_trace::StackTraceDef where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack_trace::StackTraceDef::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::stack_trace::StackTraceDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack_trace::StackTraceDef::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::stack_trace::StackTraceDef where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack_trace::StackTraceDef::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::stack_trace::StackTraceDef +pub fn aya_ebpf::btf_maps::stack_trace::StackTraceDef::from(t: T) -> T +pub mod aya_ebpf::btf_maps::xdp +#[repr(transparent)] pub struct aya_ebpf::btf_maps::xdp::CpuMap(_) +impl aya_ebpf::btf_maps::CpuMap +pub const fn aya_ebpf::btf_maps::CpuMap::new() -> Self +pub fn aya_ebpf::btf_maps::CpuMap::redirect(&self, index: u32, flags: u64) -> core::result::Result +impl core::marker::Sync for aya_ebpf::btf_maps::CpuMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::CpuMap +impl !core::marker::Send for aya_ebpf::btf_maps::CpuMap +impl core::marker::Unpin for aya_ebpf::btf_maps::CpuMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::CpuMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::CpuMap +impl core::convert::Into for aya_ebpf::btf_maps::CpuMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::CpuMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::CpuMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::CpuMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::CpuMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::CpuMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::CpuMap::Error = >::Error +pub fn aya_ebpf::btf_maps::CpuMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::CpuMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::CpuMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::CpuMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::CpuMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::CpuMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::CpuMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::CpuMap +pub fn aya_ebpf::btf_maps::CpuMap::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::xdp::DevMap(_) +impl aya_ebpf::btf_maps::DevMap +pub fn aya_ebpf::btf_maps::DevMap::get(&self, index: u32) -> core::option::Option +pub const fn aya_ebpf::btf_maps::DevMap::new() -> Self +pub fn aya_ebpf::btf_maps::DevMap::redirect(&self, index: u32, flags: u64) -> core::result::Result +impl core::marker::Sync for aya_ebpf::btf_maps::DevMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::DevMap +impl !core::marker::Send for aya_ebpf::btf_maps::DevMap +impl core::marker::Unpin for aya_ebpf::btf_maps::DevMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::DevMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::DevMap +impl core::convert::Into for aya_ebpf::btf_maps::DevMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::DevMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::DevMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::DevMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::DevMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::DevMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::DevMap::Error = >::Error +pub fn aya_ebpf::btf_maps::DevMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::DevMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::DevMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::DevMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::DevMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::DevMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::DevMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::DevMap +pub fn aya_ebpf::btf_maps::DevMap::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::xdp::DevMapHash(_) +impl aya_ebpf::btf_maps::DevMapHash +pub fn aya_ebpf::btf_maps::DevMapHash::get(&self, key: u32) -> core::option::Option +pub const fn aya_ebpf::btf_maps::DevMapHash::new() -> Self +pub fn aya_ebpf::btf_maps::DevMapHash::redirect(&self, key: u32, flags: u64) -> core::result::Result +impl core::marker::Sync for aya_ebpf::btf_maps::DevMapHash +impl !core::marker::Freeze for aya_ebpf::btf_maps::DevMapHash +impl !core::marker::Send for aya_ebpf::btf_maps::DevMapHash +impl core::marker::Unpin for aya_ebpf::btf_maps::DevMapHash +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::DevMapHash +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::DevMapHash +impl core::convert::Into for aya_ebpf::btf_maps::DevMapHash where U: core::convert::From +pub fn aya_ebpf::btf_maps::DevMapHash::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::DevMapHash where U: core::convert::Into +pub type aya_ebpf::btf_maps::DevMapHash::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::DevMapHash::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::DevMapHash where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::DevMapHash::Error = >::Error +pub fn aya_ebpf::btf_maps::DevMapHash::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::DevMapHash where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::DevMapHash::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::DevMapHash where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::DevMapHash::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::DevMapHash where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::DevMapHash::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::DevMapHash +pub fn aya_ebpf::btf_maps::DevMapHash::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::xdp::XskMap(_) +impl aya_ebpf::btf_maps::XskMap +pub fn aya_ebpf::btf_maps::XskMap::get(&self, index: u32) -> core::option::Option +pub const fn aya_ebpf::btf_maps::XskMap::new() -> Self +pub fn aya_ebpf::btf_maps::XskMap::redirect(&self, index: u32, flags: u64) -> core::result::Result +impl core::marker::Sync for aya_ebpf::btf_maps::XskMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::XskMap +impl !core::marker::Send for aya_ebpf::btf_maps::XskMap +impl core::marker::Unpin for aya_ebpf::btf_maps::XskMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::XskMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::XskMap +impl core::convert::Into for aya_ebpf::btf_maps::XskMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::XskMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::XskMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::XskMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::XskMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::XskMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::XskMap::Error = >::Error +pub fn aya_ebpf::btf_maps::XskMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::XskMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::XskMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::XskMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::XskMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::XskMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::XskMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::XskMap +pub fn aya_ebpf::btf_maps::XskMap::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::Array(_) +impl aya_ebpf::btf_maps::array::Array +pub fn aya_ebpf::btf_maps::array::Array::get(&self, index: u32) -> core::option::Option<&T> +pub fn aya_ebpf::btf_maps::array::Array::get_ptr(&self, index: u32) -> core::option::Option<*const T> +pub fn aya_ebpf::btf_maps::array::Array::get_ptr_mut(&self, index: u32) -> core::option::Option<*mut T> +pub const fn aya_ebpf::btf_maps::array::Array::new() -> Self +impl core::marker::Sync for aya_ebpf::btf_maps::array::Array +impl !core::marker::Freeze for aya_ebpf::btf_maps::array::Array +impl !core::marker::Send for aya_ebpf::btf_maps::array::Array +impl core::marker::Unpin for aya_ebpf::btf_maps::array::Array +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::array::Array +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::array::Array where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::array::Array where U: core::convert::From +pub fn aya_ebpf::btf_maps::array::Array::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::array::Array where U: core::convert::Into +pub type aya_ebpf::btf_maps::array::Array::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::array::Array::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::array::Array where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::array::Array::Error = >::Error +pub fn aya_ebpf::btf_maps::array::Array::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::array::Array where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::Array::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::array::Array where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::Array::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::array::Array where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::array::Array::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::array::Array +pub fn aya_ebpf::btf_maps::array::Array::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::BloomFilter(_) +impl aya_ebpf::btf_maps::bloom_filter::BloomFilter +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::contains(&mut self, value: &T) -> core::result::Result<(), i64> +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::insert(&mut self, value: &T, flags: u64) -> core::result::Result<(), i64> +pub const fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::new() -> Self +impl !core::marker::Freeze for aya_ebpf::btf_maps::bloom_filter::BloomFilter +impl !core::marker::Send for aya_ebpf::btf_maps::bloom_filter::BloomFilter +impl !core::marker::Sync for aya_ebpf::btf_maps::bloom_filter::BloomFilter +impl core::marker::Unpin for aya_ebpf::btf_maps::bloom_filter::BloomFilter +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::bloom_filter::BloomFilter +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::bloom_filter::BloomFilter where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::bloom_filter::BloomFilter where U: core::convert::From +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::bloom_filter::BloomFilter where U: core::convert::Into +pub type aya_ebpf::btf_maps::bloom_filter::BloomFilter::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::bloom_filter::BloomFilter where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::bloom_filter::BloomFilter::Error = >::Error +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::bloom_filter::BloomFilter where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::bloom_filter::BloomFilter where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::bloom_filter::BloomFilter where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::bloom_filter::BloomFilter +pub fn aya_ebpf::btf_maps::bloom_filter::BloomFilter::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::CpuMap(_) +impl aya_ebpf::btf_maps::CpuMap +pub const fn aya_ebpf::btf_maps::CpuMap::new() -> Self +pub fn aya_ebpf::btf_maps::CpuMap::redirect(&self, index: u32, flags: u64) -> core::result::Result +impl core::marker::Sync for aya_ebpf::btf_maps::CpuMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::CpuMap +impl !core::marker::Send for aya_ebpf::btf_maps::CpuMap +impl core::marker::Unpin for aya_ebpf::btf_maps::CpuMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::CpuMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::CpuMap +impl core::convert::Into for aya_ebpf::btf_maps::CpuMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::CpuMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::CpuMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::CpuMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::CpuMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::CpuMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::CpuMap::Error = >::Error +pub fn aya_ebpf::btf_maps::CpuMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::CpuMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::CpuMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::CpuMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::CpuMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::CpuMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::CpuMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::CpuMap +pub fn aya_ebpf::btf_maps::CpuMap::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::DevMap(_) +impl aya_ebpf::btf_maps::DevMap +pub fn aya_ebpf::btf_maps::DevMap::get(&self, index: u32) -> core::option::Option +pub const fn aya_ebpf::btf_maps::DevMap::new() -> Self +pub fn aya_ebpf::btf_maps::DevMap::redirect(&self, index: u32, flags: u64) -> core::result::Result +impl core::marker::Sync for aya_ebpf::btf_maps::DevMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::DevMap +impl !core::marker::Send for aya_ebpf::btf_maps::DevMap +impl core::marker::Unpin for aya_ebpf::btf_maps::DevMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::DevMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::DevMap +impl core::convert::Into for aya_ebpf::btf_maps::DevMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::DevMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::DevMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::DevMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::DevMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::DevMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::DevMap::Error = >::Error +pub fn aya_ebpf::btf_maps::DevMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::DevMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::DevMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::DevMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::DevMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::DevMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::DevMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::DevMap +pub fn aya_ebpf::btf_maps::DevMap::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::DevMapHash(_) +impl aya_ebpf::btf_maps::DevMapHash +pub fn aya_ebpf::btf_maps::DevMapHash::get(&self, key: u32) -> core::option::Option +pub const fn aya_ebpf::btf_maps::DevMapHash::new() -> Self +pub fn aya_ebpf::btf_maps::DevMapHash::redirect(&self, key: u32, flags: u64) -> core::result::Result +impl core::marker::Sync for aya_ebpf::btf_maps::DevMapHash +impl !core::marker::Freeze for aya_ebpf::btf_maps::DevMapHash +impl !core::marker::Send for aya_ebpf::btf_maps::DevMapHash +impl core::marker::Unpin for aya_ebpf::btf_maps::DevMapHash +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::DevMapHash +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::DevMapHash +impl core::convert::Into for aya_ebpf::btf_maps::DevMapHash where U: core::convert::From +pub fn aya_ebpf::btf_maps::DevMapHash::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::DevMapHash where U: core::convert::Into +pub type aya_ebpf::btf_maps::DevMapHash::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::DevMapHash::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::DevMapHash where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::DevMapHash::Error = >::Error +pub fn aya_ebpf::btf_maps::DevMapHash::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::DevMapHash where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::DevMapHash::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::DevMapHash where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::DevMapHash::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::DevMapHash where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::DevMapHash::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::DevMapHash +pub fn aya_ebpf::btf_maps::DevMapHash::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::HashMap(_) +impl aya_ebpf::btf_maps::hash_map::HashMap +pub unsafe fn aya_ebpf::btf_maps::hash_map::HashMap::get(&self, key: &K) -> core::option::Option<&V> +pub fn aya_ebpf::btf_maps::hash_map::HashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> +pub fn aya_ebpf::btf_maps::hash_map::HashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> +pub fn aya_ebpf::btf_maps::hash_map::HashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::btf_maps::hash_map::HashMap::new() -> aya_ebpf::btf_maps::hash_map::HashMap +pub fn aya_ebpf::btf_maps::hash_map::HashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +impl core::marker::Sync for aya_ebpf::btf_maps::hash_map::HashMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::hash_map::HashMap +impl !core::marker::Send for aya_ebpf::btf_maps::hash_map::HashMap +impl core::marker::Unpin for aya_ebpf::btf_maps::hash_map::HashMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::hash_map::HashMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::hash_map::HashMap where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::hash_map::HashMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::hash_map::HashMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::hash_map::HashMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::hash_map::HashMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::hash_map::HashMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::hash_map::HashMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::hash_map::HashMap::Error = >::Error +pub fn aya_ebpf::btf_maps::hash_map::HashMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::hash_map::HashMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::HashMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::hash_map::HashMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::HashMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::hash_map::HashMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::HashMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::hash_map::HashMap +pub fn aya_ebpf::btf_maps::hash_map::HashMap::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::LruHashMap(_) +impl aya_ebpf::btf_maps::hash_map::LruHashMap +pub unsafe fn aya_ebpf::btf_maps::hash_map::LruHashMap::get(&self, key: &K) -> core::option::Option<&V> +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::btf_maps::hash_map::LruHashMap::new() -> aya_ebpf::btf_maps::hash_map::LruHashMap +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +impl core::marker::Sync for aya_ebpf::btf_maps::hash_map::LruHashMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::hash_map::LruHashMap +impl !core::marker::Send for aya_ebpf::btf_maps::hash_map::LruHashMap +impl core::marker::Unpin for aya_ebpf::btf_maps::hash_map::LruHashMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::hash_map::LruHashMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::hash_map::LruHashMap where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::hash_map::LruHashMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::hash_map::LruHashMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::hash_map::LruHashMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::hash_map::LruHashMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::hash_map::LruHashMap::Error = >::Error +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::hash_map::LruHashMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::hash_map::LruHashMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::hash_map::LruHashMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::hash_map::LruHashMap +pub fn aya_ebpf::btf_maps::hash_map::LruHashMap::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::PerCpuArray(_) +impl aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::get(&self, index: u32) -> core::option::Option<&T> +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::get_ptr(&self, index: u32) -> core::option::Option<*const T> +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::get_ptr_mut(&self, index: u32) -> core::option::Option<*mut T> +pub const fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::new() -> Self +impl core::marker::Sync for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +impl !core::marker::Freeze for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +impl !core::marker::Send for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +impl core::marker::Unpin for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where U: core::convert::From +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where U: core::convert::Into +pub type aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::Error = >::Error +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::per_cpu_array::PerCpuArray +pub fn aya_ebpf::btf_maps::per_cpu_array::PerCpuArray::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::PerCpuHashMap(_) +impl aya_ebpf::btf_maps::hash_map::PerCpuHashMap +pub unsafe fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::get(&self, key: &K) -> core::option::Option<&V> +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::get_ptr(&self, key: &K) -> core::option::Option<*const V> +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::get_ptr_mut(&self, key: &K) -> core::option::Option<*mut V> +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::insert(&self, key: &K, value: &V, flags: u64) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +pub const fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::new() -> aya_ebpf::btf_maps::hash_map::PerCpuHashMap +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::remove(&self, key: &K) -> core::result::Result<(), aya_ebpf_cty::od::c_long> +impl core::marker::Sync for aya_ebpf::btf_maps::hash_map::PerCpuHashMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::hash_map::PerCpuHashMap +impl !core::marker::Send for aya_ebpf::btf_maps::hash_map::PerCpuHashMap +impl core::marker::Unpin for aya_ebpf::btf_maps::hash_map::PerCpuHashMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::hash_map::PerCpuHashMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where K: core::panic::unwind_safe::RefUnwindSafe, V: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::hash_map::PerCpuHashMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::hash_map::PerCpuHashMap::Error = >::Error +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::hash_map::PerCpuHashMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::hash_map::PerCpuHashMap +pub fn aya_ebpf::btf_maps::hash_map::PerCpuHashMap::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::PerfEventArray +impl aya_ebpf::btf_maps::PerfEventArray +pub const fn aya_ebpf::btf_maps::PerfEventArray::new() -> Self +pub fn aya_ebpf::btf_maps::PerfEventArray::output(&self, ctx: &C, data: &T, flags: u32) +pub fn aya_ebpf::btf_maps::PerfEventArray::output_at_index(&self, ctx: &C, index: u32, data: &T, flags: u32) +impl core::marker::Sync for aya_ebpf::btf_maps::PerfEventArray +impl !core::marker::Freeze for aya_ebpf::btf_maps::PerfEventArray +impl !core::marker::Send for aya_ebpf::btf_maps::PerfEventArray +impl core::marker::Unpin for aya_ebpf::btf_maps::PerfEventArray where T: core::marker::Unpin +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::PerfEventArray +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::PerfEventArray where T: core::panic::unwind_safe::UnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::PerfEventArray where U: core::convert::From +pub fn aya_ebpf::btf_maps::PerfEventArray::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::PerfEventArray where U: core::convert::Into +pub type aya_ebpf::btf_maps::PerfEventArray::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::PerfEventArray::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::PerfEventArray where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::PerfEventArray::Error = >::Error +pub fn aya_ebpf::btf_maps::PerfEventArray::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::PerfEventArray where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::PerfEventArray::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::PerfEventArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::PerfEventArray::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::PerfEventArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::PerfEventArray::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::PerfEventArray +pub fn aya_ebpf::btf_maps::PerfEventArray::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::PerfEventByteArray(_) +impl aya_ebpf::btf_maps::PerfEventByteArray +pub const fn aya_ebpf::btf_maps::PerfEventByteArray::new() -> Self +pub fn aya_ebpf::btf_maps::PerfEventByteArray::output(&self, ctx: &C, data: &[u8], flags: u32) +pub fn aya_ebpf::btf_maps::PerfEventByteArray::output_at_index(&self, ctx: &C, index: u32, data: &[u8], flags: u32) +impl core::marker::Sync for aya_ebpf::btf_maps::PerfEventByteArray +impl !core::marker::Freeze for aya_ebpf::btf_maps::PerfEventByteArray +impl !core::marker::Send for aya_ebpf::btf_maps::PerfEventByteArray +impl core::marker::Unpin for aya_ebpf::btf_maps::PerfEventByteArray +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::PerfEventByteArray +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::PerfEventByteArray +impl core::convert::Into for aya_ebpf::btf_maps::PerfEventByteArray where U: core::convert::From +pub fn aya_ebpf::btf_maps::PerfEventByteArray::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::PerfEventByteArray where U: core::convert::Into +pub type aya_ebpf::btf_maps::PerfEventByteArray::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::PerfEventByteArray::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::PerfEventByteArray where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::PerfEventByteArray::Error = >::Error +pub fn aya_ebpf::btf_maps::PerfEventByteArray::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::PerfEventByteArray where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::PerfEventByteArray::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::PerfEventByteArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::PerfEventByteArray::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::PerfEventByteArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::PerfEventByteArray::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::PerfEventByteArray +pub fn aya_ebpf::btf_maps::PerfEventByteArray::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::ProgramArray(_) +impl aya_ebpf::btf_maps::program_array::ProgramArray +pub const fn aya_ebpf::btf_maps::program_array::ProgramArray::new() -> Self +pub unsafe fn aya_ebpf::btf_maps::program_array::ProgramArray::tail_call(&self, ctx: &C, index: u32) -> core::result::Result +impl !core::marker::Freeze for aya_ebpf::btf_maps::program_array::ProgramArray +impl !core::marker::Send for aya_ebpf::btf_maps::program_array::ProgramArray +impl !core::marker::Sync for aya_ebpf::btf_maps::program_array::ProgramArray +impl core::marker::Unpin for aya_ebpf::btf_maps::program_array::ProgramArray +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::program_array::ProgramArray +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::program_array::ProgramArray +impl core::convert::Into for aya_ebpf::btf_maps::program_array::ProgramArray where U: core::convert::From +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::program_array::ProgramArray where U: core::convert::Into +pub type aya_ebpf::btf_maps::program_array::ProgramArray::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::program_array::ProgramArray where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::program_array::ProgramArray::Error = >::Error +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::program_array::ProgramArray where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::program_array::ProgramArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::program_array::ProgramArray where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::program_array::ProgramArray +pub fn aya_ebpf::btf_maps::program_array::ProgramArray::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::Queue(_) +impl aya_ebpf::btf_maps::queue::Queue +pub const fn aya_ebpf::btf_maps::queue::Queue::new() -> Self +pub fn aya_ebpf::btf_maps::queue::Queue::pop(&self) -> core::option::Option +pub fn aya_ebpf::btf_maps::queue::Queue::push(&self, value: &T, flags: u64) -> core::result::Result<(), i64> +impl core::marker::Sync for aya_ebpf::btf_maps::queue::Queue +impl !core::marker::Freeze for aya_ebpf::btf_maps::queue::Queue +impl !core::marker::Send for aya_ebpf::btf_maps::queue::Queue +impl core::marker::Unpin for aya_ebpf::btf_maps::queue::Queue +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::queue::Queue +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::queue::Queue where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::queue::Queue where U: core::convert::From +pub fn aya_ebpf::btf_maps::queue::Queue::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::queue::Queue where U: core::convert::Into +pub type aya_ebpf::btf_maps::queue::Queue::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::queue::Queue::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::queue::Queue where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::queue::Queue::Error = >::Error +pub fn aya_ebpf::btf_maps::queue::Queue::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::queue::Queue where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::queue::Queue::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::queue::Queue where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::queue::Queue::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::queue::Queue where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::queue::Queue::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::queue::Queue +pub fn aya_ebpf::btf_maps::queue::Queue::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::RingBuf(_) +impl aya_ebpf::btf_maps::ring_buf::RingBuf +pub const fn aya_ebpf::btf_maps::ring_buf::RingBuf::new() -> Self +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::output(&self, data: &T, flags: u64) -> core::result::Result<(), i64> +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::query(&self, flags: u64) -> u64 +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::reserve(&self, flags: u64) -> core::option::Option> where aya_ebpf::btf_maps::ring_buf::const_assert::Assert<{ _ }>: aya_ebpf::btf_maps::ring_buf::const_assert::IsTrue +impl core::marker::Sync for aya_ebpf::btf_maps::ring_buf::RingBuf +impl !core::marker::Freeze for aya_ebpf::btf_maps::ring_buf::RingBuf +impl !core::marker::Send for aya_ebpf::btf_maps::ring_buf::RingBuf +impl core::marker::Unpin for aya_ebpf::btf_maps::ring_buf::RingBuf +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::ring_buf::RingBuf +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::ring_buf::RingBuf +impl core::convert::Into for aya_ebpf::btf_maps::ring_buf::RingBuf where U: core::convert::From +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::ring_buf::RingBuf where U: core::convert::Into +pub type aya_ebpf::btf_maps::ring_buf::RingBuf::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::ring_buf::RingBuf where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::ring_buf::RingBuf::Error = >::Error +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::ring_buf::RingBuf where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::ring_buf::RingBuf where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::ring_buf::RingBuf where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::ring_buf::RingBuf +pub fn aya_ebpf::btf_maps::ring_buf::RingBuf::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::SockHash(_) +impl aya_ebpf::btf_maps::sock_hash::SockHash +pub const fn aya_ebpf::btf_maps::sock_hash::SockHash::new() -> Self +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::redirect_msg(&self, ctx: &aya_ebpf::programs::sk_msg::SkMsgContext, key: &mut K, flags: u64) -> i64 +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::redirect_sk_lookup(&mut self, ctx: &aya_ebpf::programs::sk_lookup::SkLookupContext, key: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), u32> +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::redirect_skb(&self, ctx: &aya_ebpf::programs::sk_buff::SkBuffContext, key: &mut K, flags: u64) -> i64 +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::update(&self, key: &mut K, sk_ops: &mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_ops, flags: u64) -> core::result::Result<(), i64> +impl core::marker::Sync for aya_ebpf::btf_maps::sock_hash::SockHash +impl !core::marker::Freeze for aya_ebpf::btf_maps::sock_hash::SockHash +impl !core::marker::Send for aya_ebpf::btf_maps::sock_hash::SockHash +impl core::marker::Unpin for aya_ebpf::btf_maps::sock_hash::SockHash +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::sock_hash::SockHash +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::sock_hash::SockHash where K: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::sock_hash::SockHash where U: core::convert::From +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::sock_hash::SockHash where U: core::convert::Into +pub type aya_ebpf::btf_maps::sock_hash::SockHash::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::sock_hash::SockHash where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::sock_hash::SockHash::Error = >::Error +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::sock_hash::SockHash where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::sock_hash::SockHash where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::sock_hash::SockHash where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::sock_hash::SockHash +pub fn aya_ebpf::btf_maps::sock_hash::SockHash::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::SockMap(_) +impl aya_ebpf::btf_maps::sock_map::SockMap +pub const fn aya_ebpf::btf_maps::sock_map::SockMap::new() -> Self +pub unsafe fn aya_ebpf::btf_maps::sock_map::SockMap::redirect_msg(&self, ctx: &aya_ebpf::programs::sk_msg::SkMsgContext, index: u32, flags: u64) -> i64 +pub fn aya_ebpf::btf_maps::sock_map::SockMap::redirect_sk_lookup(&mut self, ctx: &aya_ebpf::programs::sk_lookup::SkLookupContext, index: u32, flags: u64) -> core::result::Result<(), u32> +pub unsafe fn aya_ebpf::btf_maps::sock_map::SockMap::redirect_skb(&self, ctx: &aya_ebpf::programs::sk_buff::SkBuffContext, index: u32, flags: u64) -> i64 +pub unsafe fn aya_ebpf::btf_maps::sock_map::SockMap::update(&self, index: u32, sk_ops: *mut aya_ebpf_bindings::x86_64::bindings::bpf_sock_ops, flags: u64) -> core::result::Result<(), i64> +impl core::marker::Sync for aya_ebpf::btf_maps::sock_map::SockMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::sock_map::SockMap +impl !core::marker::Send for aya_ebpf::btf_maps::sock_map::SockMap +impl core::marker::Unpin for aya_ebpf::btf_maps::sock_map::SockMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::sock_map::SockMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::sock_map::SockMap +impl core::convert::Into for aya_ebpf::btf_maps::sock_map::SockMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::sock_map::SockMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::sock_map::SockMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::sock_map::SockMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::sock_map::SockMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::sock_map::SockMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::sock_map::SockMap::Error = >::Error +pub fn aya_ebpf::btf_maps::sock_map::SockMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::sock_map::SockMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_map::SockMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::sock_map::SockMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_map::SockMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::sock_map::SockMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::sock_map::SockMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::sock_map::SockMap +pub fn aya_ebpf::btf_maps::sock_map::SockMap::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::Stack(_) +impl aya_ebpf::btf_maps::stack::Stack +pub const fn aya_ebpf::btf_maps::stack::Stack::new() -> Self +pub fn aya_ebpf::btf_maps::stack::Stack::pop(&self) -> core::option::Option +pub fn aya_ebpf::btf_maps::stack::Stack::push(&self, value: &T, flags: u64) -> core::result::Result<(), i64> +impl core::marker::Sync for aya_ebpf::btf_maps::stack::Stack +impl !core::marker::Freeze for aya_ebpf::btf_maps::stack::Stack +impl !core::marker::Send for aya_ebpf::btf_maps::stack::Stack +impl core::marker::Unpin for aya_ebpf::btf_maps::stack::Stack +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::stack::Stack +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::stack::Stack where T: core::panic::unwind_safe::RefUnwindSafe +impl core::convert::Into for aya_ebpf::btf_maps::stack::Stack where U: core::convert::From +pub fn aya_ebpf::btf_maps::stack::Stack::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::stack::Stack where U: core::convert::Into +pub type aya_ebpf::btf_maps::stack::Stack::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::stack::Stack::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::stack::Stack where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::stack::Stack::Error = >::Error +pub fn aya_ebpf::btf_maps::stack::Stack::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::stack::Stack where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack::Stack::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::stack::Stack where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack::Stack::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::stack::Stack where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack::Stack::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::stack::Stack +pub fn aya_ebpf::btf_maps::stack::Stack::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::StackTrace(_) +impl aya_ebpf::btf_maps::stack_trace::StackTrace +pub unsafe fn aya_ebpf::btf_maps::stack_trace::StackTrace::get_stackid(&self, ctx: &C, flags: u64) -> core::result::Result +pub const fn aya_ebpf::btf_maps::stack_trace::StackTrace::new() -> Self +impl core::marker::Sync for aya_ebpf::btf_maps::stack_trace::StackTrace +impl !core::marker::Freeze for aya_ebpf::btf_maps::stack_trace::StackTrace +impl !core::marker::Send for aya_ebpf::btf_maps::stack_trace::StackTrace +impl core::marker::Unpin for aya_ebpf::btf_maps::stack_trace::StackTrace +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::stack_trace::StackTrace +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::stack_trace::StackTrace +impl core::convert::Into for aya_ebpf::btf_maps::stack_trace::StackTrace where U: core::convert::From +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::stack_trace::StackTrace where U: core::convert::Into +pub type aya_ebpf::btf_maps::stack_trace::StackTrace::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::stack_trace::StackTrace where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::stack_trace::StackTrace::Error = >::Error +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::stack_trace::StackTrace where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::stack_trace::StackTrace where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::stack_trace::StackTrace where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::stack_trace::StackTrace +pub fn aya_ebpf::btf_maps::stack_trace::StackTrace::from(t: T) -> T +#[repr(transparent)] pub struct aya_ebpf::btf_maps::XskMap(_) +impl aya_ebpf::btf_maps::XskMap +pub fn aya_ebpf::btf_maps::XskMap::get(&self, index: u32) -> core::option::Option +pub const fn aya_ebpf::btf_maps::XskMap::new() -> Self +pub fn aya_ebpf::btf_maps::XskMap::redirect(&self, index: u32, flags: u64) -> core::result::Result +impl core::marker::Sync for aya_ebpf::btf_maps::XskMap +impl !core::marker::Freeze for aya_ebpf::btf_maps::XskMap +impl !core::marker::Send for aya_ebpf::btf_maps::XskMap +impl core::marker::Unpin for aya_ebpf::btf_maps::XskMap +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::btf_maps::XskMap +impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::btf_maps::XskMap +impl core::convert::Into for aya_ebpf::btf_maps::XskMap where U: core::convert::From +pub fn aya_ebpf::btf_maps::XskMap::into(self) -> U +impl core::convert::TryFrom for aya_ebpf::btf_maps::XskMap where U: core::convert::Into +pub type aya_ebpf::btf_maps::XskMap::Error = core::convert::Infallible +pub fn aya_ebpf::btf_maps::XskMap::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_ebpf::btf_maps::XskMap where U: core::convert::TryFrom +pub type aya_ebpf::btf_maps::XskMap::Error = >::Error +pub fn aya_ebpf::btf_maps::XskMap::try_into(self) -> core::result::Result>::Error> +impl core::any::Any for aya_ebpf::btf_maps::XskMap where T: 'static + ?core::marker::Sized +pub fn aya_ebpf::btf_maps::XskMap::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_ebpf::btf_maps::XskMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::XskMap::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_ebpf::btf_maps::XskMap where T: ?core::marker::Sized +pub fn aya_ebpf::btf_maps::XskMap::borrow_mut(&mut self) -> &mut T +impl core::convert::From for aya_ebpf::btf_maps::XskMap +pub fn aya_ebpf::btf_maps::XskMap::from(t: T) -> T pub mod aya_ebpf::helpers pub use aya_ebpf::helpers::gen pub macro aya_ebpf::helpers::bpf_printk! @@ -592,14 +2053,14 @@ pub mod aya_ebpf::maps::stack #[repr(transparent)] pub struct aya_ebpf::maps::stack::Stack impl aya_ebpf::maps::stack::Stack pub const fn aya_ebpf::maps::stack::Stack::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::stack::Stack -pub fn aya_ebpf::maps::stack::Stack::pop(&mut self) -> core::option::Option -pub fn aya_ebpf::maps::stack::Stack::push(&mut self, value: &T, flags: u64) -> core::result::Result<(), i64> +pub fn aya_ebpf::maps::stack::Stack::pop(&self) -> core::option::Option +pub fn aya_ebpf::maps::stack::Stack::push(&self, value: &T, flags: u64) -> core::result::Result<(), i64> pub const fn aya_ebpf::maps::stack::Stack::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::stack::Stack -impl core::marker::Freeze for aya_ebpf::maps::stack::Stack +impl core::marker::Sync for aya_ebpf::maps::stack::Stack +impl !core::marker::Freeze for aya_ebpf::maps::stack::Stack impl core::marker::Send for aya_ebpf::maps::stack::Stack where T: core::marker::Send -impl core::marker::Sync for aya_ebpf::maps::stack::Stack where T: core::marker::Sync impl core::marker::Unpin for aya_ebpf::maps::stack::Stack where T: core::marker::Unpin -impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::maps::stack::Stack where T: core::panic::unwind_safe::RefUnwindSafe +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::maps::stack::Stack impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::maps::stack::Stack where T: core::panic::unwind_safe::UnwindSafe impl core::convert::Into for aya_ebpf::maps::stack::Stack where U: core::convert::From pub fn aya_ebpf::maps::stack::Stack::into(self) -> U @@ -1282,14 +2743,14 @@ pub fn aya_ebpf::maps::sock_map::SockMap::from(t: T) -> T #[repr(transparent)] pub struct aya_ebpf::maps::Stack impl aya_ebpf::maps::stack::Stack pub const fn aya_ebpf::maps::stack::Stack::pinned(max_entries: u32, flags: u32) -> aya_ebpf::maps::stack::Stack -pub fn aya_ebpf::maps::stack::Stack::pop(&mut self) -> core::option::Option -pub fn aya_ebpf::maps::stack::Stack::push(&mut self, value: &T, flags: u64) -> core::result::Result<(), i64> +pub fn aya_ebpf::maps::stack::Stack::pop(&self) -> core::option::Option +pub fn aya_ebpf::maps::stack::Stack::push(&self, value: &T, flags: u64) -> core::result::Result<(), i64> pub const fn aya_ebpf::maps::stack::Stack::with_max_entries(max_entries: u32, flags: u32) -> aya_ebpf::maps::stack::Stack -impl core::marker::Freeze for aya_ebpf::maps::stack::Stack +impl core::marker::Sync for aya_ebpf::maps::stack::Stack +impl !core::marker::Freeze for aya_ebpf::maps::stack::Stack impl core::marker::Send for aya_ebpf::maps::stack::Stack where T: core::marker::Send -impl core::marker::Sync for aya_ebpf::maps::stack::Stack where T: core::marker::Sync impl core::marker::Unpin for aya_ebpf::maps::stack::Stack where T: core::marker::Unpin -impl core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::maps::stack::Stack where T: core::panic::unwind_safe::RefUnwindSafe +impl !core::panic::unwind_safe::RefUnwindSafe for aya_ebpf::maps::stack::Stack impl core::panic::unwind_safe::UnwindSafe for aya_ebpf::maps::stack::Stack where T: core::panic::unwind_safe::UnwindSafe impl core::convert::Into for aya_ebpf::maps::stack::Stack where U: core::convert::From pub fn aya_ebpf::maps::stack::Stack::into(self) -> U @@ -2659,6 +4120,7 @@ pub fn aya_ebpf::programs::xdp::XdpContext::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya_ebpf::programs::xdp::XdpContext pub fn aya_ebpf::programs::xdp::XdpContext::from(t: T) -> T pub macro aya_ebpf::bpf_printk! +pub macro aya_ebpf::btf_map_def! pub struct aya_ebpf::PtRegs impl aya_ebpf::PtRegs pub fn aya_ebpf::PtRegs::arg(&self, n: usize) -> core::option::Option