From f0dbaa28b3ca573d805e4ae7525382d5d27dd1dd Mon Sep 17 00:00:00 2001 From: astoycos Date: Fri, 22 Sep 2023 10:35:19 -0400 Subject: [PATCH] aya/maps: add pin() api - Adds new `maps_mut()` API to the BpfManager to allow us to iterate though and pin all of maps at the same time. - Adds new pin(Path)/unpin(Path) api to Maps so they can be generically pinned AFTER load. - Adds macro for pinning explicit map types in aya. Convert all explicit map types "inner" field to be pub crate in order to facilitate this. Signed-off-by: astoycos --- aya/src/bpf.rs | 29 ++++- aya/src/maps/array/array.rs | 2 +- aya/src/maps/array/per_cpu_array.rs | 2 +- aya/src/maps/array/program_array.rs | 2 +- aya/src/maps/bloom_filter.rs | 4 +- aya/src/maps/hash_map/hash_map.rs | 2 +- aya/src/maps/hash_map/mod.rs | 2 +- aya/src/maps/hash_map/per_cpu_hash_map.rs | 2 +- aya/src/maps/lpm_trie.rs | 4 +- aya/src/maps/mod.rs | 135 ++++++++++++++++++++-- aya/src/maps/queue.rs | 2 +- aya/src/maps/sock/sock_hash.rs | 2 +- aya/src/maps/stack.rs | 2 +- aya/src/maps/stack_trace.rs | 2 +- aya/src/sys/bpf.rs | 2 +- xtask/public-api/aya.txt | 79 ++++++++++++- 16 files changed, 241 insertions(+), 32 deletions(-) diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs index 855170c6..14cddb8c 100644 --- a/aya/src/bpf.rs +++ b/aya/src/bpf.rs @@ -395,7 +395,7 @@ impl<'a> BpfLoader<'a> { if let Some(btf) = obj.fixup_and_sanitize_btf(features)? { match load_btf(btf.to_bytes(), *verifier_log_level) { Ok(btf_fd) => Some(Arc::new(btf_fd)), - // Only report an error here if the BTF is truely needed, otherwise proceed without. + // Only report an error here if the BTF is truly needed, otherwise proceed without. Err(err) => { for program in obj.programs.values() { match program.section { @@ -475,7 +475,7 @@ impl<'a> BpfLoader<'a> { } let btf_fd = btf_fd.as_deref().map(|fd| fd.as_fd()); let mut map = match obj.pinning() { - PinningType::None => MapData::create(obj, &name, btf_fd)?, + PinningType::None => MapData::create(obj, name.clone(), btf_fd)?, PinningType::ByName => { // pin maps in /sys/fs/bpf by default to align with libbpf // behavior https://github.com/libbpf/libbpf/blob/v1.2.2/src/libbpf.c#L2161. @@ -483,7 +483,7 @@ impl<'a> BpfLoader<'a> { .as_deref() .unwrap_or_else(|| Path::new("/sys/fs/bpf")); - MapData::create_pinned_by_name(path, obj, &name, btf_fd)? + MapData::create_pinned_by_name(path, obj, name.clone(), btf_fd)? } }; map.finalize()?; @@ -837,6 +837,29 @@ impl Bpf { self.maps.iter().map(|(name, map)| (name.as_str(), map)) } + /// An iterator over all the maps that allows modification. + /// + /// # Examples + /// ```no_run + /// # use std::path::Path; + /// # #[derive(thiserror::Error, Debug)] + /// # enum Error { + /// # #[error(transparent)] + /// # Bpf(#[from] aya::BpfError), + /// # #[error(transparent)] + /// # Pin(#[from] aya::pin::PinError) + /// # } + /// # let mut bpf = aya::Bpf::load(&[])?; + /// # let pin_path = Path::new("/tmp/pin_path"); + /// for (_, map) in bpf.maps_mut() { + /// map.pin(pin_path)?; + /// } + /// # Ok::<(), Error>(()) + /// ``` + pub fn maps_mut(&mut self) -> impl Iterator { + self.maps.iter_mut().map(|(name, map)| (name.as_str(), map)) + } + /// Returns a reference to the program with the given name. /// /// You can use this to inspect a program and its properties. To load and attach a program, use diff --git a/aya/src/maps/array/array.rs b/aya/src/maps/array/array.rs index 5d137d05..9fdc91e3 100644 --- a/aya/src/maps/array/array.rs +++ b/aya/src/maps/array/array.rs @@ -31,7 +31,7 @@ use crate::{ /// ``` #[doc(alias = "BPF_MAP_TYPE_ARRAY")] pub struct Array { - inner: T, + pub(crate) inner: T, _v: PhantomData, } diff --git a/aya/src/maps/array/per_cpu_array.rs b/aya/src/maps/array/per_cpu_array.rs index f384b713..9c261f0c 100644 --- a/aya/src/maps/array/per_cpu_array.rs +++ b/aya/src/maps/array/per_cpu_array.rs @@ -50,7 +50,7 @@ use crate::{ /// ``` #[doc(alias = "BPF_MAP_TYPE_PERCPU_ARRAY")] pub struct PerCpuArray { - inner: T, + pub(crate) inner: T, _v: PhantomData, } diff --git a/aya/src/maps/array/program_array.rs b/aya/src/maps/array/program_array.rs index 48bb6b9d..513bf77f 100644 --- a/aya/src/maps/array/program_array.rs +++ b/aya/src/maps/array/program_array.rs @@ -48,7 +48,7 @@ use crate::{ /// ``` #[doc(alias = "BPF_MAP_TYPE_PROG_ARRAY")] pub struct ProgramArray { - inner: T, + pub(crate) inner: T, } impl> ProgramArray { diff --git a/aya/src/maps/bloom_filter.rs b/aya/src/maps/bloom_filter.rs index dfe4d2cb..fd39e9e1 100644 --- a/aya/src/maps/bloom_filter.rs +++ b/aya/src/maps/bloom_filter.rs @@ -36,7 +36,7 @@ use crate::{ #[doc(alias = "BPF_MAP_TYPE_BLOOM_FILTER")] #[derive(Debug)] pub struct BloomFilter { - inner: T, + pub(crate) inner: T, _v: PhantomData, } @@ -118,7 +118,7 @@ mod tests { } => Ok(1337), call => panic!("unexpected syscall {:?}", call), }); - MapData::create(obj, "foo", None).unwrap() + MapData::create(obj, "foo".into(), None).unwrap() } fn sys_error(value: i32) -> SysResult { diff --git a/aya/src/maps/hash_map/hash_map.rs b/aya/src/maps/hash_map/hash_map.rs index 9d587b33..ec6320cc 100644 --- a/aya/src/maps/hash_map/hash_map.rs +++ b/aya/src/maps/hash_map/hash_map.rs @@ -34,7 +34,7 @@ use crate::{ #[doc(alias = "BPF_MAP_TYPE_LRU_HASH")] #[derive(Debug)] pub struct HashMap { - inner: T, + pub(crate) inner: T, _k: PhantomData, _v: PhantomData, } diff --git a/aya/src/maps/hash_map/mod.rs b/aya/src/maps/hash_map/mod.rs index 40c171ce..ba0ce7eb 100644 --- a/aya/src/maps/hash_map/mod.rs +++ b/aya/src/maps/hash_map/mod.rs @@ -61,7 +61,7 @@ mod test_utils { } => Ok(1337), call => panic!("unexpected syscall {:?}", call), }); - MapData::create(obj, "foo", None).unwrap() + MapData::create(obj, "foo".into(), None).unwrap() } pub(super) fn new_obj_map(map_type: bpf_map_type) -> obj::Map { diff --git a/aya/src/maps/hash_map/per_cpu_hash_map.rs b/aya/src/maps/hash_map/per_cpu_hash_map.rs index 56fc2ae2..3bdff9af 100644 --- a/aya/src/maps/hash_map/per_cpu_hash_map.rs +++ b/aya/src/maps/hash_map/per_cpu_hash_map.rs @@ -43,7 +43,7 @@ use crate::{ #[doc(alias = "BPF_MAP_TYPE_LRU_PERCPU_HASH")] #[doc(alias = "BPF_MAP_TYPE_PERCPU_HASH")] pub struct PerCpuHashMap { - inner: T, + pub(crate) inner: T, _k: PhantomData, _v: PhantomData, } diff --git a/aya/src/maps/lpm_trie.rs b/aya/src/maps/lpm_trie.rs index d4e1e678..56d86453 100644 --- a/aya/src/maps/lpm_trie.rs +++ b/aya/src/maps/lpm_trie.rs @@ -48,7 +48,7 @@ use crate::{ #[doc(alias = "BPF_MAP_TYPE_LPM_TRIE")] #[derive(Debug)] pub struct LpmTrie { - inner: T, + pub(crate) inner: T, _k: PhantomData, _v: PhantomData, } @@ -235,7 +235,7 @@ mod tests { } => Ok(1337), call => panic!("unexpected syscall {:?}", call), }); - MapData::create(obj, "foo", None).unwrap() + MapData::create(obj, "foo".into(), None).unwrap() } fn sys_error(value: i32) -> SysResult { diff --git a/aya/src/maps/mod.rs b/aya/src/maps/mod.rs index e79b53e8..8681437f 100644 --- a/aya/src/maps/mod.rs +++ b/aya/src/maps/mod.rs @@ -48,6 +48,7 @@ //! versa. Because of that, all map values must be plain old data and therefore //! implement the [Pod] trait. use std::{ + borrow::BorrowMut, ffi::CString, fmt, io, marker::PhantomData, @@ -169,8 +170,8 @@ pub enum MapError { #[error(transparent)] SyscallError(#[from] SyscallError), - /// Could not pin map by name - #[error("map `{name:?}` requested pinning by name. pinning failed")] + /// Could not pin map + #[error("map `{name:?}` requested pinning. pinning failed")] PinError { /// The map name name: Option, @@ -291,8 +292,113 @@ impl Map { Self::Unsupported(map) => map.obj.map_type(), } } + + /// Pins the map to a BPF filesystem. + /// + /// When a BPF map is pinned to a BPF filesystem it will remain loaded after + /// Aya has unloaded the program. + /// To remove the map, the file on the BPF filesystem must be removed. + /// Any directories in the the path provided should have been created by the caller. + pub fn pin>(&mut self, path: P) -> Result<(), PinError> { + match self { + Self::Array(map) => map.pin(path), + Self::PerCpuArray(map) => map.pin(path), + Self::ProgramArray(map) => map.pin(path), + Self::HashMap(map) => map.pin(path), + Self::LruHashMap(map) => map.pin(path), + Self::PerCpuHashMap(map) => map.pin(path), + Self::PerCpuLruHashMap(map) => map.pin(path), + Self::PerfEventArray(map) => map.pin(path), + Self::SockHash(map) => map.pin(path), + Self::SockMap(map) => map.pin(path), + Self::BloomFilter(map) => map.pin(path), + Self::LpmTrie(map) => map.pin(path), + Self::Stack(map) => map.pin(path), + Self::StackTraceMap(map) => map.pin(path), + Self::Queue(map) => map.pin(path), + Self::Unsupported(map) => map.pin(path), + } + } + + /// Removes the pinned map from a BPF filesystem. + pub fn unpin>(&mut self, path: P) -> Result<(), io::Error> { + match self { + Self::Array(map) => map.unpin(path), + Self::PerCpuArray(map) => map.unpin(path), + Self::ProgramArray(map) => map.unpin(path), + Self::HashMap(map) => map.unpin(path), + Self::LruHashMap(map) => map.unpin(path), + Self::PerCpuHashMap(map) => map.unpin(path), + Self::PerCpuLruHashMap(map) => map.unpin(path), + Self::PerfEventArray(map) => map.unpin(path), + Self::SockHash(map) => map.unpin(path), + Self::SockMap(map) => map.unpin(path), + Self::BloomFilter(map) => map.unpin(path), + Self::LpmTrie(map) => map.unpin(path), + Self::Stack(map) => map.unpin(path), + Self::StackTraceMap(map) => map.unpin(path), + Self::Queue(map) => map.unpin(path), + Self::Unsupported(map) => map.unpin(path), + } + } +} + +// Implements map pinning for different map implementations +// TODO add support for PerfEventArrays and AsyncPerfEventArrays +macro_rules! impl_map_pin { + ($ty_param:tt { + $($ty:ident),+ $(,)? + }) => { + $(impl_map_pin!(<$ty_param> $ty);)+ + }; + ( + <($($ty_param:ident),*)> + $ty:ident + ) => { + impl, $($ty_param: Pod),*> $ty + { + /// Pins the map to a BPF filesystem. + /// + /// When a BPF map is pinned to a BPF filesystem it will remain loaded after + /// Aya has unloaded the program. + /// To remove the map, the file on the BPF filesystem must be removed. + /// Any directories in the the path provided should have been created by the caller. + pub fn pin>(&mut self, path: P) -> Result<(), PinError> { + let data = self.inner.borrow_mut(); + data.pin(path) + } + + /// Removes the pinned map from a BPF filesystem. + pub fn unpin>(&mut self, path: P) -> Result<(), io::Error> { + let data = self.inner.borrow_mut(); + data.unpin(path) + } + } + + }; } +impl_map_pin!(() { + ProgramArray, + SockMap, + StackTraceMap, +}); + +impl_map_pin!((V) { + Array, + PerCpuArray, + SockHash, + BloomFilter, + Queue, + Stack, +}); + +impl_map_pin!((K, V) { + HashMap, + PerCpuHashMap, + LpmTrie, +}); + // Implements TryFrom for different map implementations. Different map implementations can be // constructed from different variants of the map enum. Also, the implementation may have type // parameters (which we assume all have the bound `Pod` and nothing else). @@ -415,10 +521,11 @@ impl MapData { /// Creates a new map with the provided `name` pub fn create( obj: obj::Map, - name: &str, + name: String, btf_fd: Option>, ) -> Result { - let c_name = CString::new(name).map_err(|_| MapError::InvalidName { name: name.into() })?; + let c_name = + CString::new(name.clone()).map_err(|_| MapError::InvalidName { name: name.clone() })?; #[cfg(not(test))] let kernel_version = KernelVersion::current().unwrap(); @@ -431,7 +538,7 @@ impl MapData { } MapError::CreateError { - name: name.into(), + name, code, io_error, } @@ -443,18 +550,18 @@ impl MapData { pub(crate) fn create_pinned_by_name>( path: P, obj: obj::Map, - name: &str, + name: String, btf_fd: Option>, ) -> Result { use std::os::unix::ffi::OsStrExt as _; // try to open map in case it's already pinned - let path = path.as_ref().join(name); + let path = path.as_ref().join(name.clone()); let path_string = match CString::new(path.as_os_str().as_bytes()) { Ok(path) => path, Err(error) => { return Err(MapError::PinError { - name: Some(name.into()), + name: Some(name), error: PinError::InvalidPinPath { path, error }, }); } @@ -468,9 +575,9 @@ impl MapData { Ok(Self { obj, fd }) } Err(_) => { - let mut map = Self::create(obj, name, btf_fd)?; + let mut map = Self::create(obj, name.clone(), btf_fd)?; map.pin(&path).map_err(|error| MapError::PinError { - name: Some(name.into()), + name: Some(name), error, })?; Ok(map) @@ -584,6 +691,10 @@ impl MapData { Ok(()) } + pub(crate) fn unpin>(&mut self, path: P) -> Result<(), io::Error> { + std::fs::remove_file(path) + } + /// Returns the file descriptor of the map. pub fn fd(&self) -> &MapFd { let Self { obj: _, fd } = self; @@ -825,7 +936,7 @@ mod tests { }); assert_matches!( - MapData::create(new_obj_map(), "foo", None), + MapData::create(new_obj_map(), "foo".into(), None), Ok(MapData { obj: _, fd, @@ -838,7 +949,7 @@ mod tests { override_syscall(|_| Err((-42, io::Error::from_raw_os_error(EFAULT)))); assert_matches!( - MapData::create(new_obj_map(), "foo", None), + MapData::create(new_obj_map(), "foo".into(), None), Err(MapError::CreateError { name, code, io_error }) => { assert_eq!(name, "foo"); assert_eq!(code, -42); diff --git a/aya/src/maps/queue.rs b/aya/src/maps/queue.rs index 31c44633..b9177b24 100644 --- a/aya/src/maps/queue.rs +++ b/aya/src/maps/queue.rs @@ -30,7 +30,7 @@ use crate::{ /// ``` #[doc(alias = "BPF_MAP_TYPE_QUEUE")] pub struct Queue { - inner: T, + pub(crate) inner: T, _v: PhantomData, } diff --git a/aya/src/maps/sock/sock_hash.rs b/aya/src/maps/sock/sock_hash.rs index 99d0f871..e3074be8 100644 --- a/aya/src/maps/sock/sock_hash.rs +++ b/aya/src/maps/sock/sock_hash.rs @@ -65,7 +65,7 @@ use crate::{ /// ``` #[doc(alias = "BPF_MAP_TYPE_SOCKHASH")] pub struct SockHash { - inner: T, + pub(crate) inner: T, _k: PhantomData, } diff --git a/aya/src/maps/stack.rs b/aya/src/maps/stack.rs index ac1453cd..a85fe14d 100644 --- a/aya/src/maps/stack.rs +++ b/aya/src/maps/stack.rs @@ -30,7 +30,7 @@ use crate::{ /// ``` #[doc(alias = "BPF_MAP_TYPE_STACK")] pub struct Stack { - inner: T, + pub(crate) inner: T, _v: PhantomData, } diff --git a/aya/src/maps/stack_trace.rs b/aya/src/maps/stack_trace.rs index fdf1d937..389b28f7 100644 --- a/aya/src/maps/stack_trace.rs +++ b/aya/src/maps/stack_trace.rs @@ -67,7 +67,7 @@ use crate::{ #[derive(Debug)] #[doc(alias = "BPF_MAP_TYPE_STACK_TRACE")] pub struct StackTraceMap { - inner: T, + pub(crate) inner: T, max_stack_depth: usize, } diff --git a/aya/src/sys/bpf.rs b/aya/src/sys/bpf.rs index d3cca3ee..df5d3027 100644 --- a/aya/src/sys/bpf.rs +++ b/aya/src/sys/bpf.rs @@ -754,7 +754,7 @@ pub(crate) fn is_bpf_global_data_supported() -> bool { symbol_index: None, data: Vec::new(), }), - "aya_global", + "aya_global".into(), None, ); diff --git a/xtask/public-api/aya.txt b/xtask/public-api/aya.txt index 8c1b0b9c..043bdabe 100644 --- a/xtask/public-api/aya.txt +++ b/xtask/public-api/aya.txt @@ -12,6 +12,9 @@ pub fn aya::maps::array::Array::get(&self, index: &u32, flags: u64) -> cor pub fn aya::maps::array::Array::iter(&self) -> impl core::iter::traits::iterator::Iterator> + '_ pub fn aya::maps::array::Array::len(&self) -> u32 impl, V: aya::Pod> aya::maps::array::Array +pub fn aya::maps::array::Array::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::array::Array::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> +impl, V: aya::Pod> aya::maps::array::Array pub fn aya::maps::array::Array::set(&mut self, index: u32, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::array::Array<&'a aya::maps::MapData, V> pub type aya::maps::array::Array<&'a aya::maps::MapData, V>::Error = aya::maps::MapError @@ -52,6 +55,9 @@ pub fn aya::maps::PerCpuArray::get(&self, index: &u32, flags: u64) -> core pub fn aya::maps::PerCpuArray::iter(&self) -> impl core::iter::traits::iterator::Iterator, aya::maps::MapError>> + '_ pub fn aya::maps::PerCpuArray::len(&self) -> u32 impl, V: aya::Pod> aya::maps::PerCpuArray +pub fn aya::maps::PerCpuArray::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::PerCpuArray::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> +impl, V: aya::Pod> aya::maps::PerCpuArray pub fn aya::maps::PerCpuArray::set(&mut self, index: u32, values: aya::maps::PerCpuValues, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::PerCpuArray<&'a aya::maps::MapData, V> pub type aya::maps::PerCpuArray<&'a aya::maps::MapData, V>::Error = aya::maps::MapError @@ -92,6 +98,9 @@ pub fn aya::maps::ProgramArray::indices(&self) -> aya::maps::MapKeys<'_, u32> impl> aya::maps::ProgramArray pub fn aya::maps::ProgramArray::clear_index(&mut self, index: &u32) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::ProgramArray::set(&mut self, index: u32, program: &aya::programs::ProgramFd, flags: u64) -> core::result::Result<(), aya::maps::MapError> +impl> aya::maps::ProgramArray +pub fn aya::maps::ProgramArray::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::ProgramArray::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl core::convert::TryFrom for aya::maps::ProgramArray pub type aya::maps::ProgramArray::Error = aya::maps::MapError pub fn aya::maps::ProgramArray::try_from(map: aya::maps::Map) -> core::result::Result @@ -128,6 +137,9 @@ impl, V: aya::Pod> aya::maps::bloom_ pub fn aya::maps::bloom_filter::BloomFilter::contains(&self, value: &V, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl, V: aya::Pod> aya::maps::bloom_filter::BloomFilter pub fn aya::maps::bloom_filter::BloomFilter::insert(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> +impl, V: aya::Pod> aya::maps::bloom_filter::BloomFilter +pub fn aya::maps::bloom_filter::BloomFilter::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::bloom_filter::BloomFilter::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::bloom_filter::BloomFilter<&'a aya::maps::MapData, V> pub type aya::maps::bloom_filter::BloomFilter<&'a aya::maps::MapData, V>::Error = aya::maps::MapError pub fn aya::maps::bloom_filter::BloomFilter<&'a aya::maps::MapData, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result @@ -169,6 +181,9 @@ pub fn aya::maps::hash_map::HashMap::keys(&self) -> aya::maps::MapKeys< impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::HashMap pub fn aya::maps::hash_map::HashMap::insert(&mut self, key: impl core::borrow::Borrow, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::hash_map::HashMap::remove(&mut self, key: &K) -> core::result::Result<(), aya::maps::MapError> +impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::HashMap +pub fn aya::maps::hash_map::HashMap::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::hash_map::HashMap::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl<'a, K: aya::Pod, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::hash_map::HashMap<&'a aya::maps::MapData, K, V> pub type aya::maps::hash_map::HashMap<&'a aya::maps::MapData, K, V>::Error = aya::maps::MapError pub fn aya::maps::hash_map::HashMap<&'a aya::maps::MapData, K, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result @@ -212,6 +227,9 @@ pub fn aya::maps::hash_map::PerCpuHashMap::keys(&self) -> aya::maps::Ma impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::PerCpuHashMap pub fn aya::maps::hash_map::PerCpuHashMap::insert(&mut self, key: impl core::borrow::Borrow, values: aya::maps::PerCpuValues, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::hash_map::PerCpuHashMap::remove(&mut self, key: &K) -> core::result::Result<(), aya::maps::MapError> +impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::PerCpuHashMap +pub fn aya::maps::hash_map::PerCpuHashMap::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::hash_map::PerCpuHashMap::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl<'a, K: aya::Pod, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::hash_map::PerCpuHashMap<&'a aya::maps::MapData, K, V> pub type aya::maps::hash_map::PerCpuHashMap<&'a aya::maps::MapData, K, V>::Error = aya::maps::MapError pub fn aya::maps::hash_map::PerCpuHashMap<&'a aya::maps::MapData, K, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result @@ -291,6 +309,9 @@ pub fn aya::maps::lpm_trie::LpmTrie::keys(&self) -> aya::maps::MapKeys< impl, K: aya::Pod, V: aya::Pod> aya::maps::lpm_trie::LpmTrie pub fn aya::maps::lpm_trie::LpmTrie::insert(&mut self, key: &aya::maps::lpm_trie::Key, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::lpm_trie::LpmTrie::remove(&mut self, key: &aya::maps::lpm_trie::Key) -> core::result::Result<(), aya::maps::MapError> +impl, K: aya::Pod, V: aya::Pod> aya::maps::lpm_trie::LpmTrie +pub fn aya::maps::lpm_trie::LpmTrie::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::lpm_trie::LpmTrie::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl<'a, K: aya::Pod, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::lpm_trie::LpmTrie<&'a aya::maps::MapData, K, V> pub type aya::maps::lpm_trie::LpmTrie<&'a aya::maps::MapData, K, V>::Error = aya::maps::MapError pub fn aya::maps::lpm_trie::LpmTrie<&'a aya::maps::MapData, K, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result @@ -524,6 +545,9 @@ pub struct aya::maps::queue::Queue impl, V: aya::Pod> aya::maps::queue::Queue pub fn aya::maps::queue::Queue::capacity(&self) -> u32 impl, V: aya::Pod> aya::maps::queue::Queue +pub fn aya::maps::queue::Queue::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::queue::Queue::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> +impl, V: aya::Pod> aya::maps::queue::Queue pub fn aya::maps::queue::Queue::pop(&mut self, flags: u64) -> core::result::Result pub fn aya::maps::queue::Queue::push(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::queue::Queue<&'a aya::maps::MapData, V> @@ -566,6 +590,9 @@ pub fn aya::maps::SockHash::keys(&self) -> aya::maps::MapKeys<'_, K> impl, K: aya::Pod> aya::maps::SockHash pub fn aya::maps::SockHash::insert(&mut self, key: impl core::borrow::Borrow, value: I, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::SockHash::remove(&mut self, key: &K) -> core::result::Result<(), aya::maps::MapError> +impl, V: aya::Pod> aya::maps::SockHash +pub fn aya::maps::SockHash::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::SockHash::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::SockHash<&'a aya::maps::MapData, V> pub type aya::maps::SockHash<&'a aya::maps::MapData, V>::Error = aya::maps::MapError pub fn aya::maps::SockHash<&'a aya::maps::MapData, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result @@ -606,6 +633,9 @@ pub fn aya::maps::SockMap::indices(&self) -> aya::maps::MapKeys<'_, u32> impl> aya::maps::SockMap pub fn aya::maps::SockMap::clear_index(&mut self, index: &u32) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::SockMap::set(&mut self, index: u32, socket: &I, flags: u64) -> core::result::Result<(), aya::maps::MapError> +impl> aya::maps::SockMap +pub fn aya::maps::SockMap::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::SockMap::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl core::convert::TryFrom for aya::maps::SockMap pub type aya::maps::SockMap::Error = aya::maps::MapError pub fn aya::maps::SockMap::try_from(map: aya::maps::Map) -> core::result::Result @@ -667,6 +697,9 @@ pub struct aya::maps::stack::Stack impl, V: aya::Pod> aya::maps::stack::Stack pub fn aya::maps::stack::Stack::capacity(&self) -> u32 impl, V: aya::Pod> aya::maps::stack::Stack +pub fn aya::maps::stack::Stack::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::stack::Stack::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> +impl, V: aya::Pod> aya::maps::stack::Stack pub fn aya::maps::stack::Stack::pop(&mut self, flags: u64) -> core::result::Result pub fn aya::maps::stack::Stack::push(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::stack::Stack<&'a aya::maps::MapData, V> @@ -756,6 +789,9 @@ impl> aya::maps::stack_trace::StackT pub fn aya::maps::stack_trace::StackTraceMap::get(&self, stack_id: &u32, flags: u64) -> core::result::Result pub fn aya::maps::stack_trace::StackTraceMap::iter(&self) -> aya::maps::MapIter<'_, u32, aya::maps::stack_trace::StackTrace, Self> pub fn aya::maps::stack_trace::StackTraceMap::stack_ids(&self) -> aya::maps::MapKeys<'_, u32> +impl> aya::maps::stack_trace::StackTraceMap +pub fn aya::maps::stack_trace::StackTraceMap::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::stack_trace::StackTraceMap::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl core::convert::TryFrom for aya::maps::stack_trace::StackTraceMap pub type aya::maps::stack_trace::StackTraceMap::Error = aya::maps::MapError pub fn aya::maps::stack_trace::StackTraceMap::try_from(map: aya::maps::Map) -> core::result::Result @@ -812,6 +848,9 @@ pub aya::maps::Map::SockMap(aya::maps::MapData) pub aya::maps::Map::Stack(aya::maps::MapData) pub aya::maps::Map::StackTraceMap(aya::maps::MapData) pub aya::maps::Map::Unsupported(aya::maps::MapData) +impl aya::maps::Map +pub fn aya::maps::Map::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::Map::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl core::convert::TryFrom for aya::maps::ProgramArray pub type aya::maps::ProgramArray::Error = aya::maps::MapError pub fn aya::maps::ProgramArray::try_from(map: aya::maps::Map) -> core::result::Result @@ -1027,6 +1066,9 @@ pub fn aya::maps::array::Array::get(&self, index: &u32, flags: u64) -> cor pub fn aya::maps::array::Array::iter(&self) -> impl core::iter::traits::iterator::Iterator> + '_ pub fn aya::maps::array::Array::len(&self) -> u32 impl, V: aya::Pod> aya::maps::array::Array +pub fn aya::maps::array::Array::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::array::Array::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> +impl, V: aya::Pod> aya::maps::array::Array pub fn aya::maps::array::Array::set(&mut self, index: u32, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::array::Array<&'a aya::maps::MapData, V> pub type aya::maps::array::Array<&'a aya::maps::MapData, V>::Error = aya::maps::MapError @@ -1099,6 +1141,9 @@ impl, V: aya::Pod> aya::maps::bloom_ pub fn aya::maps::bloom_filter::BloomFilter::contains(&self, value: &V, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl, V: aya::Pod> aya::maps::bloom_filter::BloomFilter pub fn aya::maps::bloom_filter::BloomFilter::insert(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> +impl, V: aya::Pod> aya::maps::bloom_filter::BloomFilter +pub fn aya::maps::bloom_filter::BloomFilter::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::bloom_filter::BloomFilter::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::bloom_filter::BloomFilter<&'a aya::maps::MapData, V> pub type aya::maps::bloom_filter::BloomFilter<&'a aya::maps::MapData, V>::Error = aya::maps::MapError pub fn aya::maps::bloom_filter::BloomFilter<&'a aya::maps::MapData, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result @@ -1139,6 +1184,9 @@ pub fn aya::maps::hash_map::HashMap::keys(&self) -> aya::maps::MapKeys< impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::HashMap pub fn aya::maps::hash_map::HashMap::insert(&mut self, key: impl core::borrow::Borrow, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::hash_map::HashMap::remove(&mut self, key: &K) -> core::result::Result<(), aya::maps::MapError> +impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::HashMap +pub fn aya::maps::hash_map::HashMap::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::hash_map::HashMap::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl<'a, K: aya::Pod, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::hash_map::HashMap<&'a aya::maps::MapData, K, V> pub type aya::maps::hash_map::HashMap<&'a aya::maps::MapData, K, V>::Error = aya::maps::MapError pub fn aya::maps::hash_map::HashMap<&'a aya::maps::MapData, K, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result @@ -1182,6 +1230,9 @@ pub fn aya::maps::lpm_trie::LpmTrie::keys(&self) -> aya::maps::MapKeys< impl, K: aya::Pod, V: aya::Pod> aya::maps::lpm_trie::LpmTrie pub fn aya::maps::lpm_trie::LpmTrie::insert(&mut self, key: &aya::maps::lpm_trie::Key, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::lpm_trie::LpmTrie::remove(&mut self, key: &aya::maps::lpm_trie::Key) -> core::result::Result<(), aya::maps::MapError> +impl, K: aya::Pod, V: aya::Pod> aya::maps::lpm_trie::LpmTrie +pub fn aya::maps::lpm_trie::LpmTrie::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::lpm_trie::LpmTrie::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl<'a, K: aya::Pod, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::lpm_trie::LpmTrie<&'a aya::maps::MapData, K, V> pub type aya::maps::lpm_trie::LpmTrie<&'a aya::maps::MapData, K, V>::Error = aya::maps::MapError pub fn aya::maps::lpm_trie::LpmTrie<&'a aya::maps::MapData, K, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result @@ -1219,7 +1270,7 @@ impl core::convert::From for aya::maps::lpm_trie::LpmTrie pub fn aya::maps::lpm_trie::LpmTrie::from(t: T) -> T pub struct aya::maps::MapData impl aya::maps::MapData -pub fn aya::maps::MapData::create(obj: aya_obj::maps::Map, name: &str, btf_fd: core::option::Option>) -> core::result::Result +pub fn aya::maps::MapData::create(obj: aya_obj::maps::Map, name: alloc::string::String, btf_fd: core::option::Option>) -> core::result::Result pub fn aya::maps::MapData::fd(&self) -> &aya::maps::MapFd pub fn aya::maps::MapData::from_fd(fd: std::os::fd::owned::OwnedFd) -> core::result::Result pub fn aya::maps::MapData::from_pin>(path: P) -> core::result::Result @@ -1337,6 +1388,9 @@ pub fn aya::maps::PerCpuArray::get(&self, index: &u32, flags: u64) -> core pub fn aya::maps::PerCpuArray::iter(&self) -> impl core::iter::traits::iterator::Iterator, aya::maps::MapError>> + '_ pub fn aya::maps::PerCpuArray::len(&self) -> u32 impl, V: aya::Pod> aya::maps::PerCpuArray +pub fn aya::maps::PerCpuArray::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::PerCpuArray::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> +impl, V: aya::Pod> aya::maps::PerCpuArray pub fn aya::maps::PerCpuArray::set(&mut self, index: u32, values: aya::maps::PerCpuValues, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::PerCpuArray<&'a aya::maps::MapData, V> pub type aya::maps::PerCpuArray<&'a aya::maps::MapData, V>::Error = aya::maps::MapError @@ -1379,6 +1433,9 @@ pub fn aya::maps::hash_map::PerCpuHashMap::keys(&self) -> aya::maps::Ma impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::PerCpuHashMap pub fn aya::maps::hash_map::PerCpuHashMap::insert(&mut self, key: impl core::borrow::Borrow, values: aya::maps::PerCpuValues, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::hash_map::PerCpuHashMap::remove(&mut self, key: &K) -> core::result::Result<(), aya::maps::MapError> +impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::PerCpuHashMap +pub fn aya::maps::hash_map::PerCpuHashMap::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::hash_map::PerCpuHashMap::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl<'a, K: aya::Pod, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::hash_map::PerCpuHashMap<&'a aya::maps::MapData, K, V> pub type aya::maps::hash_map::PerCpuHashMap<&'a aya::maps::MapData, K, V>::Error = aya::maps::MapError pub fn aya::maps::hash_map::PerCpuHashMap<&'a aya::maps::MapData, K, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result @@ -1487,6 +1544,9 @@ pub fn aya::maps::ProgramArray::indices(&self) -> aya::maps::MapKeys<'_, u32> impl> aya::maps::ProgramArray pub fn aya::maps::ProgramArray::clear_index(&mut self, index: &u32) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::ProgramArray::set(&mut self, index: u32, program: &aya::programs::ProgramFd, flags: u64) -> core::result::Result<(), aya::maps::MapError> +impl> aya::maps::ProgramArray +pub fn aya::maps::ProgramArray::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::ProgramArray::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl core::convert::TryFrom for aya::maps::ProgramArray pub type aya::maps::ProgramArray::Error = aya::maps::MapError pub fn aya::maps::ProgramArray::try_from(map: aya::maps::Map) -> core::result::Result @@ -1521,6 +1581,9 @@ pub struct aya::maps::Queue impl, V: aya::Pod> aya::maps::queue::Queue pub fn aya::maps::queue::Queue::capacity(&self) -> u32 impl, V: aya::Pod> aya::maps::queue::Queue +pub fn aya::maps::queue::Queue::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::queue::Queue::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> +impl, V: aya::Pod> aya::maps::queue::Queue pub fn aya::maps::queue::Queue::pop(&mut self, flags: u64) -> core::result::Result pub fn aya::maps::queue::Queue::push(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::queue::Queue<&'a aya::maps::MapData, V> @@ -1562,6 +1625,9 @@ pub fn aya::maps::SockHash::keys(&self) -> aya::maps::MapKeys<'_, K> impl, K: aya::Pod> aya::maps::SockHash pub fn aya::maps::SockHash::insert(&mut self, key: impl core::borrow::Borrow, value: I, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::SockHash::remove(&mut self, key: &K) -> core::result::Result<(), aya::maps::MapError> +impl, V: aya::Pod> aya::maps::SockHash +pub fn aya::maps::SockHash::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::SockHash::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::SockHash<&'a aya::maps::MapData, V> pub type aya::maps::SockHash<&'a aya::maps::MapData, V>::Error = aya::maps::MapError pub fn aya::maps::SockHash<&'a aya::maps::MapData, V>::try_from(map: &'a aya::maps::Map) -> core::result::Result @@ -1602,6 +1668,9 @@ pub fn aya::maps::SockMap::indices(&self) -> aya::maps::MapKeys<'_, u32> impl> aya::maps::SockMap pub fn aya::maps::SockMap::clear_index(&mut self, index: &u32) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::SockMap::set(&mut self, index: u32, socket: &I, flags: u64) -> core::result::Result<(), aya::maps::MapError> +impl> aya::maps::SockMap +pub fn aya::maps::SockMap::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::SockMap::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl core::convert::TryFrom for aya::maps::SockMap pub type aya::maps::SockMap::Error = aya::maps::MapError pub fn aya::maps::SockMap::try_from(map: aya::maps::Map) -> core::result::Result @@ -1636,6 +1705,9 @@ pub struct aya::maps::Stack impl, V: aya::Pod> aya::maps::stack::Stack pub fn aya::maps::stack::Stack::capacity(&self) -> u32 impl, V: aya::Pod> aya::maps::stack::Stack +pub fn aya::maps::stack::Stack::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::stack::Stack::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> +impl, V: aya::Pod> aya::maps::stack::Stack pub fn aya::maps::stack::Stack::pop(&mut self, flags: u64) -> core::result::Result pub fn aya::maps::stack::Stack::push(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::stack::Stack<&'a aya::maps::MapData, V> @@ -1673,6 +1745,9 @@ impl> aya::maps::stack_trace::StackT pub fn aya::maps::stack_trace::StackTraceMap::get(&self, stack_id: &u32, flags: u64) -> core::result::Result pub fn aya::maps::stack_trace::StackTraceMap::iter(&self) -> aya::maps::MapIter<'_, u32, aya::maps::stack_trace::StackTrace, Self> pub fn aya::maps::stack_trace::StackTraceMap::stack_ids(&self) -> aya::maps::MapKeys<'_, u32> +impl> aya::maps::stack_trace::StackTraceMap +pub fn aya::maps::stack_trace::StackTraceMap::pin>(&mut self, path: P) -> core::result::Result<(), aya::pin::PinError> +pub fn aya::maps::stack_trace::StackTraceMap::unpin>(&mut self, path: P) -> core::result::Result<(), std::io::error::Error> impl core::convert::TryFrom for aya::maps::stack_trace::StackTraceMap pub type aya::maps::stack_trace::StackTraceMap::Error = aya::maps::MapError pub fn aya::maps::stack_trace::StackTraceMap::try_from(map: aya::maps::Map) -> core::result::Result @@ -6979,7 +7054,6 @@ pub aya::BpfError::FileError::error: std::io::error::Error pub aya::BpfError::FileError::path: std::path::PathBuf pub aya::BpfError::MapError(aya::maps::MapError) pub aya::BpfError::NoBTF -pub aya::BpfError::NoPinPath pub aya::BpfError::ParseError(aya_obj::obj::ParseError) pub aya::BpfError::ProgramError(aya::programs::ProgramError) pub aya::BpfError::RelocationError(aya_obj::relocation::BpfRelocationError) @@ -7033,6 +7107,7 @@ pub fn aya::Bpf::load_file>(path: P) -> pub fn aya::Bpf::map(&self, name: &str) -> core::option::Option<&aya::maps::Map> pub fn aya::Bpf::map_mut(&mut self, name: &str) -> core::option::Option<&mut aya::maps::Map> pub fn aya::Bpf::maps(&self) -> impl core::iter::traits::iterator::Iterator +pub fn aya::Bpf::maps_mut(&mut self) -> impl core::iter::traits::iterator::Iterator pub fn aya::Bpf::program(&self, name: &str) -> core::option::Option<&aya::programs::Program> pub fn aya::Bpf::program_mut(&mut self, name: &str) -> core::option::Option<&mut aya::programs::Program> pub fn aya::Bpf::programs(&self) -> impl core::iter::traits::iterator::Iterator