Browse Source

aya: bpf: Add Bpf::programs()

Alessandro Decina 4 years ago
parent
commit
0199e4b297
1 changed files with 4 additions and 0 deletions
  1. 4 0
      aya/src/bpf.rs

+ 4 - 0
aya/src/bpf.rs

@@ -210,6 +210,10 @@ impl Bpf {
             .map(|p| T::try_from(p))
             .transpose()
     }
+
+    pub fn programs(&self) -> impl Iterator<Item = &Program> {
+        self.programs.values()
+    }
 }
 
 #[derive(Debug, Error)]