Browse Source

aya/programs: export some missing modules

Previously we were only re-exporting the program types from these, so
links and other pub types were not exported.
Alessandro Decina 1 year ago
parent
commit
d570450a0c
2 changed files with 13 additions and 8 deletions
  1. 12 8
      aya/src/programs/mod.rs
  2. 1 0
      aya/src/programs/sk_lookup.rs

+ 12 - 8
aya/src/programs/mod.rs

@@ -35,6 +35,12 @@
 //! [`Bpf::program`]: crate::Bpf::program
 //! [`Bpf::program_mut`]: crate::Bpf::program_mut
 //! [`maps`]: crate::maps
+
+// modules we don't export
+mod probe;
+mod utils;
+
+// modules we explicitly export so their pub items (Links etc) get exported too
 pub mod cgroup_device;
 pub mod cgroup_skb;
 pub mod cgroup_sock;
@@ -50,18 +56,16 @@ pub mod lirc_mode2;
 pub mod lsm;
 pub mod perf_attach;
 pub mod perf_event;
-mod probe;
-mod raw_trace_point;
-mod sk_lookup;
-mod sk_msg;
-mod sk_skb;
-mod sock_ops;
-mod socket_filter;
+pub mod raw_trace_point;
+pub mod sk_lookup;
+pub mod sk_msg;
+pub mod sk_skb;
+pub mod sock_ops;
+pub mod socket_filter;
 pub mod tc;
 pub mod tp_btf;
 pub mod trace_point;
 pub mod uprobe;
-mod utils;
 pub mod xdp;
 
 use std::{

+ 1 - 0
aya/src/programs/sk_lookup.rs

@@ -1,3 +1,4 @@
+//! Programmable socket lookup.
 use std::os::fd::AsFd;
 
 use super::links::FdLink;