From 0199e4b29704df4cebf65d3d5f09ab1af6982cbd Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Wed, 24 Feb 2021 06:31:53 +0000 Subject: [PATCH] aya: bpf: Add Bpf::programs() --- aya/src/bpf.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs index 90a299af..642f652b 100644 --- a/aya/src/bpf.rs +++ b/aya/src/bpf.rs @@ -210,6 +210,10 @@ impl Bpf { .map(|p| T::try_from(p)) .transpose() } + + pub fn programs(&self) -> impl Iterator { + self.programs.values() + } } #[derive(Debug, Error)]