Browse Source

Merge pull request #528 from dave-tucker/rename-all-the-things

Rename Bpf -> Ebpf across all crates for consistency
Dave Tucker 1 year ago
parent
commit
63d8d4d34b
100 changed files with 1409 additions and 1419 deletions
  1. 12 12
      .github/workflows/ci.yml
  2. 2 2
      .mergify.yml
  3. 5 5
      Cargo.toml
  4. 4 4
      README.md
  5. 3 3
      aya-ebpf-macros/Cargo.toml
  6. 0 0
      aya-ebpf-macros/src/args.rs
  7. 3 3
      aya-ebpf-macros/src/btf_tracepoint.rs
  8. 4 4
      aya-ebpf-macros/src/cgroup_device.rs
  9. 14 14
      aya-ebpf-macros/src/cgroup_skb.rs
  10. 10 10
      aya-ebpf-macros/src/cgroup_sock.rs
  11. 26 26
      aya-ebpf-macros/src/cgroup_sock_addr.rs
  12. 6 6
      aya-ebpf-macros/src/cgroup_sockopt.rs
  13. 4 4
      aya-ebpf-macros/src/cgroup_sysctl.rs
  14. 10 10
      aya-ebpf-macros/src/fentry.rs
  15. 4 4
      aya-ebpf-macros/src/fexit.rs
  16. 5 5
      aya-ebpf-macros/src/kprobe.rs
  17. 12 12
      aya-ebpf-macros/src/lib.rs
  18. 7 7
      aya-ebpf-macros/src/lsm.rs
  19. 0 0
      aya-ebpf-macros/src/map.rs
  20. 2 2
      aya-ebpf-macros/src/perf_event.rs
  21. 4 4
      aya-ebpf-macros/src/raw_tracepoint.rs
  22. 6 6
      aya-ebpf-macros/src/sk_lookup.rs
  23. 6 6
      aya-ebpf-macros/src/sk_msg.rs
  24. 10 10
      aya-ebpf-macros/src/sk_skb.rs
  25. 6 6
      aya-ebpf-macros/src/sock_ops.rs
  26. 6 6
      aya-ebpf-macros/src/socket_filter.rs
  27. 6 6
      aya-ebpf-macros/src/tc.rs
  28. 4 4
      aya-ebpf-macros/src/tracepoint.rs
  29. 6 6
      aya-ebpf-macros/src/uprobe.rs
  30. 27 27
      aya-ebpf-macros/src/xdp.rs
  31. 93 126
      aya-log/CHANGELOG.md
  32. 2 2
      aya-log/README.md
  33. 16 12
      aya-log/src/lib.rs
  34. 3 3
      aya-obj/src/btf/btf.rs
  35. 4 4
      aya-obj/src/maps.rs
  36. 83 78
      aya-obj/src/obj.rs
  37. 14 12
      aya-obj/src/relocation.rs
  38. 1 1
      aya-tool/src/bindgen.rs
  39. 1 1
      aya/CHANGELOG.md
  40. 3 3
      aya/README.md
  41. 102 90
      aya/src/bpf.rs
  42. 2 2
      aya/src/maps/array/array.rs
  43. 2 2
      aya/src/maps/array/per_cpu_array.rs
  44. 2 2
      aya/src/maps/array/program_array.rs
  45. 8 8
      aya/src/maps/bloom_filter.rs
  46. 17 17
      aya/src/maps/hash_map/hash_map.rs
  47. 3 3
      aya/src/maps/hash_map/mod.rs
  48. 4 4
      aya/src/maps/hash_map/per_cpu_hash_map.rs
  49. 9 9
      aya/src/maps/lpm_trie.rs
  50. 26 26
      aya/src/maps/mod.rs
  51. 2 2
      aya/src/maps/perf/async_perf_event_array.rs
  52. 2 2
      aya/src/maps/perf/perf_event_array.rs
  53. 2 2
      aya/src/maps/queue.rs
  54. 2 2
      aya/src/maps/ring_buf.rs
  55. 2 2
      aya/src/maps/sock/sock_hash.rs
  56. 2 2
      aya/src/maps/sock/sock_map.rs
  57. 2 2
      aya/src/maps/stack.rs
  58. 2 2
      aya/src/maps/stack_trace.rs
  59. 2 2
      aya/src/maps/xdp/cpu_map.rs
  60. 2 2
      aya/src/maps/xdp/dev_map.rs
  61. 2 2
      aya/src/maps/xdp/dev_map_hash.rs
  62. 2 2
      aya/src/maps/xdp/xsk_map.rs
  63. 2 2
      aya/src/programs/cgroup_device.rs
  64. 2 2
      aya/src/programs/cgroup_skb.rs
  65. 2 2
      aya/src/programs/cgroup_sock.rs
  66. 2 2
      aya/src/programs/cgroup_sock_addr.rs
  67. 2 2
      aya/src/programs/cgroup_sockopt.rs
  68. 2 2
      aya/src/programs/cgroup_sysctl.rs
  69. 3 3
      aya/src/programs/extension.rs
  70. 3 3
      aya/src/programs/fentry.rs
  71. 3 3
      aya/src/programs/fexit.rs
  72. 3 3
      aya/src/programs/kprobe.rs
  73. 5 5
      aya/src/programs/links.rs
  74. 3 3
      aya/src/programs/lirc_mode2.rs
  75. 3 3
      aya/src/programs/lsm.rs
  76. 14 14
      aya/src/programs/mod.rs
  77. 2 2
      aya/src/programs/perf_event.rs
  78. 3 3
      aya/src/programs/raw_trace_point.rs
  79. 2 2
      aya/src/programs/sk_lookup.rs
  80. 2 2
      aya/src/programs/sk_msg.rs
  81. 2 2
      aya/src/programs/sk_skb.rs
  82. 2 2
      aya/src/programs/sock_ops.rs
  83. 4 4
      aya/src/programs/socket_filter.rs
  84. 2 2
      aya/src/programs/tc.rs
  85. 3 3
      aya/src/programs/tp_btf.rs
  86. 2 2
      aya/src/programs/trace_point.rs
  87. 3 3
      aya/src/programs/xdp.rs
  88. 7 7
      aya/src/sys/bpf.rs
  89. 4 4
      aya/src/sys/mod.rs
  90. 4 4
      aya/src/util.rs
  91. 0 0
      ebpf/.cargo/config.toml
  92. 2 2
      ebpf/aya-ebpf-bindings/Cargo.toml
  93. 0 0
      ebpf/aya-ebpf-bindings/build.rs
  94. 0 0
      ebpf/aya-ebpf-bindings/include/bindings.h
  95. 81 81
      ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs
  96. 260 260
      ebpf/aya-ebpf-bindings/src/aarch64/helpers.rs
  97. 0 0
      ebpf/aya-ebpf-bindings/src/aarch64/mod.rs
  98. 82 82
      ebpf/aya-ebpf-bindings/src/armv7/bindings.rs
  99. 260 260
      ebpf/aya-ebpf-bindings/src/armv7/helpers.rs
  100. 0 0
      ebpf/aya-ebpf-bindings/src/armv7/mod.rs

+ 12 - 12
.github/workflows/ci.yml

@@ -55,8 +55,8 @@ jobs:
         run: |
           set -euxo pipefail
           cargo hack miri test --all-targets --feature-powerset \
-            --exclude aya-bpf \
-            --exclude aya-bpf-bindings \
+            --exclude aya-ebpf \
+            --exclude aya-ebpf-bindings \
             --exclude aya-log-ebpf \
             --exclude integration-ebpf \
             --exclude integration-test \
@@ -92,8 +92,8 @@ jobs:
         run: |
           set -euxo pipefail
           cargo hack build --all-targets --feature-powerset \
-            --exclude aya-bpf \
-            --exclude aya-bpf-bindings \
+            --exclude aya-ebpf \
+            --exclude aya-ebpf-bindings \
             --exclude aya-log-ebpf \
             --exclude integration-ebpf \
             --workspace
@@ -104,8 +104,8 @@ jobs:
         run: |
           set -euxo pipefail
           cargo hack test --all-targets --feature-powerset \
-            --exclude aya-bpf \
-            --exclude aya-bpf-bindings \
+            --exclude aya-ebpf \
+            --exclude aya-ebpf-bindings \
             --exclude aya-log-ebpf \
             --exclude integration-ebpf \
             --exclude integration-test \
@@ -117,15 +117,15 @@ jobs:
         run: |
           set -euxo pipefail
           cargo hack test --doc --feature-powerset \
-            --exclude aya-bpf \
-            --exclude aya-bpf-bindings \
+            --exclude aya-ebpf \
+            --exclude aya-ebpf-bindings \
             --exclude aya-log-ebpf \
             --exclude init \
             --exclude integration-ebpf \
             --exclude integration-test \
             --workspace
 
-  build-test-aya-bpf:
+  build-test-aya-ebpf:
     strategy:
       fail-fast: false
       matrix:
@@ -158,7 +158,7 @@ jobs:
           CARGO_CFG_BPF_TARGET_ARCH: ${{ matrix.arch }}
         run: |
           set -euxo pipefail
-          cargo hack build --package aya-bpf --package aya-log-ebpf \
+          cargo hack build --package aya-ebpf --package aya-log-ebpf \
             --feature-powerset \
             --target ${{ matrix.target }} \
             -Z build-std=core
@@ -170,7 +170,7 @@ jobs:
         run: |
           set -euxo pipefail
           cargo hack test --doc \
-            --package aya-bpf \
+            --package aya-ebpf \
             --package aya-log-ebpf \
             --feature-powerset
 
@@ -305,7 +305,7 @@ jobs:
     needs:
       - lint
       - build-test-aya
-      - build-test-aya-bpf
+      - build-test-aya-ebpf
       - run-integration-test
     runs-on: ubuntu-latest
     steps:

+ 2 - 2
.mergify.yml

@@ -52,7 +52,7 @@ pull_request_rules:
 
   - name: add labels for aya-bpf PRs
     conditions:
-      - files~=^(aya-bpf-macros|bpf/aya-bpf(-(cty|bindings))?)/
+      - files~=^(aya-ebpf-macros|ebpf/aya-ebpf(-(cty|bindings))?)/
     actions:
       label:
         add:
@@ -68,7 +68,7 @@ pull_request_rules:
 
   - name: add labels for aya-log-ebpf PRs
     conditions:
-      - files~=^(aya-log-common|bpf/aya-log-ebpf)/
+      - files~=^(aya-log-common|ebpf/aya-log-ebpf)/
     actions:
       label:
         add:

+ 5 - 5
Cargo.toml

@@ -11,13 +11,13 @@ members = [
     "xtask",
 
     # macros
-    "aya-bpf-macros",
+    "aya-ebpf-macros",
     "aya-log-ebpf-macros",
 
     # ebpf crates
-    "bpf/aya-bpf",
-    "bpf/aya-bpf-bindings",
-    "bpf/aya-log-ebpf",
+    "ebpf/aya-ebpf",
+    "ebpf/aya-ebpf-bindings",
+    "ebpf/aya-log-ebpf",
     "test/integration-ebpf",
 ]
 
@@ -35,7 +35,7 @@ default-members = [
     # tests, and that doesn't work unless they've been built with `cargo xtask`.
     "xtask",
 
-    "aya-bpf-macros",
+    "aya-ebpf-macros",
     "aya-log-ebpf-macros",
 
     # ebpf crates are omitted; they must be built with:

+ 4 - 4
README.md

@@ -74,14 +74,14 @@ use a `BPF_PROG_TYPE_CGROUP_SKB` program with aya:
 
 ```rust
 use std::fs::File;
-use aya::Bpf;
+use aya::Ebpf;
 use aya::programs::{CgroupSkb, CgroupSkbAttachType};
 
 // load the BPF code
-let mut bpf = Bpf::load_file("bpf.o")?;
+let mut ebpf = Ebpf::load_file("ebpf.o")?;
 
-// get the `ingress_filter` program compiled into `bpf.o`.
-let ingress: &mut CgroupSkb = bpf.program_mut("ingress_filter")?.try_into()?;
+// get the `ingress_filter` program compiled into `ebpf.o`.
+let ingress: &mut CgroupSkb = ebpf.program_mut("ingress_filter")?.try_into()?;
 
 // load the program into the kernel
 ingress.load()?;

+ 3 - 3
aya-bpf-macros/Cargo.toml → aya-ebpf-macros/Cargo.toml

@@ -1,7 +1,7 @@
 [package]
-name = "aya-bpf-macros"
+name = "aya-ebpf-macros"
 version = "0.1.0"
-description = "Proc macros used by aya-bpf"
+description = "Proc macros used by aya-ebpf"
 authors.workspace = true
 license.workspace = true
 repository.workspace = true
@@ -18,4 +18,4 @@ quote = { workspace = true }
 syn = { workspace = true, default-features = true, features = ["full"] }
 
 [dev-dependencies]
-aya-bpf = { path = "../bpf/aya-bpf", version = "0.1.0", default-features = false }
+aya-ebpf = { path = "../ebpf/aya-ebpf", version = "0.1.0", default-features = false }

+ 0 - 0
aya-bpf-macros/src/args.rs → aya-ebpf-macros/src/args.rs


+ 3 - 3
aya-bpf-macros/src/btf_tracepoint.rs → aya-ebpf-macros/src/btf_tracepoint.rs

@@ -34,7 +34,7 @@ impl BtfTracePoint {
             #[no_mangle]
             #[link_section = #section_name]
             #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 {
-                let _ = #fn_name(::aya_bpf::programs::BtfTracePointContext::new(ctx));
+                let _ = #fn_name(::aya_ebpf::programs::BtfTracePointContext::new(ctx));
                 return 0;
 
                 #item
@@ -65,7 +65,7 @@ mod tests {
             #[no_mangle]
             #[link_section = "tp_btf"]
             fn foo(ctx: *mut ::core::ffi::c_void) -> i32 {
-                let _ = foo(::aya_bpf::programs::BtfTracePointContext::new(ctx));
+                let _ = foo(::aya_ebpf::programs::BtfTracePointContext::new(ctx));
                 return 0;
 
                 fn foo(ctx: BtfTracePointContext) -> i32 {
@@ -92,7 +92,7 @@ mod tests {
             #[no_mangle]
             #[link_section = "tp_btf/some_func"]
             fn foo(ctx: *mut ::core::ffi::c_void) -> i32 {
-                let _ = foo(::aya_bpf::programs::BtfTracePointContext::new(ctx));
+                let _ = foo(::aya_ebpf::programs::BtfTracePointContext::new(ctx));
                 return 0;
 
                 fn foo(ctx: BtfTracePointContext) -> i32 {

+ 4 - 4
aya-bpf-macros/src/cgroup_device.rs → aya-ebpf-macros/src/cgroup_device.rs

@@ -23,8 +23,8 @@ impl CgroupDevice {
         Ok(quote! {
             #[no_mangle]
             #[link_section = "cgroup/dev"]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::bpf_cgroup_dev_ctx) -> i32 {
-                return #fn_name(::aya_bpf::programs::DeviceContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_cgroup_dev_ctx) -> i32 {
+                return #fn_name(::aya_ebpf::programs::DeviceContext::new(ctx));
 
                 #item
             }
@@ -53,8 +53,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/dev"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_cgroup_dev_ctx) -> i32 {
-                return foo(::aya_bpf::programs::DeviceContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_cgroup_dev_ctx) -> i32 {
+                return foo(::aya_ebpf::programs::DeviceContext::new(ctx));
 
                 fn foo(ctx: DeviceContext) -> i32 {
                     0

+ 14 - 14
aya-bpf-macros/src/cgroup_skb.rs → aya-ebpf-macros/src/cgroup_skb.rs

@@ -37,8 +37,8 @@ impl CgroupSkb {
         Ok(quote! {
             #[no_mangle]
             #[link_section = #section_name]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
-                return #fn_name(::aya_bpf::programs::SkBuffContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
+                return #fn_name(::aya_ebpf::programs::SkBuffContext::new(ctx));
 
                 #item
             }
@@ -67,8 +67,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/skb"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
-                return foo(::aya_bpf::programs::SkBuffContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
+                return foo(::aya_ebpf::programs::SkBuffContext::new(ctx));
 
                 fn foo(ctx: SkBuffContext) -> i32 {
                     0
@@ -93,8 +93,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup_skb/egress"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
-                return foo(::aya_bpf::programs::SkBuffContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
+                return foo(::aya_ebpf::programs::SkBuffContext::new(ctx));
 
                 fn foo(ctx: SkBuffContext) -> i32 {
                     0
@@ -119,8 +119,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup_skb/ingress"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
-                return foo(::aya_bpf::programs::SkBuffContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
+                return foo(::aya_ebpf::programs::SkBuffContext::new(ctx));
 
                 fn foo(ctx: SkBuffContext) -> i32 {
                     0
@@ -145,8 +145,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup_skb/egress"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
-                return foo(::aya_bpf::programs::SkBuffContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
+                return foo(::aya_ebpf::programs::SkBuffContext::new(ctx));
 
                 fn foo(ctx: SkBuffContext) -> i32 {
                     0
@@ -171,8 +171,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup_skb/egress"]
-            pub fn foo(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
-                return foo(::aya_bpf::programs::SkBuffContext::new(ctx));
+            pub fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
+                return foo(::aya_ebpf::programs::SkBuffContext::new(ctx));
 
                 pub fn foo(ctx: SkBuffContext) -> i32 {
                     0
@@ -197,8 +197,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup_skb/egress"]
-            pub(crate) fn foo(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
-                return foo(::aya_bpf::programs::SkBuffContext::new(ctx));
+            pub(crate) fn foo(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
+                return foo(::aya_ebpf::programs::SkBuffContext::new(ctx));
 
                 pub(crate) fn foo(ctx: SkBuffContext) -> i32 {
                     0

+ 10 - 10
aya-bpf-macros/src/cgroup_sock.rs → aya-ebpf-macros/src/cgroup_sock.rs

@@ -35,8 +35,8 @@ impl CgroupSock {
         Ok(quote! {
             #[no_mangle]
             #[link_section = #section_name]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::bpf_sock) -> i32 {
-                return #fn_name(::aya_bpf::programs::SockContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 {
+                return #fn_name(::aya_ebpf::programs::SockContext::new(ctx));
 
                 #item
             }
@@ -65,8 +65,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/post_bind4"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock) -> i32 {
-                return foo(::aya_bpf::programs::SockContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 {
+                return foo(::aya_ebpf::programs::SockContext::new(ctx));
 
                 fn foo(ctx: SockContext) -> i32 {
                     0
@@ -91,8 +91,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/post_bind6"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock) -> i32 {
-                return foo(::aya_bpf::programs::SockContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 {
+                return foo(::aya_ebpf::programs::SockContext::new(ctx));
 
                 fn foo(ctx: SockContext) -> i32 {
                     0
@@ -116,8 +116,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/sock_create"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock) -> i32 {
-                return foo(::aya_bpf::programs::SockContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 {
+                return foo(::aya_ebpf::programs::SockContext::new(ctx));
 
                 fn foo(ctx: SockContext) -> i32 {
                     0
@@ -141,8 +141,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/sock_release"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock) -> i32 {
-                return foo(::aya_bpf::programs::SockContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock) -> i32 {
+                return foo(::aya_ebpf::programs::SockContext::new(ctx));
 
                 fn foo(ctx: SockContext) -> i32 {
                     0

+ 26 - 26
aya-bpf-macros/src/cgroup_sock_addr.rs → aya-ebpf-macros/src/cgroup_sock_addr.rs

@@ -37,8 +37,8 @@ impl CgroupSockAddr {
         Ok(quote! {
             #[no_mangle]
             #[link_section = #section_name]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return #fn_name(::aya_bpf::programs::SockAddrContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return #fn_name(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 #item
             }
@@ -67,8 +67,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/connect4"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return foo(::aya_bpf::programs::SockAddrContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return foo(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 fn foo(ctx: CgroupSockAddrContext) -> i32 {
                     0
@@ -93,8 +93,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/connect6"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return foo(::aya_bpf::programs::SockAddrContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return foo(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 fn foo(ctx: CgroupSockAddrContext) -> i32 {
                     0
@@ -119,8 +119,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/bind4"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return foo(::aya_bpf::programs::SockAddrContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return foo(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 fn foo(ctx: CgroupSockAddrContext) -> i32 {
                     0
@@ -145,8 +145,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/bind6"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return foo(::aya_bpf::programs::SockAddrContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return foo(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 fn foo(ctx: CgroupSockAddrContext) -> i32 {
                     0
@@ -171,8 +171,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/getpeername4"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return foo(::aya_bpf::programs::SockAddrContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return foo(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 fn foo(ctx: CgroupSockAddrContext) -> i32 {
                     0
@@ -197,8 +197,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/getpeername6"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return foo(::aya_bpf::programs::SockAddrContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return foo(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 fn foo(ctx: CgroupSockAddrContext) -> i32 {
                     0
@@ -223,8 +223,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/getsockname4"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return foo(::aya_bpf::programs::SockAddrContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return foo(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 fn foo(ctx: CgroupSockAddrContext) -> i32 {
                     0
@@ -249,8 +249,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/getsockname6"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return foo(::aya_bpf::programs::SockAddrContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return foo(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 fn foo(ctx: CgroupSockAddrContext) -> i32 {
                     0
@@ -275,8 +275,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/sendmsg4"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return foo(::aya_bpf::programs::SockAddrContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return foo(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 fn foo(ctx: CgroupSockAddrContext) -> i32 {
                     0
@@ -301,8 +301,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/sendmsg6"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return foo(::aya_bpf::programs::SockAddrContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return foo(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 fn foo(ctx: CgroupSockAddrContext) -> i32 {
                     0
@@ -327,8 +327,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/recvmsg4"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return foo(::aya_bpf::programs::SockAddrContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return foo(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 fn foo(ctx: CgroupSockAddrContext) -> i32 {
                     0
@@ -353,8 +353,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/recvmsg6"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sock_addr) -> i32 {
-                return foo(::aya_bpf::programs::SockAddrContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sock_addr) -> i32 {
+                return foo(::aya_ebpf::programs::SockAddrContext::new(ctx));
 
                 fn foo(ctx: CgroupSockAddrContext) -> i32 {
                     0

+ 6 - 6
aya-bpf-macros/src/cgroup_sockopt.rs → aya-ebpf-macros/src/cgroup_sockopt.rs

@@ -35,8 +35,8 @@ impl CgroupSockopt {
         Ok(quote! {
             #[no_mangle]
             #[link_section = #section_name]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::bpf_sockopt) -> i32 {
-                return #fn_name(::aya_bpf::programs::SockoptContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sockopt) -> i32 {
+                return #fn_name(::aya_ebpf::programs::SockoptContext::new(ctx));
 
                 #item
             }
@@ -65,8 +65,8 @@ mod tests {
         let expected = quote!(
             #[no_mangle]
             #[link_section = "cgroup/getsockopt"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sockopt) -> i32 {
-                return foo(::aya_bpf::programs::SockoptContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sockopt) -> i32 {
+                return foo(::aya_ebpf::programs::SockoptContext::new(ctx));
 
                 fn foo(ctx: SockoptContext) -> i32 {
                     0
@@ -91,8 +91,8 @@ mod tests {
         let expected = quote!(
             #[no_mangle]
             #[link_section = "cgroup/setsockopt"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sockopt) -> i32 {
-                return foo(::aya_bpf::programs::SockoptContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sockopt) -> i32 {
+                return foo(::aya_ebpf::programs::SockoptContext::new(ctx));
 
                 fn foo(ctx: SockoptContext) -> i32 {
                     0

+ 4 - 4
aya-bpf-macros/src/cgroup_sysctl.rs → aya-ebpf-macros/src/cgroup_sysctl.rs

@@ -23,8 +23,8 @@ impl CgroupSysctl {
         Ok(quote! {
             #[no_mangle]
             #[link_section = "cgroup/sysctl"]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::bpf_sysctl) -> i32 {
-                return #fn_name(::aya_bpf::programs::SysctlContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sysctl) -> i32 {
+                return #fn_name(::aya_ebpf::programs::SysctlContext::new(ctx));
 
                 #item
             }
@@ -53,8 +53,8 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "cgroup/sysctl"]
-            fn foo(ctx: *mut ::aya_bpf::bindings::bpf_sysctl) -> i32 {
-                return foo(::aya_bpf::programs::SysctlContext::new(ctx));
+            fn foo(ctx: *mut ::aya_ebpf::bindings::bpf_sysctl) -> i32 {
+                return foo(::aya_ebpf::programs::SysctlContext::new(ctx));
 
                 fn foo(ctx: SysctlContext) -> i32 {
                     0

+ 10 - 10
aya-bpf-macros/src/fentry.rs → aya-ebpf-macros/src/fentry.rs

@@ -40,7 +40,7 @@ impl FEntry {
             #[no_mangle]
             #[link_section = #section_name]
             #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 {
-                let _ = #fn_name(::aya_bpf::programs::FEntryContext::new(ctx));
+                let _ = #fn_name(::aya_ebpf::programs::FEntryContext::new(ctx));
                 return 0;
 
                 #item
@@ -60,7 +60,7 @@ mod tests {
         let prog = FEntry::parse(
             parse_quote! {},
             parse_quote! {
-                fn sys_clone(ctx: &mut aya_bpf::programs::FEntryContext) -> i32 {
+                fn sys_clone(ctx: &mut aya_ebpf::programs::FEntryContext) -> i32 {
                     0
                 }
             },
@@ -71,10 +71,10 @@ mod tests {
             #[no_mangle]
             #[link_section = "fentry"]
             fn sys_clone(ctx: *mut ::core::ffi::c_void) -> i32 {
-                let _ = sys_clone(::aya_bpf::programs::FEntryContext::new(ctx));
+                let _ = sys_clone(::aya_ebpf::programs::FEntryContext::new(ctx));
                 return 0;
 
-                fn sys_clone(ctx: &mut aya_bpf::programs::FEntryContext) -> i32 {
+                fn sys_clone(ctx: &mut aya_ebpf::programs::FEntryContext) -> i32 {
                     0
                 }
             }
@@ -89,7 +89,7 @@ mod tests {
                 function = "sys_clone"
             },
             parse_quote! {
-                fn sys_clone(ctx: &mut aya_bpf::programs::FEntryContext) -> i32 {
+                fn sys_clone(ctx: &mut aya_ebpf::programs::FEntryContext) -> i32 {
                     0
                 }
             },
@@ -100,10 +100,10 @@ mod tests {
             #[no_mangle]
             #[link_section = "fentry/sys_clone"]
             fn sys_clone(ctx: *mut ::core::ffi::c_void) -> i32 {
-                let _ = sys_clone(::aya_bpf::programs::FEntryContext::new(ctx));
+                let _ = sys_clone(::aya_ebpf::programs::FEntryContext::new(ctx));
                 return 0;
 
-                fn sys_clone(ctx: &mut aya_bpf::programs::FEntryContext) -> i32 {
+                fn sys_clone(ctx: &mut aya_ebpf::programs::FEntryContext) -> i32 {
                     0
                 }
             }
@@ -118,7 +118,7 @@ mod tests {
                 sleepable
             },
             parse_quote! {
-                fn sys_clone(ctx: &mut aya_bpf::programs::FEntryContext) -> i32 {
+                fn sys_clone(ctx: &mut aya_ebpf::programs::FEntryContext) -> i32 {
                     0
                 }
             },
@@ -129,10 +129,10 @@ mod tests {
             #[no_mangle]
             #[link_section = "fentry.s"]
             fn sys_clone(ctx: *mut ::core::ffi::c_void) -> i32 {
-                let _ = sys_clone(::aya_bpf::programs::FEntryContext::new(ctx));
+                let _ = sys_clone(::aya_ebpf::programs::FEntryContext::new(ctx));
                 return 0;
 
-                fn sys_clone(ctx: &mut aya_bpf::programs::FEntryContext) -> i32 {
+                fn sys_clone(ctx: &mut aya_ebpf::programs::FEntryContext) -> i32 {
                     0
                 }
             }

+ 4 - 4
aya-bpf-macros/src/fexit.rs → aya-ebpf-macros/src/fexit.rs

@@ -40,7 +40,7 @@ impl FExit {
             #[no_mangle]
             #[link_section = #section_name]
             #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 {
-                let _ = #fn_name(::aya_bpf::programs::FExitContext::new(ctx));
+                let _ = #fn_name(::aya_ebpf::programs::FExitContext::new(ctx));
                 return 0;
 
                 #item
@@ -71,7 +71,7 @@ mod tests {
             #[no_mangle]
             #[link_section = "fexit"]
             fn sys_clone(ctx: *mut ::core::ffi::c_void) -> i32 {
-                let _ = sys_clone(::aya_bpf::programs::FExitContext::new(ctx));
+                let _ = sys_clone(::aya_ebpf::programs::FExitContext::new(ctx));
                 return 0;
 
                 fn sys_clone(ctx: &mut FExitContext) -> i32 {
@@ -100,7 +100,7 @@ mod tests {
             #[no_mangle]
             #[link_section = "fexit/sys_clone"]
             fn sys_clone(ctx: *mut ::core::ffi::c_void) -> i32 {
-                let _ = sys_clone(::aya_bpf::programs::FExitContext::new(ctx));
+                let _ = sys_clone(::aya_ebpf::programs::FExitContext::new(ctx));
                 return 0;
 
                 fn sys_clone(ctx: &mut FExitContext) -> i32 {
@@ -129,7 +129,7 @@ mod tests {
             #[no_mangle]
             #[link_section = "fexit.s/sys_clone"]
             fn sys_clone(ctx: *mut ::core::ffi::c_void) -> i32 {
-                let _ = sys_clone(::aya_bpf::programs::FExitContext::new(ctx));
+                let _ = sys_clone(::aya_ebpf::programs::FExitContext::new(ctx));
                 return 0;
 
                 fn sys_clone(ctx: &mut FExitContext) -> i32 {

+ 5 - 5
aya-bpf-macros/src/kprobe.rs → aya-ebpf-macros/src/kprobe.rs

@@ -67,7 +67,7 @@ impl KProbe {
             #[no_mangle]
             #[link_section = #section_name]
             #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 {
-                let _ = #fn_name(::aya_bpf::programs::ProbeContext::new(ctx));
+                let _ = #fn_name(::aya_ebpf::programs::ProbeContext::new(ctx));
                 return 0;
 
                 #item
@@ -100,7 +100,7 @@ mod tests {
                 #[no_mangle]
                 #[link_section = "kprobe"]
                 fn foo(ctx: *mut ::core::ffi::c_void) -> u32 {
-                    let _ = foo(::aya_bpf::programs::ProbeContext::new(ctx));
+                    let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx));
                     return 0;
 
                     fn foo(ctx: ProbeContext) -> u32 {
@@ -132,7 +132,7 @@ mod tests {
                 #[no_mangle]
                 #[link_section = "kprobe/fib_lookup"]
                 fn foo(ctx: *mut ::core::ffi::c_void) -> u32 {
-                    let _ = foo(::aya_bpf::programs::ProbeContext::new(ctx));
+                    let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx));
                     return 0;
 
                     fn foo(ctx: ProbeContext) -> u32 {
@@ -165,7 +165,7 @@ mod tests {
                 #[no_mangle]
                 #[link_section = "kprobe/fib_lookup+10"]
                 fn foo(ctx: *mut ::core::ffi::c_void) -> u32 {
-                    let _ = foo(::aya_bpf::programs::ProbeContext::new(ctx));
+                    let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx));
                     return 0;
 
                     fn foo(ctx: ProbeContext) -> u32 {
@@ -195,7 +195,7 @@ mod tests {
                 #[no_mangle]
                 #[link_section = "kretprobe"]
                 fn foo(ctx: *mut ::core::ffi::c_void) -> u32 {
-                    let _ = foo(::aya_bpf::programs::ProbeContext::new(ctx));
+                    let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx));
                     return 0;
 
                     fn foo(ctx: ProbeContext) -> u32 {

+ 12 - 12
aya-bpf-macros/src/lib.rs → aya-ebpf-macros/src/lib.rs

@@ -142,7 +142,7 @@ pub fn sk_msg(attrs: TokenStream, item: TokenStream) -> TokenStream {
 /// # Examples
 ///
 /// ```no_run
-/// use aya_bpf::{bindings::xdp_action::XDP_PASS, macros::xdp, programs::XdpContext};
+/// use aya_ebpf::{bindings::xdp_action::XDP_PASS, macros::xdp, programs::XdpContext};
 ///
 /// #[xdp(frags)]
 /// pub fn xdp(ctx: XdpContext) -> u32 {
@@ -222,7 +222,7 @@ pub fn cgroup_skb(attrs: TokenStream, item: TokenStream) -> TokenStream {
 /// # Examples
 ///
 /// ```no_run
-/// use aya_bpf::{macros::cgroup_sock_addr, programs::SockAddrContext};
+/// use aya_ebpf::{macros::cgroup_sock_addr, programs::SockAddrContext};
 ///
 /// #[cgroup_sock_addr(connect4)]
 /// pub fn connect4(ctx: SockAddrContext) -> i32 {
@@ -300,7 +300,7 @@ pub fn perf_event(attrs: TokenStream, item: TokenStream) -> TokenStream {
 /// # Examples
 ///
 /// ```no_run
-/// use aya_bpf::{macros::raw_tracepoint, programs::RawTracePointContext};
+/// use aya_ebpf::{macros::raw_tracepoint, programs::RawTracePointContext};
 ///
 /// #[raw_tracepoint(tracepoint = "sys_enter")]
 /// pub fn sys_enter(ctx: RawTracePointContext) -> i32 {
@@ -347,7 +347,7 @@ pub fn raw_tracepoint(attrs: TokenStream, item: TokenStream) -> TokenStream {
 /// # Examples
 ///
 /// ```no_run
-/// use aya_bpf::{macros::lsm, programs::LsmContext};
+/// use aya_ebpf::{macros::lsm, programs::LsmContext};
 ///
 /// #[lsm(hook = "file_open")]
 /// pub fn file_open(ctx: LsmContext) -> i32 {
@@ -387,7 +387,7 @@ pub fn lsm(attrs: TokenStream, item: TokenStream) -> TokenStream {
 /// # Examples
 ///
 /// ```no_run
-/// use aya_bpf::{macros::btf_tracepoint, programs::BtfTracePointContext};
+/// use aya_ebpf::{macros::btf_tracepoint, programs::BtfTracePointContext};
 ///
 /// #[btf_tracepoint(function = "sched_process_fork")]
 /// pub fn sched_process_fork(ctx: BtfTracePointContext) -> u32 {
@@ -425,7 +425,7 @@ pub fn btf_tracepoint(attrs: TokenStream, item: TokenStream) -> TokenStream {
 /// # Examples
 ///
 /// ```no_run
-/// use aya_bpf::{macros::stream_parser, programs::SkBuffContext};
+/// use aya_ebpf::{macros::stream_parser, programs::SkBuffContext};
 ///
 ///
 ///#[stream_parser]
@@ -456,7 +456,7 @@ pub fn stream_parser(attrs: TokenStream, item: TokenStream) -> TokenStream {
 /// # Examples
 ///
 /// ```no_run
-/// use aya_bpf::{macros::stream_verdict, programs::SkBuffContext, bindings::sk_action};
+/// use aya_ebpf::{macros::stream_verdict, programs::SkBuffContext, bindings::sk_action};
 ///
 ///
 ///#[stream_verdict]
@@ -497,7 +497,7 @@ fn sk_skb(kind: SkSkbKind, attrs: TokenStream, item: TokenStream) -> TokenStream
 /// # Examples
 ///
 /// ```no_run
-/// use aya_bpf::{macros::socket_filter, programs::SkBuffContext};
+/// use aya_ebpf::{macros::socket_filter, programs::SkBuffContext};
 ///
 /// #[socket_filter]
 /// pub fn accept_all(_ctx: SkBuffContext) -> i64 {
@@ -529,7 +529,7 @@ pub fn socket_filter(attrs: TokenStream, item: TokenStream) -> TokenStream {
 ///
 /// ```no_run
 /// # #![allow(non_camel_case_types)]
-/// use aya_bpf::{macros::fentry, programs::FEntryContext};
+/// use aya_ebpf::{macros::fentry, programs::FEntryContext};
 /// # type filename = u32;
 /// # type path = u32;
 ///
@@ -574,7 +574,7 @@ pub fn fentry(attrs: TokenStream, item: TokenStream) -> TokenStream {
 ///
 /// ```no_run
 /// # #![allow(non_camel_case_types)]
-/// use aya_bpf::{macros::fexit, programs::FExitContext};
+/// use aya_ebpf::{macros::fexit, programs::FExitContext};
 /// # type filename = u32;
 /// # type path = u32;
 ///
@@ -615,7 +615,7 @@ pub fn fexit(attrs: TokenStream, item: TokenStream) -> TokenStream {
 /// # Examples
 ///
 /// ```no_run
-/// use aya_bpf::{macros::sk_lookup, programs::SkLookupContext};
+/// use aya_ebpf::{macros::sk_lookup, programs::SkLookupContext};
 ///
 /// #[sk_lookup]
 /// pub fn accept_all(_ctx: SkLookupContext) -> u32 {
@@ -645,7 +645,7 @@ pub fn sk_lookup(attrs: TokenStream, item: TokenStream) -> TokenStream {
 /// # Examples
 ///
 /// ```no_run
-/// use aya_bpf::{
+/// use aya_ebpf::{
 ///     macros::cgroup_device,
 ///     programs::DeviceContext,
 /// };

+ 7 - 7
aya-bpf-macros/src/lsm.rs → aya-ebpf-macros/src/lsm.rs

@@ -43,7 +43,7 @@ impl Lsm {
             #[no_mangle]
             #[link_section = #section_name]
             #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> i32 {
-                return #fn_name(::aya_bpf::programs::LsmContext::new(ctx));
+                return #fn_name(::aya_ebpf::programs::LsmContext::new(ctx));
 
                 #item
             }
@@ -65,7 +65,7 @@ mod tests {
                 hook = "bprm_committed_creds"
             },
             parse_quote! {
-                fn bprm_committed_creds(ctx: &mut ::aya_bpf::programs::LsmContext) -> i32 {
+                fn bprm_committed_creds(ctx: &mut ::aya_ebpf::programs::LsmContext) -> i32 {
                     0
                 }
             },
@@ -76,9 +76,9 @@ mod tests {
             #[no_mangle]
             #[link_section = "lsm.s/bprm_committed_creds"]
             fn bprm_committed_creds(ctx: *mut ::core::ffi::c_void) -> i32 {
-                return bprm_committed_creds(::aya_bpf::programs::LsmContext::new(ctx));
+                return bprm_committed_creds(::aya_ebpf::programs::LsmContext::new(ctx));
 
-                fn bprm_committed_creds(ctx: &mut ::aya_bpf::programs::LsmContext) -> i32 {
+                fn bprm_committed_creds(ctx: &mut ::aya_ebpf::programs::LsmContext) -> i32 {
                     0
                 }
             }
@@ -93,7 +93,7 @@ mod tests {
                 hook = "bprm_committed_creds"
             },
             parse_quote! {
-                fn bprm_committed_creds(ctx: &mut ::aya_bpf::programs::LsmContext) -> i32 {
+                fn bprm_committed_creds(ctx: &mut ::aya_ebpf::programs::LsmContext) -> i32 {
                     0
                 }
             },
@@ -104,9 +104,9 @@ mod tests {
             #[no_mangle]
             #[link_section = "lsm/bprm_committed_creds"]
             fn bprm_committed_creds(ctx: *mut ::core::ffi::c_void) -> i32 {
-                return bprm_committed_creds(::aya_bpf::programs::LsmContext::new(ctx));
+                return bprm_committed_creds(::aya_ebpf::programs::LsmContext::new(ctx));
 
-                fn bprm_committed_creds(ctx: &mut ::aya_bpf::programs::LsmContext) -> i32 {
+                fn bprm_committed_creds(ctx: &mut ::aya_ebpf::programs::LsmContext) -> i32 {
                     0
                 }
             }

+ 0 - 0
aya-bpf-macros/src/map.rs → aya-ebpf-macros/src/map.rs


+ 2 - 2
aya-bpf-macros/src/perf_event.rs → aya-ebpf-macros/src/perf_event.rs

@@ -24,7 +24,7 @@ impl PerfEvent {
             #[no_mangle]
             #[link_section = "perf_event"]
             #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 {
-               let _ = #fn_name(::aya_bpf::programs::PerfEventContext::new(ctx));
+               let _ = #fn_name(::aya_ebpf::programs::PerfEventContext::new(ctx));
                return 0;
 
                #item
@@ -55,7 +55,7 @@ mod tests {
             #[no_mangle]
             #[link_section = "perf_event"]
             fn foo(ctx: *mut ::core::ffi::c_void) -> u32 {
-               let _ = foo(::aya_bpf::programs::PerfEventContext::new(ctx));
+               let _ = foo(::aya_ebpf::programs::PerfEventContext::new(ctx));
                return 0;
 
                fn foo(ctx: PerfEventContext) -> i32 {

+ 4 - 4
aya-bpf-macros/src/raw_tracepoint.rs → aya-ebpf-macros/src/raw_tracepoint.rs

@@ -33,7 +33,7 @@ impl RawTracePoint {
             #[no_mangle]
             #[link_section = #section_name]
             #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 {
-                let _ = #fn_name(::aya_bpf::programs::RawTracePointContext::new(ctx));
+                let _ = #fn_name(::aya_ebpf::programs::RawTracePointContext::new(ctx));
                 return 0;
 
                 #item
@@ -53,7 +53,7 @@ mod tests {
         let prog = RawTracePoint::parse(
             parse_quote! { tracepoint = "sys_enter" },
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::RawTracePointContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::RawTracePointContext) -> i32 {
                     0
                 }
             },
@@ -64,10 +64,10 @@ mod tests {
             #[no_mangle]
             #[link_section = "raw_tp/sys_enter"]
             fn prog(ctx: *mut ::core::ffi::c_void) -> u32 {
-                let _ = prog(::aya_bpf::programs::RawTracePointContext::new(ctx));
+                let _ = prog(::aya_ebpf::programs::RawTracePointContext::new(ctx));
                 return 0;
 
-                fn prog(ctx: &mut ::aya_bpf::programs::RawTracePointContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::RawTracePointContext) -> i32 {
                     0
                 }
             }

+ 6 - 6
aya-bpf-macros/src/sk_lookup.rs → aya-ebpf-macros/src/sk_lookup.rs

@@ -23,8 +23,8 @@ impl SkLookup {
         Ok(quote! {
             #[no_mangle]
             #[link_section = "sk_lookup"]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::bpf_sk_lookup) -> u32 {
-                return #fn_name(::aya_bpf::programs::SkLookupContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sk_lookup) -> u32 {
+                return #fn_name(::aya_ebpf::programs::SkLookupContext::new(ctx));
 
                 #item
             }
@@ -43,7 +43,7 @@ mod tests {
         let prog = SkLookup::parse(
             parse_quote! {},
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::SkLookupContext) -> u32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::SkLookupContext) -> u32 {
                     0
                 }
             },
@@ -53,10 +53,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "sk_lookup"]
-            fn prog(ctx: *mut ::aya_bpf::bindings::bpf_sk_lookup) -> u32 {
-                return prog(::aya_bpf::programs::SkLookupContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings::bpf_sk_lookup) -> u32 {
+                return prog(::aya_ebpf::programs::SkLookupContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::SkLookupContext) -> u32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::SkLookupContext) -> u32 {
                     0
                 }
             }

+ 6 - 6
aya-bpf-macros/src/sk_msg.rs → aya-ebpf-macros/src/sk_msg.rs

@@ -23,8 +23,8 @@ impl SkMsg {
         Ok(quote! {
             #[no_mangle]
             #[link_section = "sk_msg"]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::sk_msg_md) -> u32 {
-                return #fn_name(::aya_bpf::programs::SkMsgContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::sk_msg_md) -> u32 {
+                return #fn_name(::aya_ebpf::programs::SkMsgContext::new(ctx));
 
                 #item
             }
@@ -43,7 +43,7 @@ mod tests {
         let prog = SkMsg::parse(
             parse_quote! {},
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::SkMsgContext) -> u32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::SkMsgContext) -> u32 {
                     0
                 }
             },
@@ -53,10 +53,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "sk_msg"]
-            fn prog(ctx: *mut ::aya_bpf::bindings:: sk_msg_md) -> u32 {
-                return prog(::aya_bpf::programs::SkMsgContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings:: sk_msg_md) -> u32 {
+                return prog(::aya_ebpf::programs::SkMsgContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::SkMsgContext) -> u32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::SkMsgContext) -> u32 {
                     0
                 }
             }

+ 10 - 10
aya-bpf-macros/src/sk_skb.rs → aya-ebpf-macros/src/sk_skb.rs

@@ -45,8 +45,8 @@ impl SkSkb {
         Ok(quote! {
             #[no_mangle]
             #[link_section = #section_name]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> u32 {
-                return #fn_name(::aya_bpf::programs::SkBuffContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> u32 {
+                return #fn_name(::aya_ebpf::programs::SkBuffContext::new(ctx));
 
                 #item
             }
@@ -66,7 +66,7 @@ mod tests {
             SkSkbKind::StreamParser,
             parse_quote! {},
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::SkBuffContext) -> u32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::SkBuffContext) -> u32 {
                     0
                 }
             },
@@ -76,10 +76,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "sk_skb/stream_parser"]
-            fn prog(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> u32 {
-                return prog(::aya_bpf::programs::SkBuffContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> u32 {
+                return prog(::aya_ebpf::programs::SkBuffContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::SkBuffContext) -> u32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::SkBuffContext) -> u32 {
                     0
                 }
             }
@@ -93,7 +93,7 @@ mod tests {
             SkSkbKind::StreamVerdict,
             parse_quote! {},
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::SkBuffContext) -> u32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::SkBuffContext) -> u32 {
                     0
                 }
             },
@@ -103,10 +103,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "sk_skb/stream_verdict"]
-            fn prog(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> u32 {
-                return prog(::aya_bpf::programs::SkBuffContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> u32 {
+                return prog(::aya_ebpf::programs::SkBuffContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::SkBuffContext) -> u32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::SkBuffContext) -> u32 {
                     0
                 }
             }

+ 6 - 6
aya-bpf-macros/src/sock_ops.rs → aya-ebpf-macros/src/sock_ops.rs

@@ -23,8 +23,8 @@ impl SockOps {
         Ok(quote! {
             #[no_mangle]
             #[link_section = "sockops"]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::bpf_sock_ops) -> u32 {
-                return #fn_name(::aya_bpf::programs::SockOpsContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::bpf_sock_ops) -> u32 {
+                return #fn_name(::aya_ebpf::programs::SockOpsContext::new(ctx));
 
                 #item
             }
@@ -43,7 +43,7 @@ mod tests {
         let prog = SockOps::parse(
             parse_quote! {},
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::SockOpsContext) -> u32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::SockOpsContext) -> u32 {
                     0
                 }
             },
@@ -53,10 +53,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "sockops"]
-            fn prog(ctx: *mut ::aya_bpf::bindings::bpf_sock_ops) -> u32 {
-                return prog(::aya_bpf::programs::SockOpsContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings::bpf_sock_ops) -> u32 {
+                return prog(::aya_ebpf::programs::SockOpsContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::SockOpsContext) -> u32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::SockOpsContext) -> u32 {
                     0
                 }
             }

+ 6 - 6
aya-bpf-macros/src/socket_filter.rs → aya-ebpf-macros/src/socket_filter.rs

@@ -23,8 +23,8 @@ impl SocketFilter {
         Ok(quote! {
             #[no_mangle]
             #[link_section = "socket"]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i64 {
-                return #fn_name(::aya_bpf::programs::SkBuffContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i64 {
+                return #fn_name(::aya_ebpf::programs::SkBuffContext::new(ctx));
 
                 #item
             }
@@ -43,7 +43,7 @@ mod tests {
         let prog = SocketFilter::parse(
             parse_quote! {},
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::SkBuffContext) -> i64 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::SkBuffContext) -> i64 {
                     0
                 }
             },
@@ -53,10 +53,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "socket"]
-            fn prog(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i64 {
-                return prog(::aya_bpf::programs::SkBuffContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i64 {
+                return prog(::aya_ebpf::programs::SkBuffContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::SkBuffContext) -> i64 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::SkBuffContext) -> i64 {
                     0
                 }
             }

+ 6 - 6
aya-bpf-macros/src/tc.rs → aya-ebpf-macros/src/tc.rs

@@ -23,8 +23,8 @@ impl SchedClassifier {
         Ok(quote! {
             #[no_mangle]
             #[link_section = "classifier"]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
-                return #fn_name(::aya_bpf::programs::TcContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
+                return #fn_name(::aya_ebpf::programs::TcContext::new(ctx));
 
                 #item
             }
@@ -43,7 +43,7 @@ mod tests {
         let prog = SchedClassifier::parse(
             parse_quote! {},
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::TcContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::TcContext) -> i32 {
                     0
                 }
             },
@@ -53,10 +53,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "classifier"]
-            fn prog(ctx: *mut ::aya_bpf::bindings::__sk_buff) -> i32 {
-                return prog(::aya_bpf::programs::TcContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings::__sk_buff) -> i32 {
+                return prog(::aya_ebpf::programs::TcContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::TcContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::TcContext) -> i32 {
                     0
                 }
             }

+ 4 - 4
aya-bpf-macros/src/tracepoint.rs → aya-ebpf-macros/src/tracepoint.rs

@@ -41,7 +41,7 @@ impl TracePoint {
             #[no_mangle]
             #[link_section = #section_name]
             #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 {
-               let _ = #fn_name(::aya_bpf::programs::TracePointContext::new(ctx));
+               let _ = #fn_name(::aya_ebpf::programs::TracePointContext::new(ctx));
                return 0;
 
                #item
@@ -61,7 +61,7 @@ mod tests {
         let prog = TracePoint::parse(
             parse_quote! { name = "sys_enter_bind", category = "syscalls" },
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::TracePointContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::TracePointContext) -> i32 {
                     0
                 }
             },
@@ -72,10 +72,10 @@ mod tests {
             #[no_mangle]
             #[link_section = "tracepoint/syscalls/sys_enter_bind"]
             fn prog(ctx: *mut ::core::ffi::c_void) -> u32 {
-               let _ = prog(::aya_bpf::programs::TracePointContext::new(ctx));
+               let _ = prog(::aya_ebpf::programs::TracePointContext::new(ctx));
                return 0;
 
-               fn prog(ctx: &mut ::aya_bpf::programs::TracePointContext) -> i32 {
+               fn prog(ctx: &mut ::aya_ebpf::programs::TracePointContext) -> i32 {
                     0
                 }
             }

+ 6 - 6
aya-bpf-macros/src/uprobe.rs → aya-ebpf-macros/src/uprobe.rs

@@ -93,7 +93,7 @@ impl UProbe {
             #[no_mangle]
             #[link_section = #section_name]
             #fn_vis fn #fn_name(ctx: *mut ::core::ffi::c_void) -> u32 {
-                let _ = #fn_name(::aya_bpf::programs::ProbeContext::new(ctx));
+                let _ = #fn_name(::aya_ebpf::programs::ProbeContext::new(ctx));
                 return 0;
 
                 #item
@@ -126,7 +126,7 @@ mod tests {
                 #[no_mangle]
                 #[link_section = "uprobe"]
                 fn foo(ctx: *mut ::core::ffi::c_void) -> u32 {
-                    let _ = foo(::aya_bpf::programs::ProbeContext::new(ctx));
+                    let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx));
                     return 0;
 
                     fn foo(ctx: ProbeContext) -> u32 {
@@ -156,7 +156,7 @@ mod tests {
                 #[no_mangle]
                 #[link_section = "uprobe.s"]
                 fn foo(ctx: *mut ::core::ffi::c_void) -> u32 {
-                    let _ = foo(::aya_bpf::programs::ProbeContext::new(ctx));
+                    let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx));
                     return 0;
 
                     fn foo(ctx: ProbeContext) -> u32 {
@@ -189,7 +189,7 @@ mod tests {
                 #[no_mangle]
                 #[link_section = "uprobe/self/proc/exe:trigger_uprobe"]
                 fn foo(ctx: *mut ::core::ffi::c_void) -> u32 {
-                    let _ = foo(::aya_bpf::programs::ProbeContext::new(ctx));
+                    let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx));
                     return 0;
 
                     fn foo(ctx: ProbeContext) -> u32 {
@@ -221,7 +221,7 @@ mod tests {
                 #[no_mangle]
                 #[link_section = "uprobe/self/proc/exe:foo+123"]
                 fn foo(ctx: *mut ::core::ffi::c_void) -> u32 {
-                    let _ = foo(::aya_bpf::programs::ProbeContext::new(ctx));
+                    let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx));
                     return 0;
 
                     fn foo(ctx: ProbeContext) -> u32 {
@@ -251,7 +251,7 @@ mod tests {
                 #[no_mangle]
                 #[link_section = "uretprobe"]
                 fn foo(ctx: *mut ::core::ffi::c_void) -> u32 {
-                    let _ = foo(::aya_bpf::programs::ProbeContext::new(ctx));
+                    let _ = foo(::aya_ebpf::programs::ProbeContext::new(ctx));
                     return 0;
 
                     fn foo(ctx: ProbeContext) -> u32 {

+ 27 - 27
aya-bpf-macros/src/xdp.rs → aya-ebpf-macros/src/xdp.rs

@@ -53,8 +53,8 @@ impl Xdp {
         Ok(quote! {
             #[no_mangle]
             #[link_section = #section_name]
-            #fn_vis fn #fn_name(ctx: *mut ::aya_bpf::bindings::xdp_md) -> u32 {
-                return #fn_name(::aya_bpf::programs::XdpContext::new(ctx));
+            #fn_vis fn #fn_name(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 {
+                return #fn_name(::aya_ebpf::programs::XdpContext::new(ctx));
 
                 #item
             }
@@ -73,7 +73,7 @@ mod tests {
         let prog = Xdp::parse(
             parse_quote! {},
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             },
@@ -83,10 +83,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "xdp"]
-            fn prog(ctx: *mut ::aya_bpf::bindings::xdp_md) -> u32 {
-                return prog(::aya_bpf::programs::XdpContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 {
+                return prog(::aya_ebpf::programs::XdpContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             }
@@ -99,7 +99,7 @@ mod tests {
         let prog = Xdp::parse(
             parse_quote! { frags },
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             },
@@ -109,10 +109,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "xdp.frags"]
-            fn prog(ctx: *mut ::aya_bpf::bindings::xdp_md) -> u32 {
-                return prog(::aya_bpf::programs::XdpContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 {
+                return prog(::aya_ebpf::programs::XdpContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             }
@@ -125,7 +125,7 @@ mod tests {
         let prog = Xdp::parse(
             parse_quote! { map = "cpumap" },
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             },
@@ -135,10 +135,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "xdp/cpumap"]
-            fn prog(ctx: *mut ::aya_bpf::bindings::xdp_md) -> u32 {
-                return prog(::aya_bpf::programs::XdpContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 {
+                return prog(::aya_ebpf::programs::XdpContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             }
@@ -151,7 +151,7 @@ mod tests {
         let prog = Xdp::parse(
             parse_quote! { map = "devmap" },
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             },
@@ -161,10 +161,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "xdp/devmap"]
-            fn prog(ctx: *mut ::aya_bpf::bindings::xdp_md) -> u32 {
-                return prog(::aya_bpf::programs::XdpContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 {
+                return prog(::aya_ebpf::programs::XdpContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             }
@@ -178,7 +178,7 @@ mod tests {
         Xdp::parse(
             parse_quote! { map = "badmap" },
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             },
@@ -191,7 +191,7 @@ mod tests {
         let prog = Xdp::parse(
             parse_quote! { frags, map = "cpumap" },
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             },
@@ -201,10 +201,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "xdp.frags/cpumap"]
-            fn prog(ctx: *mut ::aya_bpf::bindings::xdp_md) -> u32 {
-                return prog(::aya_bpf::programs::XdpContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 {
+                return prog(::aya_ebpf::programs::XdpContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             }
@@ -217,7 +217,7 @@ mod tests {
         let prog = Xdp::parse(
             parse_quote! { frags, map = "devmap" },
             parse_quote! {
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             },
@@ -227,10 +227,10 @@ mod tests {
         let expected = quote! {
             #[no_mangle]
             #[link_section = "xdp.frags/devmap"]
-            fn prog(ctx: *mut ::aya_bpf::bindings::xdp_md) -> u32 {
-                return prog(::aya_bpf::programs::XdpContext::new(ctx));
+            fn prog(ctx: *mut ::aya_ebpf::bindings::xdp_md) -> u32 {
+                return prog(::aya_ebpf::programs::XdpContext::new(ctx));
 
-                fn prog(ctx: &mut ::aya_bpf::programs::XdpContext) -> i32 {
+                fn prog(ctx: &mut ::aya_ebpf::programs::XdpContext) -> i32 {
                     0
                 }
             }

File diff suppressed because it is too large
+ 93 - 126
aya-log/CHANGELOG.md


+ 2 - 2
aya-log/README.md

@@ -33,12 +33,12 @@ to log eBPF messages to the terminal.
 ### User space code
 
 ```rust
-use aya_log::BpfLogger;
+use aya_log::EbpfLogger;
 
 env_logger::init();
 
 // Will log using the default logger, which is TermLogger in this case
-BpfLogger::init(&mut bpf).unwrap();
+EbpfLogger::init(&mut bpf).unwrap();
 ```
 
 ### eBPF code

+ 16 - 12
aya-log/src/lib.rs

@@ -3,7 +3,7 @@
 //! This is the user space side of the [Aya] logging framework. For the eBPF
 //! side, see the `aya-log-ebpf` crate.
 //!
-//! `aya-log` provides the [BpfLogger] type, which reads log records created by
+//! `aya-log` provides the [EbpfLogger] type, which reads log records created by
 //! `aya-log-ebpf` and logs them using the [log] crate. Any logger that
 //! implements the [Log] trait can be used with this crate.
 //!
@@ -12,14 +12,14 @@
 //! This example uses the [env_logger] crate to log messages to the terminal.
 //!
 //! ```no_run
-//! # let mut bpf = aya::Bpf::load(&[]).unwrap();
-//! use aya_log::BpfLogger;
+//! # let mut bpf = aya::Ebpf::load(&[]).unwrap();
+//! use aya_log::EbpfLogger;
 //!
 //! // initialize env_logger as the default logger
 //! env_logger::init();
 //!
 //! // start reading aya-log records and log them using the default logger
-//! BpfLogger::init(&mut bpf).unwrap();
+//! EbpfLogger::init(&mut bpf).unwrap();
 //! ```
 //!
 //! With the following eBPF code:
@@ -65,7 +65,7 @@ use aya::{
         MapError,
     },
     util::online_cpus,
-    Bpf, Pod,
+    Ebpf, Pod,
 };
 use aya_log_common::{
     Argument, DisplayHint, Level, LogValueLength, RecordField, LOG_BUF_CAPACITY, LOG_FIELDS,
@@ -93,21 +93,25 @@ unsafe impl Pod for DisplayHintWrapper {}
 /// Log messages generated by `aya_log_ebpf` using the [log] crate.
 ///
 /// For more details see the [module level documentation](crate).
-pub struct BpfLogger;
+pub struct EbpfLogger;
 
-impl BpfLogger {
+/// Log messages generated by `aya_log_ebpf` using the [log] crate.
+#[deprecated(since = "0.2.1", note = "Use `aya_log::EbpfLogger` instead")]
+pub type BpfLogger = EbpfLogger;
+
+impl EbpfLogger {
     /// Starts reading log records created with `aya-log-ebpf` and logs them
     /// with the default logger. See [log::logger].
-    pub fn init(bpf: &mut Bpf) -> Result<BpfLogger, Error> {
-        BpfLogger::init_with_logger(bpf, log::logger())
+    pub fn init(bpf: &mut Ebpf) -> Result<EbpfLogger, Error> {
+        EbpfLogger::init_with_logger(bpf, log::logger())
     }
 
     /// Starts reading log records created with `aya-log-ebpf` and logs them
     /// with the given logger.
     pub fn init_with_logger<T: Log + 'static>(
-        bpf: &mut Bpf,
+        bpf: &mut Ebpf,
         logger: T,
-    ) -> Result<BpfLogger, Error> {
+    ) -> Result<EbpfLogger, Error> {
         let logger = Arc::new(logger);
         let mut logs: AsyncPerfEventArray<_> = bpf
             .take_map(MAP_NAME)
@@ -131,7 +135,7 @@ impl BpfLogger {
             });
         }
 
-        Ok(BpfLogger {})
+        Ok(EbpfLogger {})
     }
 }
 

+ 3 - 3
aya-obj/src/btf/btf.rs

@@ -235,14 +235,14 @@ impl BtfFeatures {
     }
 }
 
-/// Bpf Type Format metadata.
+/// BPF Type Format metadata.
 ///
 /// BTF is a kind of debug metadata that allows eBPF programs compiled against one kernel version
 /// to be loaded into different kernel versions.
 ///
-/// Aya automatically loads BTF metadata if you use `Bpf::load_file`. You
+/// Aya automatically loads BTF metadata if you use `Ebpf::load_file`. You
 /// only need to explicitly use this type if you want to load BTF from a non-standard
-/// location or if you are using `Bpf::load`.
+/// location or if you are using `Ebpf::load`.
 #[derive(Clone, Debug)]
 pub struct Btf {
     header: btf_header,

+ 4 - 4
aya-obj/src/maps.rs

@@ -5,7 +5,7 @@ use core::mem;
 
 #[cfg(not(feature = "std"))]
 use crate::std;
-use crate::BpfSectionKind;
+use crate::EbpfSectionKind;
 
 /// Invalid map type encontered
 pub struct InvalidMapTypeError {
@@ -240,10 +240,10 @@ impl Map {
     }
 
     /// Returns the section kind.
-    pub fn section_kind(&self) -> BpfSectionKind {
+    pub fn section_kind(&self) -> EbpfSectionKind {
         match self {
             Map::Legacy(m) => m.section_kind,
-            Map::Btf(_) => BpfSectionKind::BtfMaps,
+            Map::Btf(_) => EbpfSectionKind::BtfMaps,
         }
     }
 
@@ -270,7 +270,7 @@ pub struct LegacyMap {
     /// The section index
     pub section_index: usize,
     /// The section kind
-    pub section_kind: BpfSectionKind,
+    pub section_kind: EbpfSectionKind,
     /// The symbol index.
     ///
     /// This is None for data maps (.bss .data and .rodata).  We don't need

+ 83 - 78
aya-obj/src/obj.rs

@@ -820,15 +820,15 @@ impl Object {
         self.section_infos
             .insert(section.name.to_owned(), (section.index, section.size));
         match section.kind {
-            BpfSectionKind::Data | BpfSectionKind::Rodata | BpfSectionKind::Bss => {
+            EbpfSectionKind::Data | EbpfSectionKind::Rodata | EbpfSectionKind::Bss => {
                 self.maps
                     .insert(section.name.to_string(), parse_data_map_section(&section)?);
             }
-            BpfSectionKind::Text => self.parse_text_section(section)?,
-            BpfSectionKind::Btf => self.parse_btf(&section)?,
-            BpfSectionKind::BtfExt => self.parse_btf_ext(&section)?,
-            BpfSectionKind::BtfMaps => self.parse_btf_maps(&section)?,
-            BpfSectionKind::Maps => {
+            EbpfSectionKind::Text => self.parse_text_section(section)?,
+            EbpfSectionKind::Btf => self.parse_btf(&section)?,
+            EbpfSectionKind::BtfExt => self.parse_btf_ext(&section)?,
+            EbpfSectionKind::BtfMaps => self.parse_btf_maps(&section)?,
+            EbpfSectionKind::Maps => {
                 // take out self.maps so we can borrow the iterator below
                 // without cloning or collecting
                 let mut maps = mem::take(&mut self.maps);
@@ -850,7 +850,7 @@ impl Object {
 
                 res?
             }
-            BpfSectionKind::Program => {
+            EbpfSectionKind::Program => {
                 self.parse_programs(&section)?;
                 if !section.relocations.is_empty() {
                     self.relocations.insert(
@@ -863,7 +863,7 @@ impl Object {
                     );
                 }
             }
-            BpfSectionKind::Undefined | BpfSectionKind::License | BpfSectionKind::Version => {}
+            EbpfSectionKind::Undefined | EbpfSectionKind::License | EbpfSectionKind::Version => {}
         }
 
         Ok(())
@@ -989,7 +989,7 @@ pub enum ParseError {
 
 /// The kind of an ELF section.
 #[derive(Debug, Copy, Clone, Eq, PartialEq)]
-pub enum BpfSectionKind {
+pub enum EbpfSectionKind {
     /// Undefined
     Undefined,
     /// `maps`
@@ -1016,30 +1016,30 @@ pub enum BpfSectionKind {
     Version,
 }
 
-impl BpfSectionKind {
-    fn from_name(name: &str) -> BpfSectionKind {
+impl EbpfSectionKind {
+    fn from_name(name: &str) -> EbpfSectionKind {
         if name.starts_with("license") {
-            BpfSectionKind::License
+            EbpfSectionKind::License
         } else if name.starts_with("version") {
-            BpfSectionKind::Version
+            EbpfSectionKind::Version
         } else if name.starts_with("maps") {
-            BpfSectionKind::Maps
+            EbpfSectionKind::Maps
         } else if name.starts_with(".maps") {
-            BpfSectionKind::BtfMaps
+            EbpfSectionKind::BtfMaps
         } else if name.starts_with(".text") {
-            BpfSectionKind::Text
+            EbpfSectionKind::Text
         } else if name.starts_with(".bss") {
-            BpfSectionKind::Bss
+            EbpfSectionKind::Bss
         } else if name.starts_with(".data") {
-            BpfSectionKind::Data
+            EbpfSectionKind::Data
         } else if name.starts_with(".rodata") {
-            BpfSectionKind::Rodata
+            EbpfSectionKind::Rodata
         } else if name == ".BTF" {
-            BpfSectionKind::Btf
+            EbpfSectionKind::Btf
         } else if name == ".BTF.ext" {
-            BpfSectionKind::BtfExt
+            EbpfSectionKind::BtfExt
         } else {
-            BpfSectionKind::Undefined
+            EbpfSectionKind::Undefined
         }
     }
 }
@@ -1047,7 +1047,7 @@ impl BpfSectionKind {
 #[derive(Debug)]
 struct Section<'a> {
     index: SectionIndex,
-    kind: BpfSectionKind,
+    kind: EbpfSectionKind,
     address: u64,
     name: &'a str,
     data: &'a [u8],
@@ -1065,12 +1065,12 @@ impl<'data, 'file, 'a> TryFrom<&'a ObjSection<'data, 'file>> for Section<'a> {
             error,
         };
         let name = section.name().map_err(map_err)?;
-        let kind = match BpfSectionKind::from_name(name) {
-            BpfSectionKind::Undefined => {
+        let kind = match EbpfSectionKind::from_name(name) {
+            EbpfSectionKind::Undefined => {
                 if section.kind() == SectionKind::Text && section.size() > 0 {
-                    BpfSectionKind::Program
+                    EbpfSectionKind::Program
                 } else {
-                    BpfSectionKind::Undefined
+                    EbpfSectionKind::Undefined
                 }
             }
             k => k,
@@ -1168,7 +1168,7 @@ fn get_map_field(btf: &Btf, type_id: u32) -> Result<u32, BtfError> {
 // bytes and are relocated based on their section index.
 fn parse_data_map_section(section: &Section) -> Result<Map, ParseError> {
     let (def, data) = match section.kind {
-        BpfSectionKind::Bss | BpfSectionKind::Data | BpfSectionKind::Rodata => {
+        EbpfSectionKind::Bss | EbpfSectionKind::Data | EbpfSectionKind::Rodata => {
             let def = bpf_map_def {
                 map_type: BPF_MAP_TYPE_ARRAY as u32,
                 key_size: mem::size_of::<u32>() as u32,
@@ -1176,7 +1176,7 @@ fn parse_data_map_section(section: &Section) -> Result<Map, ParseError> {
                 // .bss will always have data.len() == 0
                 value_size: section.size as u32,
                 max_entries: 1,
-                map_flags: if section.kind == BpfSectionKind::Rodata {
+                map_flags: if section.kind == EbpfSectionKind::Rodata {
                     BPF_F_RDONLY_PROG
                 } else {
                     0
@@ -1327,7 +1327,7 @@ pub fn parse_map_info(info: bpf_map_info, pinned: PinningType) -> Map {
             },
             section_index: 0,
             symbol_index: None,
-            section_kind: BpfSectionKind::Undefined,
+            section_kind: EbpfSectionKind::Undefined,
             data: Vec::new(),
         })
     }
@@ -1400,7 +1400,7 @@ mod tests {
     const FAKE_INS_LEN: u64 = 8;
 
     fn fake_section<'a>(
-        kind: BpfSectionKind,
+        kind: EbpfSectionKind,
         name: &'a str,
         data: &'a [u8],
         index: Option<usize>,
@@ -1563,7 +1563,7 @@ mod tests {
         assert_matches!(
             parse_data_map_section(
                 &fake_section(
-                    BpfSectionKind::Data,
+                    EbpfSectionKind::Data,
                     ".bss",
                     map_data,
                     None,
@@ -1571,7 +1571,7 @@ mod tests {
             ),
             Ok(Map::Legacy(LegacyMap {
                 section_index: 0,
-                section_kind: BpfSectionKind::Data,
+                section_kind: EbpfSectionKind::Data,
                 symbol_index: None,
                 def: bpf_map_def {
                     map_type: _map_type,
@@ -1595,7 +1595,7 @@ mod tests {
     fn sanitizes_empty_btf_files_to_none() {
         let mut obj = fake_obj();
         obj.parse_section(fake_section(
-            BpfSectionKind::Btf,
+            EbpfSectionKind::Btf,
             ".BTF",
             &[
                 159, 235, 1, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
@@ -1604,7 +1604,7 @@ mod tests {
         ))
         .unwrap();
         obj.parse_section(fake_section(
-            BpfSectionKind::BtfExt,
+            EbpfSectionKind::BtfExt,
             ".BTF.ext",
             &[
                 159, 235, 1, 0, 24, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 8, 0,
@@ -1624,7 +1624,7 @@ mod tests {
         fake_sym(&mut obj, 0, 0, "foo", 1);
         assert_matches!(
             obj.parse_programs(&fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "kprobe/foo",
                 &42u32.to_ne_bytes(),
                 None,
@@ -1639,7 +1639,7 @@ mod tests {
         fake_sym(&mut obj, 0, 0, "foo", FAKE_INS_LEN);
 
         obj.parse_programs(&fake_section(
-            BpfSectionKind::Program,
+            EbpfSectionKind::Program,
             "kprobe/foo",
             bytes_of(&fake_ins()),
             None,
@@ -1673,7 +1673,7 @@ mod tests {
         fake_sym(&mut obj, 0, 0, "foo", mem::size_of::<bpf_map_def>() as u64);
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Maps,
+                EbpfSectionKind::Maps,
                 "maps/foo",
                 bytes_of(&bpf_map_def {
                     map_type: 1,
@@ -1699,8 +1699,13 @@ mod tests {
         let insns = [fake_ins(), fake_ins()];
         let data = bytes_of(&insns);
 
-        obj.parse_programs(&fake_section(BpfSectionKind::Program, "kprobe", data, None))
-            .unwrap();
+        obj.parse_programs(&fake_section(
+            EbpfSectionKind::Program,
+            "kprobe",
+            data,
+            None,
+        ))
+        .unwrap();
 
         let prog_foo = obj.programs.get("foo").unwrap();
         let function_foo = obj.functions.get(&prog_foo.function_key()).unwrap();
@@ -1767,7 +1772,7 @@ mod tests {
         buf.extend(&map_data);
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Maps,
+                EbpfSectionKind::Maps,
                 "maps",
                 buf.as_slice(),
                 None
@@ -1789,7 +1794,7 @@ mod tests {
         let mut obj = fake_obj();
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Data,
+                EbpfSectionKind::Data,
                 ".bss",
                 b"map data",
                 None
@@ -1800,7 +1805,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Data,
+                EbpfSectionKind::Data,
                 ".rodata",
                 b"map data",
                 None
@@ -1811,7 +1816,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Data,
+                EbpfSectionKind::Data,
                 ".rodata.boo",
                 b"map data",
                 None
@@ -1822,7 +1827,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Data,
+                EbpfSectionKind::Data,
                 ".data",
                 b"map data",
                 None
@@ -1833,7 +1838,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Data,
+                EbpfSectionKind::Data,
                 ".data.boo",
                 b"map data",
                 None
@@ -1850,7 +1855,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "kprobe/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -1873,7 +1878,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "uprobe/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -1896,7 +1901,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "uprobe.s/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -1922,7 +1927,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "uretprobe/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -1945,7 +1950,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "uretprobe.s/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -1972,7 +1977,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "tracepoint/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -1989,7 +1994,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "tp/foo/bar",
                 bytes_of(&fake_ins()),
                 Some(1),
@@ -2012,7 +2017,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "socket/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2035,7 +2040,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "xdp",
                 bytes_of(&fake_ins()),
                 None
@@ -2058,7 +2063,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "xdp.frags",
                 bytes_of(&fake_ins()),
                 None
@@ -2082,7 +2087,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "raw_tp/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2099,7 +2104,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "raw_tracepoint/bar",
                 bytes_of(&fake_ins()),
                 Some(1)
@@ -2122,7 +2127,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "lsm/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2148,7 +2153,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "lsm.s/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2174,7 +2179,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "tp_btf/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2197,7 +2202,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "sk_skb/stream_parser",
                 bytes_of(&fake_ins()),
                 None
@@ -2220,7 +2225,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "sk_skb/stream_parser/my_parser",
                 bytes_of(&fake_ins()),
                 None
@@ -2243,7 +2248,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "fentry/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2266,7 +2271,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "fentry.s/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2292,7 +2297,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "fexit/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2315,7 +2320,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "fexit.s/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2341,7 +2346,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "cgroup_skb/ingress",
                 bytes_of(&fake_ins()),
                 None
@@ -2364,7 +2369,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "cgroup_skb/ingress/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2387,7 +2392,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "cgroup/skb",
                 bytes_of(&fake_ins()),
                 None
@@ -2410,7 +2415,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "cgroup/skb/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2433,7 +2438,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "cgroup/connect4/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2459,7 +2464,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "cgroup/connect4",
                 bytes_of(&fake_ins()),
                 None
@@ -2485,7 +2490,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "cgroup/getsockopt/foo",
                 bytes_of(&fake_ins()),
                 None
@@ -2511,7 +2516,7 @@ mod tests {
 
         assert_matches!(
             obj.parse_section(fake_section(
-                BpfSectionKind::Program,
+                EbpfSectionKind::Program,
                 "cgroup/getsockopt",
                 bytes_of(&fake_ins()),
                 None
@@ -2546,7 +2551,7 @@ mod tests {
                     pinning: PinningType::None,
                 },
                 section_index: 1,
-                section_kind: BpfSectionKind::Rodata,
+                section_kind: EbpfSectionKind::Rodata,
                 symbol_index: Some(1),
                 data: vec![0, 0, 0],
             }),
@@ -2656,10 +2661,10 @@ mod tests {
             0x2E, 0x6D, 0x61, 0x70, 0x73, 0x00, 0x6C, 0x69, 0x63, 0x65, 0x6E, 0x73, 0x65, 0x00,
         ];
 
-        let btf_section = fake_section(BpfSectionKind::Btf, ".BTF", data, None);
+        let btf_section = fake_section(EbpfSectionKind::Btf, ".BTF", data, None);
         obj.parse_section(btf_section).unwrap();
 
-        let map_section = fake_section(BpfSectionKind::BtfMaps, ".maps", &[], None);
+        let map_section = fake_section(EbpfSectionKind::BtfMaps, ".maps", &[], None);
         obj.parse_section(map_section).unwrap();
 
         let map = obj.maps.get("map_1").unwrap();

+ 14 - 12
aya-obj/src/relocation.rs

@@ -16,7 +16,7 @@ use crate::{
     maps::Map,
     obj::{Function, Object},
     util::{HashMap, HashSet},
-    BpfSectionKind,
+    EbpfSectionKind,
 };
 
 pub(crate) const INS_SIZE: usize = mem::size_of::<bpf_insn>();
@@ -24,7 +24,7 @@ pub(crate) const INS_SIZE: usize = mem::size_of::<bpf_insn>();
 /// The error type returned by [`Object::relocate_maps`] and [`Object::relocate_calls`]
 #[derive(thiserror::Error, Debug)]
 #[error("error relocating `{function}`")]
-pub struct BpfRelocationError {
+pub struct EbpfRelocationError {
     /// The function name
     function: String,
     #[source]
@@ -108,7 +108,7 @@ impl Object {
         &mut self,
         maps: I,
         text_sections: &HashSet<usize>,
-    ) -> Result<(), BpfRelocationError> {
+    ) -> Result<(), EbpfRelocationError> {
         let mut maps_by_section = HashMap::new();
         let mut maps_by_symbol = HashMap::new();
         for (name, fd, map) in maps {
@@ -128,7 +128,7 @@ impl Object {
                     &self.symbol_table,
                     text_sections,
                 )
-                .map_err(|error| BpfRelocationError {
+                .map_err(|error| EbpfRelocationError {
                     function: function.name.clone(),
                     error,
                 })?;
@@ -142,7 +142,7 @@ impl Object {
     pub fn relocate_calls(
         &mut self,
         text_sections: &HashSet<usize>,
-    ) -> Result<(), BpfRelocationError> {
+    ) -> Result<(), EbpfRelocationError> {
         for (name, program) in self.programs.iter() {
             let linker = FunctionLinker::new(
                 &self.functions,
@@ -154,7 +154,7 @@ impl Object {
             let func_orig =
                 self.functions
                     .get(&program.function_key())
-                    .ok_or_else(|| BpfRelocationError {
+                    .ok_or_else(|| EbpfRelocationError {
                         function: name.clone(),
                         error: RelocationError::UnknownProgram {
                             section_index: program.section_index,
@@ -162,10 +162,12 @@ impl Object {
                         },
                     })?;
 
-            let func = linker.link(func_orig).map_err(|error| BpfRelocationError {
-                function: name.to_owned(),
-                error,
-            })?;
+            let func = linker
+                .link(func_orig)
+                .map_err(|error| EbpfRelocationError {
+                    function: name.to_owned(),
+                    error,
+                })?;
 
             self.functions.insert(program.function_key(), func);
         }
@@ -250,7 +252,7 @@ fn relocate_maps<'a, I: Iterator<Item = &'a Relocation>>(
             debug_assert_eq!(map.symbol_index(), None);
             debug_assert!(matches!(
                 map.section_kind(),
-                BpfSectionKind::Bss | BpfSectionKind::Data | BpfSectionKind::Rodata
+                EbpfSectionKind::Bss | EbpfSectionKind::Data | EbpfSectionKind::Rodata
             ));
             m
         };
@@ -520,7 +522,7 @@ mod test {
         Map::Legacy(LegacyMap {
             def: Default::default(),
             section_index: 0,
-            section_kind: BpfSectionKind::Undefined,
+            section_kind: EbpfSectionKind::Undefined,
             symbol_index: Some(symbol_index),
             data: Vec::new(),
         })

+ 1 - 1
aya-tool/src/bindgen.rs

@@ -14,7 +14,7 @@ pub fn user_builder() -> Builder {
 pub fn bpf_builder() -> Builder {
     bindgen::builder()
         .use_core()
-        .ctypes_prefix("::aya_bpf::cty")
+        .ctypes_prefix("::aya_ebpf::cty")
         .layout_tests(false)
         .generate_comments(false)
         .clang_arg("-Wno-unknown-attributes")

+ 1 - 1
aya/CHANGELOG.md

@@ -2032,7 +2032,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
     - Don't error out parsing padded map sections ([`b657930`](https://github.com/aya-rs/aya/commit/b657930a3ee61f88ada0630afdac6b1c77459244))
     - Added support for armv7-unknown-linux-gnueabi and armv7-unknown-linux-gnueabihf ([`8311abf`](https://github.com/aya-rs/aya/commit/8311abfdcbbe70da6abdd67b78b831d53998aad5))
     - Tc: make qdisc_add_clsact return io::Error ([`9c8e78b`](https://github.com/aya-rs/aya/commit/9c8e78b7d4192b376ec2e532d9ddcf81c3c5182e))
-    - Aya, aya-bpf-bindings: regenerate bindings ([`122a530`](https://github.com/aya-rs/aya/commit/122a5306e72c7560629bcef160e7f676b84eabd7))
+    - Aya, aya-ebpf-bindings: regenerate bindings ([`122a530`](https://github.com/aya-rs/aya/commit/122a5306e72c7560629bcef160e7f676b84eabd7))
     - Kprobe: remove pid argument ([`08c71df`](https://github.com/aya-rs/aya/commit/08c71dfeb19b2b4358d75baf5b95f8d4e6521935))
     - Add missing load() in kprobe example ([`bb15e82`](https://github.com/aya-rs/aya/commit/bb15e82c1d8373700dda52f69d6c4bf6f5489a03))
     - Support both bpf_map_def layout variants ([`d8d3117`](https://github.com/aya-rs/aya/commit/d8d311738c974f3b6fad22006ab2b827d0925ce8))

+ 3 - 3
aya/README.md

@@ -73,14 +73,14 @@ use a `BPF_PROG_TYPE_CGROUP_SKB` program with aya:
 
 ```rust
 use std::fs::File;
-use aya::Bpf;
+use aya::Ebpf;
 use aya::programs::{CgroupSkb, CgroupSkbAttachType};
 
 // load the BPF code
-let mut bpf = Bpf::load_file("bpf.o")?;
+let mut ebpf = Ebpf::load_file("bpf.o")?;
 
 // get the `ingress_filter` program compiled into `bpf.o`.
-let ingress: &mut CgroupSkb = bpf.program_mut("ingress_filter")?.try_into()?;
+let ingress: &mut CgroupSkb = ebpf.program_mut("ingress_filter")?.try_into()?;
 
 // load the program into the kernel
 ingress.load()?;

+ 102 - 90
aya/src/bpf.rs

@@ -13,8 +13,8 @@ use std::{
 use aya_obj::{
     btf::{BtfFeatures, BtfRelocationError},
     generated::{BPF_F_SLEEPABLE, BPF_F_XDP_HAS_FRAGS},
-    relocation::BpfRelocationError,
-    BpfSectionKind, Features,
+    relocation::EbpfRelocationError,
+    EbpfSectionKind, Features,
 };
 use log::{debug, warn};
 use thiserror::Error;
@@ -110,26 +110,26 @@ pub fn features() -> &'static Features {
 /// Builder style API for advanced loading of eBPF programs.
 ///
 /// Loading eBPF code involves a few steps, including loading maps and applying
-/// relocations. You can use `BpfLoader` to customize some of the loading
+/// relocations. You can use `EbpfLoader` to customize some of the loading
 /// options.
 ///
 /// # Examples
 ///
 /// ```no_run
-/// use aya::{BpfLoader, Btf};
+/// use aya::{EbpfLoader, Btf};
 /// use std::fs;
 ///
-/// let bpf = BpfLoader::new()
+/// let bpf = EbpfLoader::new()
 ///     // load the BTF data from /sys/kernel/btf/vmlinux
 ///     .btf(Btf::from_sys_fs().ok().as_ref())
 ///     // load pinned maps from /sys/fs/bpf/my-program
 ///     .map_pin_path("/sys/fs/bpf/my-program")
 ///     // finally load the code
 ///     .load_file("file.o")?;
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 #[derive(Debug)]
-pub struct BpfLoader<'a> {
+pub struct EbpfLoader<'a> {
     btf: Option<Cow<'a, Btf>>,
     map_pin_path: Option<PathBuf>,
     globals: HashMap<&'a str, (&'a [u8], bool)>,
@@ -139,8 +139,12 @@ pub struct BpfLoader<'a> {
     allow_unsupported_maps: bool,
 }
 
+/// Builder style API for advanced loading of eBPF programs.
+#[deprecated(since = "0.13.0", note = "use `EbpfLoader` instead")]
+pub type BpfLoader<'a> = EbpfLoader<'a>;
+
 bitflags::bitflags! {
-    /// Used to set the verifier log level flags in [BpfLoader](BpfLoader::verifier_log_level()).
+    /// Used to set the verifier log level flags in [EbpfLoader](EbpfLoader::verifier_log_level()).
     #[derive(Clone, Copy, Debug)]
     pub struct VerifierLogLevel: u32 {
         /// Sets no verifier logging.
@@ -160,7 +164,7 @@ impl Default for VerifierLogLevel {
     }
 }
 
-impl<'a> BpfLoader<'a> {
+impl<'a> EbpfLoader<'a> {
     /// Creates a new loader instance.
     pub fn new() -> Self {
         Self {
@@ -182,16 +186,16 @@ impl<'a> BpfLoader<'a> {
     /// # Example
     ///
     /// ```no_run
-    /// use aya::{BpfLoader, Btf, Endianness};
+    /// use aya::{EbpfLoader, Btf, Endianness};
     ///
-    /// let bpf = BpfLoader::new()
+    /// let bpf = EbpfLoader::new()
     ///     // load the BTF data from a custom location
     ///     .btf(Btf::parse_file("/custom_btf_file", Endianness::default()).ok().as_ref())
     ///     .load_file("file.o")?;
     ///
-    /// # Ok::<(), aya::BpfError>(())
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
-    pub fn btf(&mut self, btf: Option<&'a Btf>) -> &mut BpfLoader<'a> {
+    pub fn btf(&mut self, btf: Option<&'a Btf>) -> &mut EbpfLoader<'a> {
         self.btf = btf.map(Cow::Borrowed);
         self
     }
@@ -207,15 +211,15 @@ impl<'a> BpfLoader<'a> {
     /// # Example
     ///
     /// ```no_run
-    /// use aya::BpfLoader;
+    /// use aya::EbpfLoader;
     ///
-    /// let bpf = BpfLoader::new()
+    /// let bpf = EbpfLoader::new()
     ///     .allow_unsupported_maps()
     ///     .load_file("file.o")?;
-    /// # Ok::<(), aya::BpfError>(())
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
     ///
-    pub fn allow_unsupported_maps(&mut self) -> &mut BpfLoader<'a> {
+    pub fn allow_unsupported_maps(&mut self) -> &mut EbpfLoader<'a> {
         self.allow_unsupported_maps = true;
         self
     }
@@ -228,22 +232,22 @@ impl<'a> BpfLoader<'a> {
     /// # Example
     ///
     /// ```no_run
-    /// use aya::BpfLoader;
+    /// use aya::EbpfLoader;
     ///
-    /// let bpf = BpfLoader::new()
+    /// let bpf = EbpfLoader::new()
     ///     .map_pin_path("/sys/fs/bpf/my-program")
     ///     .load_file("file.o")?;
-    /// # Ok::<(), aya::BpfError>(())
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
     ///
-    pub fn map_pin_path<P: AsRef<Path>>(&mut self, path: P) -> &mut BpfLoader<'a> {
+    pub fn map_pin_path<P: AsRef<Path>>(&mut self, path: P) -> &mut EbpfLoader<'a> {
         self.map_pin_path = Some(path.as_ref().to_owned());
         self
     }
 
     /// Sets the value of a global variable.
     ///
-    /// If the `must_exist` argument is `true`, [`BpfLoader::load`] will fail with [`ParseError::SymbolNotFound`] if the loaded object code does not contain the variable.
+    /// If the `must_exist` argument is `true`, [`EbpfLoader::load`] will fail with [`ParseError::SymbolNotFound`] if the loaded object code does not contain the variable.
     ///
     /// From Rust eBPF, a global variable can be defined as follows:
     ///
@@ -271,13 +275,13 @@ impl<'a> BpfLoader<'a> {
     /// # Example
     ///
     /// ```no_run
-    /// use aya::BpfLoader;
+    /// use aya::EbpfLoader;
     ///
-    /// let bpf = BpfLoader::new()
+    /// let bpf = EbpfLoader::new()
     ///     .set_global("VERSION", &2, true)
     ///     .set_global("PIDS", &[1234u16, 5678], true)
     ///     .load_file("file.o")?;
-    /// # Ok::<(), aya::BpfError>(())
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
     ///
     pub fn set_global<T: Into<GlobalData<'a>>>(
@@ -285,7 +289,7 @@ impl<'a> BpfLoader<'a> {
         name: &'a str,
         value: T,
         must_exist: bool,
-    ) -> &mut BpfLoader<'a> {
+    ) -> &mut EbpfLoader<'a> {
         self.globals.insert(name, (value.into().bytes, must_exist));
         self
     }
@@ -298,15 +302,15 @@ impl<'a> BpfLoader<'a> {
     /// # Example
     ///
     /// ```no_run
-    /// use aya::BpfLoader;
+    /// use aya::EbpfLoader;
     ///
-    /// let bpf = BpfLoader::new()
+    /// let bpf = EbpfLoader::new()
     ///     .set_max_entries("map", 64)
     ///     .load_file("file.o")?;
-    /// # Ok::<(), aya::BpfError>(())
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
     ///
-    pub fn set_max_entries(&mut self, name: &'a str, size: u32) -> &mut BpfLoader<'a> {
+    pub fn set_max_entries(&mut self, name: &'a str, size: u32) -> &mut EbpfLoader<'a> {
         self.max_entries.insert(name, size);
         self
     }
@@ -320,15 +324,15 @@ impl<'a> BpfLoader<'a> {
     /// # Example
     ///
     /// ```no_run
-    /// use aya::BpfLoader;
+    /// use aya::EbpfLoader;
     ///
-    /// let bpf = BpfLoader::new()
+    /// let bpf = EbpfLoader::new()
     ///     .extension("myfunc")
     ///     .load_file("file.o")?;
-    /// # Ok::<(), aya::BpfError>(())
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
     ///
-    pub fn extension(&mut self, name: &'a str) -> &mut BpfLoader<'a> {
+    pub fn extension(&mut self, name: &'a str) -> &mut EbpfLoader<'a> {
         self.extensions.insert(name);
         self
     }
@@ -338,15 +342,15 @@ impl<'a> BpfLoader<'a> {
     /// # Example
     ///
     /// ```no_run
-    /// use aya::{BpfLoader, VerifierLogLevel};
+    /// use aya::{EbpfLoader, VerifierLogLevel};
     ///
-    /// let bpf = BpfLoader::new()
+    /// let bpf = EbpfLoader::new()
     ///     .verifier_log_level(VerifierLogLevel::VERBOSE | VerifierLogLevel::STATS)
     ///     .load_file("file.o")?;
-    /// # Ok::<(), aya::BpfError>(())
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
     ///
-    pub fn verifier_log_level(&mut self, level: VerifierLogLevel) -> &mut BpfLoader<'a> {
+    pub fn verifier_log_level(&mut self, level: VerifierLogLevel) -> &mut EbpfLoader<'a> {
         self.verifier_log_level = level;
         self
     }
@@ -356,14 +360,14 @@ impl<'a> BpfLoader<'a> {
     /// # Examples
     ///
     /// ```no_run
-    /// use aya::BpfLoader;
+    /// use aya::EbpfLoader;
     ///
-    /// let bpf = BpfLoader::new().load_file("file.o")?;
-    /// # Ok::<(), aya::BpfError>(())
+    /// let bpf = EbpfLoader::new().load_file("file.o")?;
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
-    pub fn load_file<P: AsRef<Path>>(&mut self, path: P) -> Result<Bpf, BpfError> {
+    pub fn load_file<P: AsRef<Path>>(&mut self, path: P) -> Result<Ebpf, EbpfError> {
         let path = path.as_ref();
-        self.load(&fs::read(path).map_err(|error| BpfError::FileError {
+        self.load(&fs::read(path).map_err(|error| EbpfError::FileError {
             path: path.to_owned(),
             error,
         })?)
@@ -374,14 +378,14 @@ impl<'a> BpfLoader<'a> {
     /// # Examples
     ///
     /// ```no_run
-    /// use aya::BpfLoader;
+    /// use aya::EbpfLoader;
     /// use std::fs;
     ///
     /// let data = fs::read("file.o").unwrap();
-    /// let bpf = BpfLoader::new().load(&data)?;
-    /// # Ok::<(), aya::BpfError>(())
+    /// let bpf = EbpfLoader::new().load(&data)?;
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
-    pub fn load(&mut self, data: &[u8]) -> Result<Bpf, BpfError> {
+    pub fn load(&mut self, data: &[u8]) -> Result<Ebpf, EbpfError> {
         let Self {
             btf,
             map_pin_path,
@@ -407,7 +411,7 @@ impl<'a> BpfLoader<'a> {
                                 | ProgramSection::FExit { sleepable: _ }
                                 | ProgramSection::Lsm { sleepable: _ }
                                 | ProgramSection::BtfTracePoint => {
-                                    return Err(BpfError::BtfError(err))
+                                    return Err(EbpfError::BtfError(err))
                                 }
                                 ProgramSection::KRetProbe
                                 | ProgramSection::KProbe
@@ -456,14 +460,14 @@ impl<'a> BpfLoader<'a> {
         }
         let mut maps = HashMap::new();
         for (name, mut obj) in obj.maps.drain() {
-            if let (false, BpfSectionKind::Bss | BpfSectionKind::Data | BpfSectionKind::Rodata) =
+            if let (false, EbpfSectionKind::Bss | EbpfSectionKind::Data | EbpfSectionKind::Rodata) =
                 (FEATURES.bpf_global_data(), obj.section_kind())
             {
                 continue;
             }
-            let num_cpus = || -> Result<u32, BpfError> {
+            let num_cpus = || -> Result<u32, EbpfError> {
                 Ok(possible_cpus()
-                    .map_err(|error| BpfError::FileError {
+                    .map_err(|error| EbpfError::FileError {
                         path: PathBuf::from(POSSIBLE_CPUS),
                         error,
                     })?
@@ -694,22 +698,22 @@ impl<'a> BpfLoader<'a> {
         let maps = maps
             .drain()
             .map(parse_map)
-            .collect::<Result<HashMap<String, Map>, BpfError>>()?;
+            .collect::<Result<HashMap<String, Map>, EbpfError>>()?;
 
         if !*allow_unsupported_maps {
             maps.iter().try_for_each(|(_, x)| match x {
-                Map::Unsupported(map) => Err(BpfError::MapError(MapError::Unsupported {
+                Map::Unsupported(map) => Err(EbpfError::MapError(MapError::Unsupported {
                     map_type: map.obj().map_type(),
                 })),
                 _ => Ok(()),
             })?;
         };
 
-        Ok(Bpf { maps, programs })
+        Ok(Ebpf { maps, programs })
     }
 }
 
-fn parse_map(data: (String, MapData)) -> Result<(String, Map), BpfError> {
+fn parse_map(data: (String, MapData)) -> Result<(String, Map), EbpfError> {
     let (name, map) = data;
     let map_type = bpf_map_type::try_from(map.obj().map_type()).map_err(MapError::from)?;
     let map = match map_type {
@@ -748,9 +752,9 @@ fn max_entries_override(
     map_type: bpf_map_type,
     user_override: Option<u32>,
     current_value: impl Fn() -> u32,
-    num_cpus: impl Fn() -> Result<u32, BpfError>,
+    num_cpus: impl Fn() -> Result<u32, EbpfError>,
     page_size: impl Fn() -> u32,
-) -> Result<Option<u32>, BpfError> {
+) -> Result<Option<u32>, EbpfError> {
     let max_entries = || user_override.unwrap_or_else(&current_value);
     Ok(match map_type {
         BPF_MAP_TYPE_PERF_EVENT_ARRAY if max_entries() == 0 => Some(num_cpus()?),
@@ -841,38 +845,42 @@ mod tests {
     }
 }
 
-impl Default for BpfLoader<'_> {
+impl Default for EbpfLoader<'_> {
     fn default() -> Self {
-        BpfLoader::new()
+        EbpfLoader::new()
     }
 }
 
 /// The main entry point into the library, used to work with eBPF programs and maps.
 #[derive(Debug)]
-pub struct Bpf {
+pub struct Ebpf {
     maps: HashMap<String, Map>,
     programs: HashMap<String, Program>,
 }
 
-impl Bpf {
+/// The main entry point into the library, used to work with eBPF programs and maps.
+#[deprecated(since = "0.13.0", note = "use `Ebpf` instead")]
+pub type Bpf = Ebpf;
+
+impl Ebpf {
     /// Loads eBPF bytecode from a file.
     ///
     /// Parses the given object code file and initializes the [maps](crate::maps) defined in it. If
     /// the kernel supports [BTF](Btf) debug info, it is automatically loaded from
     /// `/sys/kernel/btf/vmlinux`.
     ///
-    /// For more loading options, see [BpfLoader].
+    /// For more loading options, see [EbpfLoader].
     ///
     /// # Examples
     ///
     /// ```no_run
-    /// use aya::Bpf;
+    /// use aya::Ebpf;
     ///
-    /// let bpf = Bpf::load_file("file.o")?;
-    /// # Ok::<(), aya::BpfError>(())
+    /// let bpf = Ebpf::load_file("file.o")?;
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
-    pub fn load_file<P: AsRef<Path>>(path: P) -> Result<Self, BpfError> {
-        BpfLoader::new()
+    pub fn load_file<P: AsRef<Path>>(path: P) -> Result<Self, EbpfError> {
+        EbpfLoader::new()
             .btf(Btf::from_sys_fs().ok().as_ref())
             .load_file(path)
     }
@@ -883,21 +891,21 @@ impl Bpf {
     /// [maps](crate::maps) defined in it. If the kernel supports [BTF](Btf)
     /// debug info, it is automatically loaded from `/sys/kernel/btf/vmlinux`.
     ///
-    /// For more loading options, see [BpfLoader].
+    /// For more loading options, see [EbpfLoader].
     ///
     /// # Examples
     ///
     /// ```no_run
-    /// use aya::{Bpf, Btf};
+    /// use aya::{Ebpf, Btf};
     /// use std::fs;
     ///
     /// let data = fs::read("file.o").unwrap();
     /// // load the BTF data from /sys/kernel/btf/vmlinux
-    /// let bpf = Bpf::load(&data)?;
-    /// # Ok::<(), aya::BpfError>(())
+    /// let bpf = Ebpf::load(&data)?;
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
-    pub fn load(data: &[u8]) -> Result<Self, BpfError> {
-        BpfLoader::new()
+    pub fn load(data: &[u8]) -> Result<Self, EbpfError> {
+        EbpfLoader::new()
             .btf(Btf::from_sys_fs().ok().as_ref())
             .load(data)
     }
@@ -926,7 +934,7 @@ impl Bpf {
 
     /// Takes ownership of a map with the given name.
     ///
-    /// Use this when borrowing with [`map`](crate::Bpf::map) or [`map_mut`](crate::Bpf::map_mut)
+    /// Use this when borrowing with [`map`](crate::Ebpf::map) or [`map_mut`](crate::Ebpf::map_mut)
     /// is not possible (eg when using the map from an async task). The returned
     /// map will be closed on `Drop`, therefore the caller is responsible for
     /// managing its lifetime.
@@ -944,14 +952,14 @@ impl Bpf {
     ///
     /// # Examples
     /// ```no_run
-    /// # let mut bpf = aya::Bpf::load(&[])?;
+    /// # let mut bpf = aya::Ebpf::load(&[])?;
     /// for (name, map) in bpf.maps() {
     ///     println!(
     ///         "found map `{}`",
     ///         name,
     ///     );
     /// }
-    /// # Ok::<(), aya::BpfError>(())
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
     pub fn maps(&self) -> impl Iterator<Item = (&str, &Map)> {
         self.maps.iter().map(|(name, map)| (name.as_str(), map))
@@ -965,11 +973,11 @@ impl Bpf {
     /// # #[derive(thiserror::Error, Debug)]
     /// # enum Error {
     /// #     #[error(transparent)]
-    /// #     Bpf(#[from] aya::BpfError),
+    /// #     Ebpf(#[from] aya::EbpfError),
     /// #     #[error(transparent)]
     /// #     Pin(#[from] aya::pin::PinError)
     /// # }
-    /// # let mut bpf = aya::Bpf::load(&[])?;
+    /// # let mut bpf = aya::Ebpf::load(&[])?;
     /// # let pin_path = Path::new("/tmp/pin_path");
     /// for (_, map) in bpf.maps_mut() {
     ///     map.pin(pin_path)?;
@@ -991,10 +999,10 @@ impl Bpf {
     /// # Examples
     ///
     /// ```no_run
-    /// # let bpf = aya::Bpf::load(&[])?;
+    /// # let bpf = aya::Ebpf::load(&[])?;
     /// let program = bpf.program("SSL_read").unwrap();
     /// println!("program SSL_read is of type {:?}", program.prog_type());
-    /// # Ok::<(), aya::BpfError>(())
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
     pub fn program(&self, name: &str) -> Option<&Program> {
         self.programs.get(name)
@@ -1008,13 +1016,13 @@ impl Bpf {
     /// # Examples
     ///
     /// ```no_run
-    /// # let mut bpf = aya::Bpf::load(&[])?;
+    /// # let mut bpf = aya::Ebpf::load(&[])?;
     /// use aya::programs::UProbe;
     ///
     /// let program: &mut UProbe = bpf.program_mut("SSL_read").unwrap().try_into()?;
     /// program.load()?;
     /// program.attach(Some("SSL_read"), 0, "libssl", None)?;
-    /// # Ok::<(), aya::BpfError>(())
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
     pub fn program_mut(&mut self, name: &str) -> Option<&mut Program> {
         self.programs.get_mut(name)
@@ -1024,7 +1032,7 @@ impl Bpf {
     ///
     /// # Examples
     /// ```no_run
-    /// # let bpf = aya::Bpf::load(&[])?;
+    /// # let bpf = aya::Ebpf::load(&[])?;
     /// for (name, program) in bpf.programs() {
     ///     println!(
     ///         "found program `{}` of type `{:?}`",
@@ -1032,7 +1040,7 @@ impl Bpf {
     ///         program.prog_type()
     ///     );
     /// }
-    /// # Ok::<(), aya::BpfError>(())
+    /// # Ok::<(), aya::EbpfError>(())
     /// ```
     pub fn programs(&self) -> impl Iterator<Item = (&str, &Program)> {
         self.programs.iter().map(|(s, p)| (s.as_str(), p))
@@ -1046,11 +1054,11 @@ impl Bpf {
     /// # #[derive(thiserror::Error, Debug)]
     /// # enum Error {
     /// #     #[error(transparent)]
-    /// #     Bpf(#[from] aya::BpfError),
+    /// #     Ebpf(#[from] aya::EbpfError),
     /// #     #[error(transparent)]
     /// #     Pin(#[from] aya::pin::PinError)
     /// # }
-    /// # let mut bpf = aya::Bpf::load(&[])?;
+    /// # let mut bpf = aya::Ebpf::load(&[])?;
     /// # let pin_path = Path::new("/tmp/pin_path");
     /// for (_, program) in bpf.programs_mut() {
     ///     program.pin(pin_path)?;
@@ -1062,9 +1070,9 @@ impl Bpf {
     }
 }
 
-/// The error type returned by [`Bpf::load_file`] and [`Bpf::load`].
+/// The error type returned by [`Ebpf::load_file`] and [`Ebpf::load`].
 #[derive(Debug, Error)]
-pub enum BpfError {
+pub enum EbpfError {
     /// Error loading file
     #[error("error loading {path}")]
     FileError {
@@ -1092,7 +1100,7 @@ pub enum BpfError {
 
     /// Error performing relocations
     #[error("error relocating function")]
-    RelocationError(#[from] BpfRelocationError),
+    RelocationError(#[from] EbpfRelocationError),
 
     /// Error performing relocations
     #[error("error relocating section")]
@@ -1111,6 +1119,10 @@ pub enum BpfError {
     ProgramError(#[from] ProgramError),
 }
 
+/// The error type returned by [`Bpf::load_file`] and [`Bpf::load`].
+#[deprecated(since = "0.13.0", note = "use `EbpfError` instead")]
+pub type BpfError = EbpfError;
+
 fn load_btf(raw_btf: Vec<u8>, verifier_log_level: VerifierLogLevel) -> Result<OwnedFd, BtfError> {
     let (ret, verifier_log) = retry_with_verifier_logs(10, |logger| {
         bpf_load_btf(raw_btf.as_slice(), logger, verifier_log_level)
@@ -1124,7 +1136,7 @@ fn load_btf(raw_btf: Vec<u8>, verifier_log_level: VerifierLogLevel) -> Result<Ow
 /// Global data that can be exported to eBPF programs before they are loaded.
 ///
 /// Valid global data includes `Pod` types and slices of `Pod` types. See also
-/// [BpfLoader::set_global].
+/// [EbpfLoader::set_global].
 pub struct GlobalData<'a> {
     bytes: &'a [u8],
 }

+ 2 - 2
aya/src/maps/array/array.rs

@@ -21,13 +21,13 @@ use crate::{
 ///
 /// # Examples
 /// ```no_run
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::Array;
 ///
 /// let mut array = Array::try_from(bpf.map_mut("ARRAY").unwrap())?;
 /// array.set(1, 42, 0)?;
 /// assert_eq!(array.get(&1, 0)?, 42);
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 #[doc(alias = "BPF_MAP_TYPE_ARRAY")]
 pub struct Array<T, V: Pod> {

+ 2 - 2
aya/src/maps/array/per_cpu_array.rs

@@ -28,9 +28,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Map(#[from] aya::maps::MapError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::{PerCpuArray, PerCpuValues};
 /// use aya::util::nr_cpus;
 ///

+ 2 - 2
aya/src/maps/array/program_array.rs

@@ -23,7 +23,7 @@ use crate::{
 ///
 /// # Examples
 /// ```no_run
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::ProgramArray;
 /// use aya::programs::CgroupSkb;
 ///
@@ -44,7 +44,7 @@ use crate::{
 ///
 /// // bpf_tail_call(ctx, JUMP_TABLE, 2) will jump to prog_2
 /// prog_array.set(2, &prog_2_fd, flags);
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 #[doc(alias = "BPF_MAP_TYPE_PROG_ARRAY")]
 pub struct ProgramArray<T> {

+ 8 - 8
aya/src/maps/bloom_filter.rs

@@ -20,7 +20,7 @@ use crate::{
 /// # Examples
 ///
 /// ```no_run
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::bloom_filter::BloomFilter;
 ///
 /// let mut bloom_filter = BloomFilter::try_from(bpf.map_mut("BLOOM_FILTER").unwrap())?;
@@ -30,7 +30,7 @@ use crate::{
 /// assert!(bloom_filter.contains(&1, 0).is_ok());
 /// assert!(bloom_filter.contains(&2, 0).is_err());
 ///
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 
 #[doc(alias = "BPF_MAP_TYPE_BLOOM_FILTER")]
@@ -92,7 +92,7 @@ mod tests {
             bpf_map_type::{BPF_MAP_TYPE_BLOOM_FILTER, BPF_MAP_TYPE_PERF_EVENT_ARRAY},
         },
         maps::Map,
-        obj::{self, maps::LegacyMap, BpfSectionKind},
+        obj::{self, maps::LegacyMap, EbpfSectionKind},
         sys::{override_syscall, SysResult, Syscall},
     };
 
@@ -106,7 +106,7 @@ mod tests {
                 ..Default::default()
             },
             section_index: 0,
-            section_kind: BpfSectionKind::Maps,
+            section_kind: EbpfSectionKind::Maps,
             symbol_index: None,
             data: Vec::new(),
         })
@@ -114,7 +114,7 @@ mod tests {
 
     fn new_map(obj: obj::Map) -> MapData {
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_CREATE,
                 ..
             } => Ok(1337),
@@ -150,7 +150,7 @@ mod tests {
                 ..Default::default()
             },
             section_index: 0,
-            section_kind: BpfSectionKind::Maps,
+            section_kind: EbpfSectionKind::Maps,
             symbol_index: None,
             data: Vec::new(),
         }));
@@ -197,7 +197,7 @@ mod tests {
         let mut bloom_filter = BloomFilter::<_, u32>::new(&mut map).unwrap();
 
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_UPDATE_ELEM,
                 ..
             } => Ok(1),
@@ -226,7 +226,7 @@ mod tests {
         let bloom_filter = BloomFilter::<_, u32>::new(&map).unwrap();
 
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_LOOKUP_ELEM,
                 ..
             } => sys_error(ENOENT),

+ 17 - 17
aya/src/maps/hash_map/hash_map.rs

@@ -19,7 +19,7 @@ use crate::{
 /// # Examples
 ///
 /// ```no_run
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::HashMap;
 ///
 /// let mut redirect_ports = HashMap::try_from(bpf.map_mut("REDIRECT_PORTS").unwrap())?;
@@ -28,7 +28,7 @@ use crate::{
 /// redirect_ports.insert(80, 8080, 0);
 /// // redirect port 443 to 8443
 /// redirect_ports.insert(443, 8443, 0);
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 #[doc(alias = "BPF_MAP_TYPE_HASH")]
 #[doc(alias = "BPF_MAP_TYPE_LRU_HASH")]
@@ -218,7 +218,7 @@ mod tests {
         let mut hm = HashMap::<_, u32, u32>::new(&mut map).unwrap();
 
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_UPDATE_ELEM,
                 ..
             } => Ok(1),
@@ -234,7 +234,7 @@ mod tests {
         let mut hm = HashMap::<_, u32, u32>::new(&mut map).unwrap();
 
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_UPDATE_ELEM,
                 ..
             } => Ok(1),
@@ -263,7 +263,7 @@ mod tests {
         let mut hm = HashMap::<_, u32, u32>::new(&mut map).unwrap();
 
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_DELETE_ELEM,
                 ..
             } => Ok(1),
@@ -289,7 +289,7 @@ mod tests {
     fn test_get_not_found() {
         let map = new_map(new_obj_map());
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_LOOKUP_ELEM,
                 ..
             } => sys_error(ENOENT),
@@ -321,7 +321,7 @@ mod tests {
     fn test_keys_empty() {
         let map = new_map(new_obj_map());
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_GET_NEXT_KEY,
                 ..
             } => sys_error(ENOENT),
@@ -365,7 +365,7 @@ mod tests {
         let map = new_map(new_obj_map());
 
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_GET_NEXT_KEY,
                 attr,
             } => get_next_key(attr),
@@ -386,7 +386,7 @@ mod tests {
     fn test_keys_error() {
         let map = new_map(new_obj_map());
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_GET_NEXT_KEY,
                 attr,
             } => {
@@ -423,11 +423,11 @@ mod tests {
     fn test_iter() {
         let map = new_map(new_obj_map());
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_GET_NEXT_KEY,
                 attr,
             } => get_next_key(attr),
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_LOOKUP_ELEM,
                 attr,
             } => lookup_elem(attr),
@@ -446,11 +446,11 @@ mod tests {
     fn test_iter_key_deleted() {
         let map = new_map(new_obj_map());
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_GET_NEXT_KEY,
                 attr,
             } => get_next_key(attr),
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_LOOKUP_ELEM,
                 attr,
             } => {
@@ -480,7 +480,7 @@ mod tests {
     fn test_iter_key_error() {
         let map = new_map(new_obj_map());
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_GET_NEXT_KEY,
                 attr,
             } => {
@@ -494,7 +494,7 @@ mod tests {
 
                 Ok(1)
             }
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_LOOKUP_ELEM,
                 attr,
             } => lookup_elem(attr),
@@ -523,11 +523,11 @@ mod tests {
     fn test_iter_value_error() {
         let map = new_map(new_obj_map());
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_GET_NEXT_KEY,
                 attr,
             } => get_next_key(attr),
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_LOOKUP_ELEM,
                 attr,
             } => {

+ 3 - 3
aya/src/maps/hash_map/mod.rs

@@ -50,13 +50,13 @@ mod test_utils {
         bpf_map_def,
         generated::{bpf_cmd, bpf_map_type},
         maps::MapData,
-        obj::{self, maps::LegacyMap, BpfSectionKind},
+        obj::{self, maps::LegacyMap, EbpfSectionKind},
         sys::{override_syscall, Syscall},
     };
 
     pub(super) fn new_map(obj: obj::Map) -> MapData {
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_CREATE,
                 ..
             } => Ok(1337),
@@ -75,7 +75,7 @@ mod test_utils {
                 ..Default::default()
             },
             section_index: 0,
-            section_kind: BpfSectionKind::Maps,
+            section_kind: EbpfSectionKind::Maps,
             data: Vec::new(),
             symbol_index: None,
         })

+ 4 - 4
aya/src/maps/hash_map/per_cpu_hash_map.rs

@@ -26,7 +26,7 @@ use crate::{
 /// # Examples
 ///
 /// ```no_run
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::PerCpuHashMap;
 ///
 /// const CPU_IDS: u8 = 1;
@@ -38,7 +38,7 @@ use crate::{
 /// for (cpu_id, wakeups) in cpu_ids.iter().zip(wakeups.iter()) {
 ///     println!("cpu {} woke up {} times", cpu_id, wakeups);
 /// }
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 #[doc(alias = "BPF_MAP_TYPE_LRU_PERCPU_HASH")]
 #[doc(alias = "BPF_MAP_TYPE_PERCPU_HASH")]
@@ -97,9 +97,9 @@ impl<T: BorrowMut<MapData>, K: Pod, V: Pod> PerCpuHashMap<T, K, V> {
     /// #     #[error(transparent)]
     /// #     Map(#[from] aya::maps::MapError),
     /// #     #[error(transparent)]
-    /// #     Bpf(#[from] aya::BpfError)
+    /// #     Ebpf(#[from] aya::EbpfError)
     /// # }
-    /// # let mut bpf = aya::Bpf::load(&[])?;
+    /// # let mut bpf = aya::Ebpf::load(&[])?;
     /// use aya::maps::{PerCpuHashMap, PerCpuValues};
     /// use aya::util::nr_cpus;
     ///

+ 9 - 9
aya/src/maps/lpm_trie.rs

@@ -20,7 +20,7 @@ use crate::{
 /// # Examples
 ///
 /// ```no_run
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::lpm_trie::{LpmTrie, Key};
 /// use std::net::Ipv4Addr;
 ///
@@ -42,7 +42,7 @@ use crate::{
 /// trie.insert(&longer_key, 2, 0)?;
 /// let value = trie.get(&lookup, 0)?;
 /// assert_eq!(value, 2);
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 
 #[doc(alias = "BPF_MAP_TYPE_LPM_TRIE")]
@@ -209,7 +209,7 @@ mod tests {
             bpf_map_type::{BPF_MAP_TYPE_LPM_TRIE, BPF_MAP_TYPE_PERF_EVENT_ARRAY},
         },
         maps::Map,
-        obj::{self, maps::LegacyMap, BpfSectionKind},
+        obj::{self, maps::LegacyMap, EbpfSectionKind},
         sys::{override_syscall, SysResult, Syscall},
     };
 
@@ -223,7 +223,7 @@ mod tests {
                 ..Default::default()
             },
             section_index: 0,
-            section_kind: BpfSectionKind::Maps,
+            section_kind: EbpfSectionKind::Maps,
             symbol_index: None,
             data: Vec::new(),
         })
@@ -231,7 +231,7 @@ mod tests {
 
     fn new_map(obj: obj::Map) -> MapData {
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_CREATE,
                 ..
             } => Ok(1337),
@@ -279,7 +279,7 @@ mod tests {
                 ..Default::default()
             },
             section_index: 0,
-            section_kind: BpfSectionKind::Maps,
+            section_kind: EbpfSectionKind::Maps,
             symbol_index: None,
             data: Vec::new(),
         }));
@@ -330,7 +330,7 @@ mod tests {
         let key = Key::new(16, u32::from(ipaddr).to_be());
 
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_UPDATE_ELEM,
                 ..
             } => Ok(1),
@@ -363,7 +363,7 @@ mod tests {
         let key = Key::new(16, u32::from(ipaddr).to_be());
 
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_DELETE_ELEM,
                 ..
             } => Ok(1),
@@ -396,7 +396,7 @@ mod tests {
         let key = Key::new(16, u32::from(ipaddr).to_be());
 
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_LOOKUP_ELEM,
                 ..
             } => sys_error(ENOENT),

+ 26 - 26
aya/src/maps/mod.rs

@@ -2,17 +2,17 @@
 //!
 //! The eBPF platform provides data structures - maps in eBPF speak - that are
 //! used to setup and share data with eBPF programs. When you call
-//! [`Bpf::load_file`](crate::Bpf::load_file) or
-//! [`Bpf::load`](crate::Bpf::load), all the maps defined in the eBPF code get
-//! initialized and can then be accessed using [`Bpf::map`](crate::Bpf::map),
-//! [`Bpf::map_mut`](crate::Bpf::map_mut), or
-//! [`Bpf::take_map`](crate::Bpf::take_map).
+//! [`Ebpf::load_file`](crate::Ebpf::load_file) or
+//! [`Ebpf::load`](crate::Ebpf::load), all the maps defined in the eBPF code get
+//! initialized and can then be accessed using [`Ebpf::map`](crate::Ebpf::map),
+//! [`Ebpf::map_mut`](crate::Ebpf::map_mut), or
+//! [`Ebpf::take_map`](crate::Ebpf::take_map).
 //!
 //! # Typed maps
 //!
 //! The eBPF API includes many map types each supporting different operations.
-//! [`Bpf::map`](crate::Bpf::map), [`Bpf::map_mut`](crate::Bpf::map_mut), and
-//! [`Bpf::take_map`](crate::Bpf::take_map) always return the opaque
+//! [`Ebpf::map`](crate::Ebpf::map), [`Ebpf::map_mut`](crate::Ebpf::map_mut), and
+//! [`Ebpf::take_map`](crate::Ebpf::take_map) always return the opaque
 //! [`&Map`](crate::maps::Map), [`&mut Map`](crate::maps::Map), and [`Map`]
 //! types respectively. Those three types can be converted to *typed maps* using
 //! the [`TryFrom`] or [`TryInto`] trait. For example:
@@ -27,9 +27,9 @@
 //! #     #[error(transparent)]
 //! #     Program(#[from] aya::programs::ProgramError),
 //! #     #[error(transparent)]
-//! #     Bpf(#[from] aya::BpfError)
+//! #     Ebpf(#[from] aya::EbpfError)
 //! # }
-//! # let mut bpf = aya::Bpf::load(&[])?;
+//! # let mut bpf = aya::Ebpf::load(&[])?;
 //! use aya::maps::SockMap;
 //! use aya::programs::SkMsg;
 //!
@@ -66,7 +66,7 @@ use thiserror::Error;
 
 use crate::{
     generated::bpf_map_info,
-    obj::{self, parse_map_info, BpfSectionKind},
+    obj::{self, parse_map_info, EbpfSectionKind},
     pin::PinError,
     sys::{
         bpf_create_map, bpf_get_object, bpf_map_freeze, bpf_map_get_fd_by_id,
@@ -602,7 +602,7 @@ impl MapData {
 
     pub(crate) fn finalize(&mut self) -> Result<(), MapError> {
         let Self { obj, fd } = self;
-        if !obj.data().is_empty() && obj.section_kind() != BpfSectionKind::Bss {
+        if !obj.data().is_empty() && obj.section_kind() != EbpfSectionKind::Bss {
             bpf_map_update_elem_ptr(fd.as_fd(), &0 as *const _, obj.data_mut().as_mut_ptr(), 0)
                 .map_err(|(_, io_error)| SyscallError {
                     call: "bpf_map_update_elem",
@@ -610,7 +610,7 @@ impl MapData {
                 })
                 .map_err(MapError::from)?;
         }
-        if obj.section_kind() == BpfSectionKind::Rodata {
+        if obj.section_kind() == EbpfSectionKind::Rodata {
             bpf_map_freeze(fd.as_fd())
                 .map_err(|(_, io_error)| SyscallError {
                     call: "bpf_map_freeze",
@@ -678,7 +678,7 @@ impl MapData {
     /// # Example
     ///
     /// ```no_run
-    /// # let mut bpf = aya::Bpf::load(&[])?;
+    /// # let mut bpf = aya::Ebpf::load(&[])?;
     /// # use aya::maps::MapData;
     ///
     /// let mut map = MapData::from_pin("/sys/fs/bpf/my_map")?;
@@ -833,9 +833,9 @@ impl PerCpuKernelMem {
 /// #     #[error(transparent)]
 /// #     Map(#[from] aya::maps::MapError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let bpf = aya::Bpf::load(&[])?;
+/// # let bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::PerCpuValues;
 /// use aya::util::nr_cpus;
 ///
@@ -992,8 +992,8 @@ impl MapInfo {
 
 /// Returns an iterator over all loaded bpf maps.
 ///
-/// This differs from [`crate::Bpf::maps`] since it will return all maps
-/// listed on the host system and not only maps for a specific [`crate::Bpf`] instance.
+/// This differs from [`crate::Ebpf::maps`] since it will return all maps
+/// listed on the host system and not only maps for a specific [`crate::Ebpf`] instance.
 ///
 /// # Example
 /// ```
@@ -1045,7 +1045,7 @@ mod tests {
                 ..Default::default()
             },
             section_index: 0,
-            section_kind: BpfSectionKind::Maps,
+            section_kind: EbpfSectionKind::Maps,
             symbol_index: Some(0),
             data: Vec::new(),
         })
@@ -1054,7 +1054,7 @@ mod tests {
     #[test]
     fn test_from_map_id() {
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_GET_FD_BY_ID,
                 attr,
             } => {
@@ -1064,7 +1064,7 @@ mod tests {
                 );
                 Ok(42)
             }
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_OBJ_GET_INFO_BY_FD,
                 attr,
             } => {
@@ -1086,7 +1086,7 @@ mod tests {
     #[test]
     fn test_create() {
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_CREATE,
                 ..
             } => Ok(42),
@@ -1113,11 +1113,11 @@ mod tests {
         const TEST_NAME: &str = "foo";
 
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_CREATE,
                 ..
             } => Ok(42),
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_OBJ_GET_INFO_BY_FD,
                 attr,
             } => {
@@ -1146,7 +1146,7 @@ mod tests {
         use crate::generated::bpf_map_info;
 
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_GET_NEXT_ID,
                 attr,
             } => unsafe {
@@ -1158,11 +1158,11 @@ mod tests {
                     Err((-1, io::Error::from_raw_os_error(libc::ENOENT)))
                 }
             },
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_MAP_GET_FD_BY_ID,
                 attr,
             } => Ok((1000 + unsafe { attr.__bindgen_anon_6.__bindgen_anon_1.map_id }) as c_long),
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_OBJ_GET_INFO_BY_FD,
                 attr,
             } => {

+ 2 - 2
aya/src/maps/perf/async_perf_event_array.rs

@@ -42,13 +42,13 @@ use crate::maps::{
 /// #    #[error(transparent)]
 /// #    Map(#[from] aya::maps::MapError),
 /// #    #[error(transparent)]
-/// #    Bpf(#[from] aya::BpfError),
+/// #    Ebpf(#[from] aya::EbpfError),
 /// #    #[error(transparent)]
 /// #    PerfBuf(#[from] aya::maps::perf::PerfBufferError),
 /// # }
 /// # #[cfg(feature = "async_tokio")]
 /// # async fn try_main() -> Result<(), Error> {
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::perf::{AsyncPerfEventArray, PerfBufferError};
 /// use aya::util::online_cpus;
 /// use bytes::BytesMut;

+ 2 - 2
aya/src/maps/perf/perf_event_array.rs

@@ -108,11 +108,11 @@ impl<T: BorrowMut<MapData>> AsRawFd for PerfEventArrayBuffer<T> {
 /// #    #[error(transparent)]
 /// #    Map(#[from] aya::maps::MapError),
 /// #    #[error(transparent)]
-/// #    Bpf(#[from] aya::BpfError),
+/// #    Ebpf(#[from] aya::EbpfError),
 /// #    #[error(transparent)]
 /// #    PerfBuf(#[from] aya::maps::perf::PerfBufferError),
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::PerfEventArray;
 /// use aya::util::online_cpus;
 /// use bytes::BytesMut;

+ 2 - 2
aya/src/maps/queue.rs

@@ -19,14 +19,14 @@ use crate::{
 ///
 /// # Examples
 /// ```no_run
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::Queue;
 ///
 /// let mut queue = Queue::try_from(bpf.map_mut("ARRAY").unwrap())?;
 /// queue.push(42, 0)?;
 /// queue.push(43, 0)?;
 /// assert_eq!(queue.pop(0)?, 42);
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 #[doc(alias = "BPF_MAP_TYPE_QUEUE")]
 pub struct Queue<T, V: Pod> {

+ 2 - 2
aya/src/maps/ring_buf.rs

@@ -68,7 +68,7 @@ use crate::{
 /// #     }
 /// #     fn clear_ready(&mut self) {}
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::RingBuf;
 /// use std::convert::TryFrom;
 ///
@@ -82,7 +82,7 @@ use crate::{
 ///     }
 ///     guard.clear_ready();
 /// }
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 ///
 /// # Polling

+ 2 - 2
aya/src/maps/sock/sock_hash.rs

@@ -38,9 +38,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use std::io::Write;
 /// use std::net::TcpStream;
 /// use std::os::fd::AsRawFd;

+ 2 - 2
aya/src/maps/sock/sock_map.rs

@@ -35,9 +35,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::SockMap;
 /// use aya::programs::SkSkb;
 ///

+ 2 - 2
aya/src/maps/stack.rs

@@ -19,14 +19,14 @@ use crate::{
 ///
 /// # Examples
 /// ```no_run
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::Stack;
 ///
 /// let mut stack = Stack::try_from(bpf.map_mut("STACK").unwrap())?;
 /// stack.push(42, 0)?;
 /// stack.push(43, 0)?;
 /// assert_eq!(stack.pop(0)?, 43);
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 #[doc(alias = "BPF_MAP_TYPE_STACK")]
 pub struct Stack<T, V: Pod> {

+ 2 - 2
aya/src/maps/stack_trace.rs

@@ -35,9 +35,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Map(#[from] aya::maps::MapError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let bpf = aya::Bpf::load(&[])?;
+/// # let bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::StackTraceMap;
 /// use aya::util::kernel_symbols;
 ///

+ 2 - 2
aya/src/maps/xdp/cpu_map.rs

@@ -31,7 +31,7 @@ use crate::{
 /// use aya::maps::xdp::CpuMap;
 ///
 /// let ncpus = aya::util::nr_cpus().unwrap() as u32;
-/// let mut bpf = aya::BpfLoader::new()
+/// let mut bpf = aya::EbpfLoader::new()
 ///     .set_max_entries("CPUS", ncpus)
 ///     .load(elf_bytes)
 ///     .unwrap();
@@ -42,7 +42,7 @@ use crate::{
 ///     cpumap.set(i, queue_size, None, flags);
 /// }
 ///
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 ///
 /// # See also

+ 2 - 2
aya/src/maps/xdp/dev_map.rs

@@ -27,14 +27,14 @@ use crate::{
 ///
 /// # Examples
 /// ```no_run
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::xdp::DevMap;
 ///
 /// let mut devmap = DevMap::try_from(bpf.map_mut("IFACES").unwrap())?;
 /// // Lookups at index 2 will redirect packets to interface with index 3 (e.g. eth1)
 /// devmap.set(2, 3, None, 0);
 ///
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 ///
 /// # See also

+ 2 - 2
aya/src/maps/xdp/dev_map_hash.rs

@@ -27,14 +27,14 @@ use crate::{
 ///
 /// # Examples
 /// ```no_run
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::xdp::DevMapHash;
 ///
 /// let mut devmap = DevMapHash::try_from(bpf.map_mut("IFACES").unwrap())?;
 /// // Lookups with key 2 will redirect packets to interface with index 3 (e.g. eth1)
 /// devmap.insert(2, 3, None, 0);
 ///
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 ///
 /// # See also

+ 2 - 2
aya/src/maps/xdp/xsk_map.rs

@@ -21,14 +21,14 @@ use crate::{
 ///
 /// # Examples
 /// ```no_run
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// # let socket_fd = 1;
 /// use aya::maps::XskMap;
 ///
 /// let mut xskmap = XskMap::try_from(bpf.map_mut("SOCKETS").unwrap())?;
 /// // socket_fd is the RawFd of an AF_XDP socket
 /// xskmap.set(0, socket_fd, 0);
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 ///
 /// # See also

+ 2 - 2
aya/src/programs/cgroup_device.rs

@@ -35,9 +35,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::programs::CgroupDevice;
 ///
 /// let cgroup = std::fs::File::open("/sys/fs/cgroup/unified")?;

+ 2 - 2
aya/src/programs/cgroup_skb.rs

@@ -39,9 +39,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use std::fs::File;
 /// use aya::programs::{CgroupSkb, CgroupSkbAttachType};
 ///

+ 2 - 2
aya/src/programs/cgroup_sock.rs

@@ -37,9 +37,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use std::fs::File;
 /// use aya::programs::{CgroupSock, CgroupSockAttachType};
 ///

+ 2 - 2
aya/src/programs/cgroup_sock_addr.rs

@@ -38,9 +38,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use std::fs::File;
 /// use aya::programs::{CgroupSockAddr, CgroupSockAddrAttachType};
 ///

+ 2 - 2
aya/src/programs/cgroup_sockopt.rs

@@ -35,9 +35,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use std::fs::File;
 /// use aya::programs::CgroupSockopt;
 ///

+ 2 - 2
aya/src/programs/cgroup_sysctl.rs

@@ -32,9 +32,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use std::fs::File;
 /// use aya::programs::CgroupSysctl;
 ///

+ 3 - 3
aya/src/programs/extension.rs

@@ -35,9 +35,9 @@ pub enum ExtensionError {
 /// # Examples
 ///
 /// ```no_run
-/// use aya::{BpfLoader, programs::{Xdp, XdpFlags, Extension}};
+/// use aya::{EbpfLoader, programs::{Xdp, XdpFlags, Extension}};
 ///
-/// let mut bpf = BpfLoader::new().extension("extension").load_file("app.o")?;
+/// let mut bpf = EbpfLoader::new().extension("extension").load_file("app.o")?;
 /// let prog: &mut Xdp = bpf.program_mut("main").unwrap().try_into()?;
 /// prog.load()?;
 /// prog.attach("eth0", XdpFlags::default())?;
@@ -47,7 +47,7 @@ pub enum ExtensionError {
 /// let ext: &mut Extension = bpf.program_mut("extension").unwrap().try_into()?;
 /// ext.load(prog_fd, "function_to_replace")?;
 /// ext.attach()?;
-/// Ok::<(), aya::BpfError>(())
+/// Ok::<(), aya::EbpfError>(())
 /// ```
 #[derive(Debug)]
 #[doc(alias = "BPF_PROG_TYPE_EXT")]

+ 3 - 3
aya/src/programs/fentry.rs

@@ -31,10 +31,10 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError),
+/// #     Ebpf(#[from] aya::EbpfError),
 /// # }
-/// # let mut bpf = Bpf::load_file("ebpf_programs.o")?;
-/// use aya::{Bpf, programs::FEntry, BtfError, Btf};
+/// # let mut bpf = Ebpf::load_file("ebpf_programs.o")?;
+/// use aya::{Ebpf, programs::FEntry, BtfError, Btf};
 ///
 /// let btf = Btf::from_sys_fs()?;
 /// let program: &mut FEntry = bpf.program_mut("filename_lookup").unwrap().try_into()?;

+ 3 - 3
aya/src/programs/fexit.rs

@@ -31,10 +31,10 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError),
+/// #     Ebpf(#[from] aya::EbpfError),
 /// # }
-/// # let mut bpf = Bpf::load_file("ebpf_programs.o")?;
-/// use aya::{Bpf, programs::FExit, BtfError, Btf};
+/// # let mut bpf = Ebpf::load_file("ebpf_programs.o")?;
+/// use aya::{Ebpf, programs::FExit, BtfError, Btf};
 ///
 /// let btf = Btf::from_sys_fs()?;
 /// let program: &mut FExit = bpf.program_mut("filename_lookup").unwrap().try_into()?;

+ 3 - 3
aya/src/programs/kprobe.rs

@@ -35,13 +35,13 @@ use crate::{
 /// # Examples
 ///
 /// ```no_run
-/// # let mut bpf = Bpf::load_file("ebpf_programs.o")?;
-/// use aya::{Bpf, programs::KProbe};
+/// # let mut bpf = Ebpf::load_file("ebpf_programs.o")?;
+/// use aya::{Ebpf, programs::KProbe};
 ///
 /// let program: &mut KProbe = bpf.program_mut("intercept_wakeups").unwrap().try_into()?;
 /// program.load()?;
 /// program.attach("try_to_wake_up", 0)?;
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 #[derive(Debug)]
 #[doc(alias = "BPF_PROG_TYPE_KPROBE")]

+ 5 - 5
aya/src/programs/links.rs

@@ -93,8 +93,8 @@ pub struct FdLinkId(pub(crate) RawFd);
 /// # Example
 ///
 ///```no_run
-/// # let mut bpf = Bpf::load_file("ebpf_programs.o")?;
-/// use aya::{Bpf, programs::{links::FdLink, KProbe}};
+/// # let mut bpf = Ebpf::load_file("ebpf_programs.o")?;
+/// use aya::{Ebpf, programs::{links::FdLink, KProbe}};
 ///
 /// let program: &mut KProbe = bpf.program_mut("intercept_wakeups").unwrap().try_into()?;
 /// program.load()?;
@@ -103,7 +103,7 @@ pub struct FdLinkId(pub(crate) RawFd);
 /// let fd_link: FdLink = link.try_into().unwrap();
 /// fd_link.pin("/sys/fs/bpf/intercept_wakeups_link").unwrap();
 ///
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 #[derive(Debug)]
 pub struct FdLink {
@@ -130,13 +130,13 @@ impl FdLink {
     /// # #[derive(thiserror::Error, Debug)]
     /// # enum Error {
     /// #     #[error(transparent)]
-    /// #     Bpf(#[from] aya::BpfError),
+    /// #     Ebpf(#[from] aya::EbpfError),
     /// #     #[error(transparent)]
     /// #     Pin(#[from] aya::pin::PinError),
     /// #     #[error(transparent)]
     /// #     Program(#[from] aya::programs::ProgramError)
     /// # }
-    /// # let mut bpf = aya::Bpf::load(&[])?;
+    /// # let mut bpf = aya::Ebpf::load(&[])?;
     /// # let prog: &mut Extension = bpf.program_mut("example").unwrap().try_into()?;
     /// let link_id = prog.attach()?;
     /// let owned_link = prog.take_link(link_id)?;

+ 3 - 3
aya/src/programs/lirc_mode2.rs

@@ -30,14 +30,14 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use std::fs::File;
 /// use aya::programs::LircMode2;
 ///
 /// let file = File::open("/dev/lirc0")?;
-/// let mut bpf = aya::Bpf::load_file("imon_rsc.o")?;
+/// let mut bpf = aya::Ebpf::load_file("imon_rsc.o")?;
 /// let decoder: &mut LircMode2 = bpf.program_mut("imon_rsc").unwrap().try_into().unwrap();
 /// decoder.load()?;
 /// decoder.attach(file)?;

+ 3 - 3
aya/src/programs/lsm.rs

@@ -33,10 +33,10 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError),
+/// #     Ebpf(#[from] aya::EbpfError),
 /// # }
-/// # let mut bpf = Bpf::load_file("ebpf_programs.o")?;
-/// use aya::{Bpf, programs::Lsm, BtfError, Btf};
+/// # let mut bpf = Ebpf::load_file("ebpf_programs.o")?;
+/// use aya::{Ebpf, programs::Lsm, BtfError, Btf};
 ///
 /// let btf = Btf::from_sys_fs()?;
 /// let program: &mut Lsm = bpf.program_mut("lsm_prog").unwrap().try_into()?;

+ 14 - 14
aya/src/programs/mod.rs

@@ -5,35 +5,35 @@
 //!
 //! # Loading and attaching programs
 //!
-//! When you call [`Bpf::load_file`] or [`Bpf::load`], all the programs included
+//! When you call [`Ebpf::load_file`] or [`Ebpf::load`], all the programs included
 //! in the object code are parsed and relocated. Programs are not loaded
 //! automatically though, since often you will need to do some application
 //! specific setup before you can actually load them.
 //!
-//! In order to load and attach a program, you need to retrieve it using [`Bpf::program_mut`],
+//! In order to load and attach a program, you need to retrieve it using [`Ebpf::program_mut`],
 //! then call the `load()` and `attach()` methods, for example:
 //!
 //! ```no_run
-//! use aya::{Bpf, programs::KProbe};
+//! use aya::{Ebpf, programs::KProbe};
 //!
-//! let mut bpf = Bpf::load_file("ebpf_programs.o")?;
+//! let mut bpf = Ebpf::load_file("ebpf_programs.o")?;
 //! // intercept_wakeups is the name of the program we want to load
 //! let program: &mut KProbe = bpf.program_mut("intercept_wakeups").unwrap().try_into()?;
 //! program.load()?;
 //! // intercept_wakeups will be called every time try_to_wake_up() is called
 //! // inside the kernel
 //! program.attach("try_to_wake_up", 0)?;
-//! # Ok::<(), aya::BpfError>(())
+//! # Ok::<(), aya::EbpfError>(())
 //! ```
 //!
 //! The signature of the `attach()` method varies depending on what kind of
 //! program you're trying to attach.
 //!
-//! [`Bpf::load_file`]: crate::Bpf::load_file
-//! [`Bpf::load`]: crate::Bpf::load
-//! [`Bpf::programs`]: crate::Bpf::programs
-//! [`Bpf::program`]: crate::Bpf::program
-//! [`Bpf::program_mut`]: crate::Bpf::program_mut
+//! [`Ebpf::load_file`]: crate::Ebpf::load_file
+//! [`Ebpf::load`]: crate::Ebpf::load
+//! [`Ebpf::programs`]: crate::Ebpf::programs
+//! [`Ebpf::program`]: crate::Ebpf::program
+//! [`Ebpf::program_mut`]: crate::Ebpf::program_mut
 //! [`maps`]: crate::maps
 
 // modules we don't export
@@ -124,7 +124,7 @@ use crate::{
         bpf_btf_get_fd_by_id, bpf_get_object, bpf_link_get_fd_by_id, bpf_link_get_info_by_fd,
         bpf_load_program, bpf_pin_object, bpf_prog_get_fd_by_id, bpf_prog_get_info_by_fd,
         bpf_prog_query, iter_link_ids, iter_prog_ids, retry_with_verifier_logs,
-        BpfLoadProgramAttrs, SyscallError,
+        EbpfLoadProgramAttrs, SyscallError,
     },
     util::{bytes_of_bpf_name, KernelVersion},
     VerifierLogLevel,
@@ -641,7 +641,7 @@ fn load_program<T: Link>(
         None
     };
 
-    let attr = BpfLoadProgramAttrs {
+    let attr = EbpfLoadProgramAttrs {
         name: prog_name,
         ty: prog_type,
         insns: instructions,
@@ -1117,8 +1117,8 @@ impl ProgramInfo {
 
 /// Returns an iterator over all loaded bpf programs.
 ///
-/// This differs from [`crate::Bpf::programs`] since it will return all programs
-/// listed on the host system and not only programs a specific [`crate::Bpf`] instance.
+/// This differs from [`crate::Ebpf::programs`] since it will return all programs
+/// listed on the host system and not only programs a specific [`crate::Ebpf`] instance.
 ///
 /// # Example
 /// ```

+ 2 - 2
aya/src/programs/perf_event.rs

@@ -98,9 +98,9 @@ pub enum PerfEventScope {
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::util::online_cpus;
 /// use aya::programs::perf_event::{
 ///     perf_sw_ids::PERF_COUNT_SW_CPU_CLOCK, PerfEvent, PerfEventScope, PerfTypeId, SamplePolicy,

+ 3 - 3
aya/src/programs/raw_trace_point.rs

@@ -24,13 +24,13 @@ use crate::{
 /// # Examples
 ///
 /// ```no_run
-/// # let mut bpf = Bpf::load_file("ebpf_programs.o")?;
-/// use aya::{Bpf, programs::RawTracePoint};
+/// # let mut bpf = Ebpf::load_file("ebpf_programs.o")?;
+/// use aya::{Ebpf, programs::RawTracePoint};
 ///
 /// let program: &mut RawTracePoint = bpf.program_mut("sys_enter").unwrap().try_into()?;
 /// program.load()?;
 /// program.attach("sys_enter")?;
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 #[derive(Debug)]
 #[doc(alias = "BPF_PROG_TYPE_RAW_TRACEPOINT")]

+ 2 - 2
aya/src/programs/sk_lookup.rs

@@ -32,9 +32,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use std::fs::File;
 /// use aya::programs::SkLookup;
 ///

+ 2 - 2
aya/src/programs/sk_msg.rs

@@ -33,9 +33,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use std::io::Write;
 /// use std::net::TcpStream;
 /// use std::os::fd::AsRawFd;

+ 2 - 2
aya/src/programs/sk_skb.rs

@@ -46,9 +46,9 @@ pub enum SkSkbKind {
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::maps::SockMap;
 /// use aya::programs::SkSkb;
 ///

+ 2 - 2
aya/src/programs/sock_ops.rs

@@ -31,9 +31,9 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use std::fs::File;
 /// use aya::programs::SockOps;
 ///

+ 4 - 4
aya/src/programs/socket_filter.rs

@@ -17,7 +17,7 @@ use crate::{
 pub enum SocketFilterError {
     /// Setting the `SO_ATTACH_BPF` socket option failed.
     #[error("setsockopt SO_ATTACH_BPF failed")]
-    SoAttachBpfError {
+    SoAttachEbpfError {
         /// original [`io::Error`]
         #[source]
         io_error: io::Error,
@@ -45,9 +45,9 @@ pub enum SocketFilterError {
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use std::net::TcpStream;
 /// use aya::programs::SocketFilter;
 ///
@@ -89,7 +89,7 @@ impl SocketFilter {
             )
         };
         if ret < 0 {
-            return Err(SocketFilterError::SoAttachBpfError {
+            return Err(SocketFilterError::SoAttachEbpfError {
                 io_error: io::Error::last_os_error(),
             }
             .into());

+ 2 - 2
aya/src/programs/tc.rs

@@ -55,9 +55,9 @@ pub enum TcAttachType {
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::programs::{tc, SchedClassifier, TcAttachType};
 ///
 /// // the clsact qdisc needs to be added before SchedClassifier programs can be

+ 3 - 3
aya/src/programs/tp_btf.rs

@@ -30,10 +30,10 @@ use crate::{
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError),
+/// #     Ebpf(#[from] aya::EbpfError),
 /// # }
-/// # let mut bpf = Bpf::load_file("ebpf_programs.o")?;
-/// use aya::{Bpf, programs::BtfTracePoint, BtfError, Btf};
+/// # let mut bpf = Ebpf::load_file("ebpf_programs.o")?;
+/// use aya::{Ebpf, programs::BtfTracePoint, BtfError, Btf};
 ///
 /// let btf = Btf::from_sys_fs()?;
 /// let program: &mut BtfTracePoint = bpf.program_mut("sched_process_fork").unwrap().try_into()?;

+ 2 - 2
aya/src/programs/trace_point.rs

@@ -50,9 +50,9 @@ pub enum TracePointError {
 /// #     #[error(transparent)]
 /// #     Program(#[from] aya::programs::ProgramError),
 /// #     #[error(transparent)]
-/// #     Bpf(#[from] aya::BpfError)
+/// #     Ebpf(#[from] aya::EbpfError)
 /// # }
-/// # let mut bpf = aya::Bpf::load(&[])?;
+/// # let mut bpf = aya::Ebpf::load(&[])?;
 /// use aya::programs::TracePoint;
 ///
 /// let prog: &mut TracePoint = bpf.program_mut("trace_context_switch").unwrap().try_into()?;

+ 3 - 3
aya/src/programs/xdp.rs

@@ -71,12 +71,12 @@ bitflags::bitflags! {
 /// # Examples
 ///
 /// ```no_run
-/// # let mut bpf = Bpf::load_file("ebpf_programs.o")?;
-/// use aya::{Bpf, programs::{Xdp, XdpFlags}};
+/// # let mut bpf = Ebpf::load_file("ebpf_programs.o")?;
+/// use aya::{Ebpf, programs::{Xdp, XdpFlags}};
 ///
 /// let program: &mut Xdp = bpf.program_mut("intercept_packets").unwrap().try_into()?;
 /// program.attach("eth0", XdpFlags::default())?;
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 #[derive(Debug)]
 #[doc(alias = "BPF_PROG_TYPE_XDP")]

+ 7 - 7
aya/src/sys/bpf.rs

@@ -12,7 +12,7 @@ use libc::{ENOENT, ENOSPC};
 use obj::{
     btf::{BtfEnum64, Enum64},
     maps::{bpf_map_def, LegacyMap},
-    BpfSectionKind, VerifierLog,
+    EbpfSectionKind, VerifierLog,
 };
 
 use crate::{
@@ -112,7 +112,7 @@ pub(crate) fn bpf_get_object(path: &CStr) -> SysResult<OwnedFd> {
     unsafe { fd_sys_bpf(bpf_cmd::BPF_OBJ_GET, &mut attr) }
 }
 
-pub(crate) struct BpfLoadProgramAttrs<'a> {
+pub(crate) struct EbpfLoadProgramAttrs<'a> {
     pub(crate) name: Option<CString>,
     pub(crate) ty: bpf_prog_type,
     pub(crate) insns: &'a [bpf_insn],
@@ -131,7 +131,7 @@ pub(crate) struct BpfLoadProgramAttrs<'a> {
 }
 
 pub(crate) fn bpf_load_program(
-    aya_attr: &BpfLoadProgramAttrs<'_>,
+    aya_attr: &EbpfLoadProgramAttrs<'_>,
     log_buf: &mut [u8],
     verifier_log_level: VerifierLogLevel,
 ) -> SysResult<OwnedFd> {
@@ -766,7 +766,7 @@ pub(crate) fn is_bpf_global_data_supported() -> bool {
                 ..Default::default()
             },
             section_index: 0,
-            section_kind: BpfSectionKind::Maps,
+            section_kind: EbpfSectionKind::Maps,
             symbol_index: None,
             data: Vec::new(),
         }),
@@ -993,7 +993,7 @@ fn bpf_prog_load(attr: &mut bpf_attr) -> SysResult<OwnedFd> {
 }
 
 fn sys_bpf(cmd: bpf_cmd, attr: &mut bpf_attr) -> SysResult<c_long> {
-    syscall(Syscall::Bpf { cmd, attr })
+    syscall(Syscall::Ebpf { cmd, attr })
 }
 
 fn bpf_obj_get_next_id(
@@ -1096,7 +1096,7 @@ mod tests {
     #[test]
     fn test_perf_link_supported() {
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_LINK_CREATE,
                 ..
             } => Err((-1, io::Error::from_raw_os_error(EBADF))),
@@ -1106,7 +1106,7 @@ mod tests {
         assert!(supported);
 
         override_syscall(|call| match call {
-            Syscall::Bpf {
+            Syscall::Ebpf {
                 cmd: bpf_cmd::BPF_LINK_CREATE,
                 ..
             } => Err((-1, io::Error::from_raw_os_error(EINVAL))),

+ 4 - 4
aya/src/sys/mod.rs

@@ -26,7 +26,7 @@ use crate::generated::{bpf_attr, bpf_cmd, perf_event_attr};
 pub(crate) type SysResult<T> = Result<T, (c_long, io::Error)>;
 
 pub(crate) enum Syscall<'a> {
-    Bpf {
+    Ebpf {
         cmd: bpf_cmd,
         attr: &'a mut bpf_attr,
     },
@@ -57,8 +57,8 @@ pub struct SyscallError {
 impl std::fmt::Debug for Syscall<'_> {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         match self {
-            Self::Bpf { cmd, attr: _ } => f
-                .debug_struct("Syscall::Bpf")
+            Self::Ebpf { cmd, attr: _ } => f
+                .debug_struct("Syscall::Ebpf")
                 .field("cmd", cmd)
                 .field("attr", &format_args!("_"))
                 .finish(),
@@ -93,7 +93,7 @@ fn syscall(call: Syscall<'_>) -> SysResult<c_long> {
     #[cfg_attr(test, allow(unreachable_code))]
     match unsafe {
         match call {
-            Syscall::Bpf { cmd, attr } => {
+            Syscall::Ebpf { cmd, attr } => {
                 libc::syscall(SYS_bpf, cmd, attr, mem::size_of::<bpf_attr>())
             }
             Syscall::PerfEventOpen {

+ 4 - 4
aya/src/util.rs

@@ -307,7 +307,7 @@ pub(crate) fn tc_handler_make(major: u32, minor: u32) -> u32 {
     (major & TC_H_MAJ_MASK) | (minor & TC_H_MIN_MASK)
 }
 
-/// Include bytes from a file for use in a subsequent [`crate::Bpf::load`].
+/// Include bytes from a file for use in a subsequent [`crate::Ebpf::load`].
 ///
 /// This macro differs from the standard `include_bytes!` macro since it also ensures that
 /// the bytes are correctly aligned to be parsed as an ELF binary. This avoid some nasty
@@ -315,13 +315,13 @@ pub(crate) fn tc_handler_make(major: u32, minor: u32) -> u32 {
 ///
 /// # Examples
 /// ```ignore
-/// use aya::{Bpf, include_bytes_aligned};
+/// use aya::{Ebpf, include_bytes_aligned};
 ///
-/// let mut bpf = Bpf::load(include_bytes_aligned!(
+/// let mut bpf = Ebpf::load(include_bytes_aligned!(
 ///     "/path/to/bpf.o"
 /// ))?;
 ///
-/// # Ok::<(), aya::BpfError>(())
+/// # Ok::<(), aya::EbpfError>(())
 /// ```
 #[macro_export]
 macro_rules! include_bytes_aligned {

+ 0 - 0
bpf/.cargo/config.toml → ebpf/.cargo/config.toml


+ 2 - 2
bpf/aya-bpf-bindings/Cargo.toml → ebpf/aya-ebpf-bindings/Cargo.toml

@@ -1,5 +1,5 @@
 [package]
-name = "aya-bpf-bindings"
+name = "aya-ebpf-bindings"
 version = "0.1.0"
 description = "Bindings for Linux Kernel eBPF types and helpers"
 authors.workspace = true
@@ -9,4 +9,4 @@ homepage.workspace = true
 edition.workspace = true
 
 [dependencies]
-aya-bpf-cty = { path = "../aya-bpf-cty" }
+aya-ebpf-cty = { path = "../aya-ebpf-cty" }

+ 0 - 0
bpf/aya-bpf-bindings/build.rs → ebpf/aya-ebpf-bindings/build.rs


+ 0 - 0
bpf/aya-bpf-bindings/include/bindings.h → ebpf/aya-ebpf-bindings/include/bindings.h


+ 81 - 81
bpf/aya-bpf-bindings/src/aarch64/bindings.rs → ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs

@@ -279,13 +279,13 @@ pub const TC_ACT_REDIRECT: u32 = 7;
 pub const TC_ACT_TRAP: u32 = 8;
 pub const TC_ACT_VALUE_MAX: u32 = 8;
 pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455;
-pub type __u8 = ::aya_bpf_cty::c_uchar;
-pub type __s16 = ::aya_bpf_cty::c_short;
-pub type __u16 = ::aya_bpf_cty::c_ushort;
-pub type __s32 = ::aya_bpf_cty::c_int;
-pub type __u32 = ::aya_bpf_cty::c_uint;
-pub type __s64 = ::aya_bpf_cty::c_longlong;
-pub type __u64 = ::aya_bpf_cty::c_ulonglong;
+pub type __u8 = ::aya_ebpf_cty::c_uchar;
+pub type __s16 = ::aya_ebpf_cty::c_short;
+pub type __u16 = ::aya_ebpf_cty::c_ushort;
+pub type __s32 = ::aya_ebpf_cty::c_int;
+pub type __u32 = ::aya_ebpf_cty::c_uint;
+pub type __s64 = ::aya_ebpf_cty::c_longlong;
+pub type __u64 = ::aya_ebpf_cty::c_ulonglong;
 pub type __be16 = __u16;
 pub type __be32 = __u32;
 pub type __wsum = __u32;
@@ -301,7 +301,7 @@ pub const BPF_REG_8: _bindgen_ty_1 = 8;
 pub const BPF_REG_9: _bindgen_ty_1 = 9;
 pub const BPF_REG_10: _bindgen_ty_1 = 10;
 pub const __MAX_BPF_REG: _bindgen_ty_1 = 11;
-pub type _bindgen_ty_1 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_1 = ::aya_ebpf_cty::c_uint;
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct bpf_insn {
@@ -361,7 +361,7 @@ pub struct bpf_cgroup_storage_key {
     pub attach_type: __u32,
 }
 pub mod bpf_cgroup_iter_order {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_CGROUP_ITER_ORDER_UNSPEC: Type = 0;
     pub const BPF_CGROUP_ITER_SELF_ONLY: Type = 1;
     pub const BPF_CGROUP_ITER_DESCENDANTS_PRE: Type = 2;
@@ -395,7 +395,7 @@ pub struct bpf_iter_link_info__bindgen_ty_3 {
     pub pid_fd: __u32,
 }
 pub mod bpf_cmd {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_MAP_CREATE: Type = 0;
     pub const BPF_MAP_LOOKUP_ELEM: Type = 1;
     pub const BPF_MAP_UPDATE_ELEM: Type = 2;
@@ -435,7 +435,7 @@ pub mod bpf_cmd {
     pub const BPF_PROG_BIND_MAP: Type = 35;
 }
 pub mod bpf_map_type {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_MAP_TYPE_UNSPEC: Type = 0;
     pub const BPF_MAP_TYPE_HASH: Type = 1;
     pub const BPF_MAP_TYPE_ARRAY: Type = 2;
@@ -472,7 +472,7 @@ pub mod bpf_map_type {
     pub const BPF_MAP_TYPE_CGRP_STORAGE: Type = 32;
 }
 pub mod bpf_prog_type {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_PROG_TYPE_UNSPEC: Type = 0;
     pub const BPF_PROG_TYPE_SOCKET_FILTER: Type = 1;
     pub const BPF_PROG_TYPE_KPROBE: Type = 2;
@@ -508,7 +508,7 @@ pub mod bpf_prog_type {
     pub const BPF_PROG_TYPE_NETFILTER: Type = 32;
 }
 pub mod bpf_attach_type {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_CGROUP_INET_INGRESS: Type = 0;
     pub const BPF_CGROUP_INET_EGRESS: Type = 1;
     pub const BPF_CGROUP_INET_SOCK_CREATE: Type = 2;
@@ -557,7 +557,7 @@ pub mod bpf_attach_type {
     pub const __MAX_BPF_ATTACH_TYPE: Type = 45;
 }
 pub mod bpf_link_type {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_LINK_TYPE_UNSPEC: Type = 0;
     pub const BPF_LINK_TYPE_RAW_TRACEPOINT: Type = 1;
     pub const BPF_LINK_TYPE_TRACING: Type = 2;
@@ -575,7 +575,7 @@ pub const BPF_ANY: _bindgen_ty_2 = 0;
 pub const BPF_NOEXIST: _bindgen_ty_2 = 1;
 pub const BPF_EXIST: _bindgen_ty_2 = 2;
 pub const BPF_F_LOCK: _bindgen_ty_2 = 4;
-pub type _bindgen_ty_2 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_2 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_NO_PREALLOC: _bindgen_ty_3 = 1;
 pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_3 = 2;
 pub const BPF_F_NUMA_NODE: _bindgen_ty_3 = 4;
@@ -591,13 +591,13 @@ pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_3 = 2048;
 pub const BPF_F_INNER_MAP: _bindgen_ty_3 = 4096;
 pub const BPF_F_LINK: _bindgen_ty_3 = 8192;
 pub const BPF_F_PATH_FD: _bindgen_ty_3 = 16384;
-pub type _bindgen_ty_3 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_3 = ::aya_ebpf_cty::c_uint;
 pub mod bpf_stats_type {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_STATS_RUN_TIME: Type = 0;
 }
 pub mod bpf_stack_build_id_status {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_STACK_BUILD_ID_EMPTY: Type = 0;
     pub const BPF_STACK_BUILD_ID_VALID: Type = 1;
     pub const BPF_STACK_BUILD_ID_IP: Type = 2;
@@ -606,7 +606,7 @@ pub mod bpf_stack_build_id_status {
 #[derive(Copy, Clone)]
 pub struct bpf_stack_build_id {
     pub status: __s32,
-    pub build_id: [::aya_bpf_cty::c_uchar; 20usize],
+    pub build_id: [::aya_ebpf_cty::c_uchar; 20usize],
     pub __bindgen_anon_1: bpf_stack_build_id__bindgen_ty_1,
 }
 #[repr(C)]
@@ -648,7 +648,7 @@ pub struct bpf_attr__bindgen_ty_1 {
     pub map_flags: __u32,
     pub inner_map_fd: __u32,
     pub numa_node: __u32,
-    pub map_name: [::aya_bpf_cty::c_char; 16usize],
+    pub map_name: [::aya_ebpf_cty::c_char; 16usize],
     pub map_ifindex: __u32,
     pub btf_fd: __u32,
     pub btf_key_type_id: __u32,
@@ -694,7 +694,7 @@ pub struct bpf_attr__bindgen_ty_4 {
     pub log_buf: __u64,
     pub kern_version: __u32,
     pub prog_flags: __u32,
-    pub prog_name: [::aya_bpf_cty::c_char; 16usize],
+    pub prog_name: [::aya_ebpf_cty::c_char; 16usize],
     pub prog_ifindex: __u32,
     pub expected_attach_type: __u32,
     pub prog_btf_fd: __u32,
@@ -926,7 +926,7 @@ pub struct bpf_attr__bindgen_ty_19 {
     pub flags: __u32,
 }
 pub mod bpf_func_id {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_FUNC_unspec: Type = 0;
     pub const BPF_FUNC_map_lookup_elem: Type = 1;
     pub const BPF_FUNC_map_update_elem: Type = 2;
@@ -1143,41 +1143,41 @@ pub mod bpf_func_id {
 }
 pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_4 = 1;
 pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_4 = 2;
-pub type _bindgen_ty_4 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_4 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_5 = 15;
-pub type _bindgen_ty_5 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_5 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_PSEUDO_HDR: _bindgen_ty_6 = 16;
 pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_6 = 32;
 pub const BPF_F_MARK_ENFORCE: _bindgen_ty_6 = 64;
-pub type _bindgen_ty_6 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_6 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_INGRESS: _bindgen_ty_7 = 1;
-pub type _bindgen_ty_7 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_7 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_8 = 1;
-pub type _bindgen_ty_8 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_8 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_9 = 255;
 pub const BPF_F_USER_STACK: _bindgen_ty_9 = 256;
 pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_9 = 512;
 pub const BPF_F_REUSE_STACKID: _bindgen_ty_9 = 1024;
 pub const BPF_F_USER_BUILD_ID: _bindgen_ty_9 = 2048;
-pub type _bindgen_ty_9 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_9 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_10 = 2;
 pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_10 = 4;
 pub const BPF_F_SEQ_NUMBER: _bindgen_ty_10 = 8;
 pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_10 = 16;
-pub type _bindgen_ty_10 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_10 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_11 = 16;
-pub type _bindgen_ty_11 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_11 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_INDEX_MASK: _bindgen_ty_12 = 4294967295;
 pub const BPF_F_CURRENT_CPU: _bindgen_ty_12 = 4294967295;
 pub const BPF_F_CTXLEN_MASK: _bindgen_ty_12 = 4503595332403200;
-pub type _bindgen_ty_12 = ::aya_bpf_cty::c_ulong;
+pub type _bindgen_ty_12 = ::aya_ebpf_cty::c_ulong;
 pub const BPF_F_CURRENT_NETNS: _bindgen_ty_13 = -1;
-pub type _bindgen_ty_13 = ::aya_bpf_cty::c_int;
+pub type _bindgen_ty_13 = ::aya_ebpf_cty::c_int;
 pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_14 = 0;
 pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_14 = 1;
 pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_14 = 2;
 pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_14 = 3;
-pub type _bindgen_ty_14 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_14 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_15 = 1;
 pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_15 = 2;
 pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_15 = 4;
@@ -1187,55 +1187,55 @@ pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_15 = 32;
 pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_15 = 64;
 pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_15 = 128;
 pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_15 = 256;
-pub type _bindgen_ty_15 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_15 = ::aya_ebpf_cty::c_uint;
 pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_16 = 255;
 pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_16 = 56;
-pub type _bindgen_ty_16 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_16 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_17 = 1;
-pub type _bindgen_ty_17 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_17 = ::aya_ebpf_cty::c_uint;
 pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_18 = 1;
 pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_18 = 1;
-pub type _bindgen_ty_18 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_18 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_19 = 1;
-pub type _bindgen_ty_19 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_19 = ::aya_ebpf_cty::c_uint;
 pub const BPF_RB_NO_WAKEUP: _bindgen_ty_20 = 1;
 pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_20 = 2;
-pub type _bindgen_ty_20 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_20 = ::aya_ebpf_cty::c_uint;
 pub const BPF_RB_AVAIL_DATA: _bindgen_ty_21 = 0;
 pub const BPF_RB_RING_SIZE: _bindgen_ty_21 = 1;
 pub const BPF_RB_CONS_POS: _bindgen_ty_21 = 2;
 pub const BPF_RB_PROD_POS: _bindgen_ty_21 = 3;
-pub type _bindgen_ty_21 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_21 = ::aya_ebpf_cty::c_uint;
 pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_22 = 2147483648;
 pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_22 = 1073741824;
 pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_22 = 8;
-pub type _bindgen_ty_22 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_22 = ::aya_ebpf_cty::c_uint;
 pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_23 = 1;
 pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_23 = 2;
-pub type _bindgen_ty_23 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_23 = ::aya_ebpf_cty::c_uint;
 pub mod bpf_adj_room_mode {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_ADJ_ROOM_NET: Type = 0;
     pub const BPF_ADJ_ROOM_MAC: Type = 1;
 }
 pub mod bpf_hdr_start_off {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_HDR_START_MAC: Type = 0;
     pub const BPF_HDR_START_NET: Type = 1;
 }
 pub mod bpf_lwt_encap_mode {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_LWT_ENCAP_SEG6: Type = 0;
     pub const BPF_LWT_ENCAP_SEG6_INLINE: Type = 1;
     pub const BPF_LWT_ENCAP_IP: Type = 2;
 }
 pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_24 = 1;
-pub type _bindgen_ty_24 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_24 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_BROADCAST: _bindgen_ty_25 = 8;
 pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_25 = 16;
-pub type _bindgen_ty_25 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_25 = ::aya_ebpf_cty::c_uint;
 pub mod _bindgen_ty_26 {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_SKB_TSTAMP_UNSPEC: Type = 0;
     pub const BPF_SKB_TSTAMP_DELIVERY_MONO: Type = 1;
 }
@@ -1359,7 +1359,7 @@ pub union bpf_xfrm_state__bindgen_ty_1 {
     pub remote_ipv6: [__u32; 4usize],
 }
 pub mod bpf_ret_code {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_OK: Type = 0;
     pub const BPF_DROP: Type = 2;
     pub const BPF_REDIRECT: Type = 7;
@@ -1456,7 +1456,7 @@ pub struct bpf_xdp_sock {
     pub queue_id: __u32,
 }
 pub mod xdp_action {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const XDP_ABORTED: Type = 0;
     pub const XDP_DROP: Type = 1;
     pub const XDP_PASS: Type = 2;
@@ -1482,7 +1482,7 @@ pub struct bpf_devmap_val {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub union bpf_devmap_val__bindgen_ty_1 {
-    pub fd: ::aya_bpf_cty::c_int,
+    pub fd: ::aya_ebpf_cty::c_int,
     pub id: __u32,
 }
 #[repr(C)]
@@ -1494,11 +1494,11 @@ pub struct bpf_cpumap_val {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub union bpf_cpumap_val__bindgen_ty_1 {
-    pub fd: ::aya_bpf_cty::c_int,
+    pub fd: ::aya_ebpf_cty::c_int,
     pub id: __u32,
 }
 pub mod sk_action {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const SK_DROP: Type = 0;
     pub const SK_PASS: Type = 1;
 }
@@ -1520,7 +1520,7 @@ pub struct sk_msg_md {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub union sk_msg_md__bindgen_ty_1 {
-    pub data: *mut ::aya_bpf_cty::c_void,
+    pub data: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -1534,7 +1534,7 @@ impl sk_msg_md__bindgen_ty_1 {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub union sk_msg_md__bindgen_ty_2 {
-    pub data_end: *mut ::aya_bpf_cty::c_void,
+    pub data_end: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -1575,7 +1575,7 @@ pub struct sk_reuseport_md {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub union sk_reuseport_md__bindgen_ty_1 {
-    pub data: *mut ::aya_bpf_cty::c_void,
+    pub data: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -1589,7 +1589,7 @@ impl sk_reuseport_md__bindgen_ty_1 {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub union sk_reuseport_md__bindgen_ty_2 {
-    pub data_end: *mut ::aya_bpf_cty::c_void,
+    pub data_end: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -1642,7 +1642,7 @@ pub struct bpf_prog_info {
     pub created_by_uid: __u32,
     pub nr_map_ids: __u32,
     pub map_ids: __u64,
-    pub name: [::aya_bpf_cty::c_char; 16usize],
+    pub name: [::aya_ebpf_cty::c_char; 16usize],
     pub ifindex: __u32,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
@@ -1702,7 +1702,7 @@ pub struct bpf_map_info {
     pub value_size: __u32,
     pub max_entries: __u32,
     pub map_flags: __u32,
-    pub name: [::aya_bpf_cty::c_char; 16usize],
+    pub name: [::aya_ebpf_cty::c_char; 16usize],
     pub ifindex: __u32,
     pub btf_vmlinux_value_type_id: __u32,
     pub netns_dev: __u64,
@@ -1927,7 +1927,7 @@ impl bpf_sock_ops__bindgen_ty_2 {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub union bpf_sock_ops__bindgen_ty_3 {
-    pub skb_data: *mut ::aya_bpf_cty::c_void,
+    pub skb_data: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -1941,7 +1941,7 @@ impl bpf_sock_ops__bindgen_ty_3 {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub union bpf_sock_ops__bindgen_ty_4 {
-    pub skb_data_end: *mut ::aya_bpf_cty::c_void,
+    pub skb_data_end: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -1960,7 +1960,7 @@ pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_27 = 16;
 pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_27 = 32;
 pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_27 = 64;
 pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_27 = 127;
-pub type _bindgen_ty_27 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_27 = ::aya_ebpf_cty::c_uint;
 pub const BPF_SOCK_OPS_VOID: _bindgen_ty_28 = 0;
 pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_28 = 1;
 pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_28 = 2;
@@ -1977,7 +1977,7 @@ pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_28 = 12;
 pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_28 = 13;
 pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_28 = 14;
 pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_28 = 15;
-pub type _bindgen_ty_28 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_28 = ::aya_ebpf_cty::c_uint;
 pub const BPF_TCP_ESTABLISHED: _bindgen_ty_29 = 1;
 pub const BPF_TCP_SYN_SENT: _bindgen_ty_29 = 2;
 pub const BPF_TCP_SYN_RECV: _bindgen_ty_29 = 3;
@@ -1991,13 +1991,13 @@ pub const BPF_TCP_LISTEN: _bindgen_ty_29 = 10;
 pub const BPF_TCP_CLOSING: _bindgen_ty_29 = 11;
 pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_29 = 12;
 pub const BPF_TCP_MAX_STATES: _bindgen_ty_29 = 13;
-pub type _bindgen_ty_29 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_29 = ::aya_ebpf_cty::c_uint;
 pub mod _bindgen_ty_31 {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1;
 }
 pub mod _bindgen_ty_32 {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1;
     pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2;
 }
@@ -2011,10 +2011,10 @@ pub struct bpf_perf_event_value {
 pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_33 = 1;
 pub const BPF_DEVCG_ACC_READ: _bindgen_ty_33 = 2;
 pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_33 = 4;
-pub type _bindgen_ty_33 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_33 = ::aya_ebpf_cty::c_uint;
 pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_34 = 1;
 pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_34 = 2;
-pub type _bindgen_ty_34 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_34 = ::aya_ebpf_cty::c_uint;
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct bpf_cgroup_dev_ctx {
@@ -2030,7 +2030,7 @@ pub struct bpf_raw_tracepoint_args {
 pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_35 = 1;
 pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_35 = 2;
 pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_35 = 4;
-pub type _bindgen_ty_35 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_35 = ::aya_ebpf_cty::c_uint;
 pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_36 = 0;
 pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_36 = 1;
 pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_36 = 2;
@@ -2040,7 +2040,7 @@ pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_36 = 5;
 pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_36 = 6;
 pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_36 = 7;
 pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_36 = 8;
-pub type _bindgen_ty_36 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_36 = ::aya_ebpf_cty::c_uint;
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub struct bpf_fib_lookup {
@@ -2096,17 +2096,17 @@ pub union bpf_redir_neigh__bindgen_ty_1 {
     pub ipv6_nh: [__u32; 4usize],
 }
 pub mod bpf_check_mtu_flags {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_MTU_CHK_SEGS: Type = 1;
 }
 pub mod bpf_check_mtu_ret {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_MTU_CHK_RET_SUCCESS: Type = 0;
     pub const BPF_MTU_CHK_RET_FRAG_NEEDED: Type = 1;
     pub const BPF_MTU_CHK_RET_SEGS_TOOBIG: Type = 2;
 }
 pub mod bpf_task_fd_type {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_FD_TYPE_RAW_TRACEPOINT: Type = 0;
     pub const BPF_FD_TYPE_TRACEPOINT: Type = 1;
     pub const BPF_FD_TYPE_KPROBE: Type = 2;
@@ -2117,7 +2117,7 @@ pub mod bpf_task_fd_type {
 pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_37 = 1;
 pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_37 = 2;
 pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_37 = 4;
-pub type _bindgen_ty_37 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_37 = ::aya_ebpf_cty::c_uint;
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub struct bpf_flow_keys {
@@ -2304,7 +2304,7 @@ impl bpf_sockopt__bindgen_ty_1 {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub union bpf_sockopt__bindgen_ty_2 {
-    pub optval: *mut ::aya_bpf_cty::c_void,
+    pub optval: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -2318,7 +2318,7 @@ impl bpf_sockopt__bindgen_ty_2 {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub union bpf_sockopt__bindgen_ty_3 {
-    pub optval_end: *mut ::aya_bpf_cty::c_void,
+    pub optval_end: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -2381,12 +2381,12 @@ impl bpf_sk_lookup {
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct btf_ptr {
-    pub ptr: *mut ::aya_bpf_cty::c_void,
+    pub ptr: *mut ::aya_ebpf_cty::c_void,
     pub type_id: __u32,
     pub flags: __u32,
 }
 pub mod bpf_core_relo_kind {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_CORE_FIELD_BYTE_OFFSET: Type = 0;
     pub const BPF_CORE_FIELD_BYTE_SIZE: Type = 1;
     pub const BPF_CORE_FIELD_EXISTS: Type = 2;
@@ -2410,7 +2410,7 @@ pub struct bpf_core_relo {
     pub kind: bpf_core_relo_kind::Type,
 }
 pub const BPF_F_TIMER_ABS: _bindgen_ty_39 = 1;
-pub type _bindgen_ty_39 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_39 = ::aya_ebpf_cty::c_uint;
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct bpf_iter_num {
@@ -2424,12 +2424,12 @@ pub struct user_pt_regs {
     pub pc: __u64,
     pub pstate: __u64,
 }
-pub type sa_family_t = ::aya_bpf_cty::c_ushort;
+pub type sa_family_t = ::aya_ebpf_cty::c_ushort;
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct sockaddr {
     pub sa_family: sa_family_t,
-    pub sa_data: [::aya_bpf_cty::c_char; 14usize],
+    pub sa_data: [::aya_ebpf_cty::c_char; 14usize],
 }
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]

File diff suppressed because it is too large
+ 260 - 260
ebpf/aya-ebpf-bindings/src/aarch64/helpers.rs


+ 0 - 0
bpf/aya-bpf-bindings/src/aarch64/mod.rs → ebpf/aya-ebpf-bindings/src/aarch64/mod.rs


+ 82 - 82
bpf/aya-bpf-bindings/src/armv7/bindings.rs → ebpf/aya-ebpf-bindings/src/armv7/bindings.rs

@@ -274,13 +274,13 @@ pub const TC_ACT_REDIRECT: u32 = 7;
 pub const TC_ACT_TRAP: u32 = 8;
 pub const TC_ACT_VALUE_MAX: u32 = 8;
 pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455;
-pub type __u8 = ::aya_bpf_cty::c_uchar;
-pub type __s16 = ::aya_bpf_cty::c_short;
-pub type __u16 = ::aya_bpf_cty::c_ushort;
-pub type __s32 = ::aya_bpf_cty::c_int;
-pub type __u32 = ::aya_bpf_cty::c_uint;
-pub type __s64 = ::aya_bpf_cty::c_longlong;
-pub type __u64 = ::aya_bpf_cty::c_ulonglong;
+pub type __u8 = ::aya_ebpf_cty::c_uchar;
+pub type __s16 = ::aya_ebpf_cty::c_short;
+pub type __u16 = ::aya_ebpf_cty::c_ushort;
+pub type __s32 = ::aya_ebpf_cty::c_int;
+pub type __u32 = ::aya_ebpf_cty::c_uint;
+pub type __s64 = ::aya_ebpf_cty::c_longlong;
+pub type __u64 = ::aya_ebpf_cty::c_ulonglong;
 pub type __be16 = __u16;
 pub type __be32 = __u32;
 pub type __wsum = __u32;
@@ -296,7 +296,7 @@ pub const BPF_REG_8: _bindgen_ty_1 = 8;
 pub const BPF_REG_9: _bindgen_ty_1 = 9;
 pub const BPF_REG_10: _bindgen_ty_1 = 10;
 pub const __MAX_BPF_REG: _bindgen_ty_1 = 11;
-pub type _bindgen_ty_1 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_1 = ::aya_ebpf_cty::c_uint;
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct bpf_insn {
@@ -356,7 +356,7 @@ pub struct bpf_cgroup_storage_key {
     pub attach_type: __u32,
 }
 pub mod bpf_cgroup_iter_order {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_CGROUP_ITER_ORDER_UNSPEC: Type = 0;
     pub const BPF_CGROUP_ITER_SELF_ONLY: Type = 1;
     pub const BPF_CGROUP_ITER_DESCENDANTS_PRE: Type = 2;
@@ -390,7 +390,7 @@ pub struct bpf_iter_link_info__bindgen_ty_3 {
     pub pid_fd: __u32,
 }
 pub mod bpf_cmd {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_MAP_CREATE: Type = 0;
     pub const BPF_MAP_LOOKUP_ELEM: Type = 1;
     pub const BPF_MAP_UPDATE_ELEM: Type = 2;
@@ -430,7 +430,7 @@ pub mod bpf_cmd {
     pub const BPF_PROG_BIND_MAP: Type = 35;
 }
 pub mod bpf_map_type {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_MAP_TYPE_UNSPEC: Type = 0;
     pub const BPF_MAP_TYPE_HASH: Type = 1;
     pub const BPF_MAP_TYPE_ARRAY: Type = 2;
@@ -467,7 +467,7 @@ pub mod bpf_map_type {
     pub const BPF_MAP_TYPE_CGRP_STORAGE: Type = 32;
 }
 pub mod bpf_prog_type {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_PROG_TYPE_UNSPEC: Type = 0;
     pub const BPF_PROG_TYPE_SOCKET_FILTER: Type = 1;
     pub const BPF_PROG_TYPE_KPROBE: Type = 2;
@@ -503,7 +503,7 @@ pub mod bpf_prog_type {
     pub const BPF_PROG_TYPE_NETFILTER: Type = 32;
 }
 pub mod bpf_attach_type {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_CGROUP_INET_INGRESS: Type = 0;
     pub const BPF_CGROUP_INET_EGRESS: Type = 1;
     pub const BPF_CGROUP_INET_SOCK_CREATE: Type = 2;
@@ -552,7 +552,7 @@ pub mod bpf_attach_type {
     pub const __MAX_BPF_ATTACH_TYPE: Type = 45;
 }
 pub mod bpf_link_type {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_LINK_TYPE_UNSPEC: Type = 0;
     pub const BPF_LINK_TYPE_RAW_TRACEPOINT: Type = 1;
     pub const BPF_LINK_TYPE_TRACING: Type = 2;
@@ -570,7 +570,7 @@ pub const BPF_ANY: _bindgen_ty_2 = 0;
 pub const BPF_NOEXIST: _bindgen_ty_2 = 1;
 pub const BPF_EXIST: _bindgen_ty_2 = 2;
 pub const BPF_F_LOCK: _bindgen_ty_2 = 4;
-pub type _bindgen_ty_2 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_2 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_NO_PREALLOC: _bindgen_ty_3 = 1;
 pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_3 = 2;
 pub const BPF_F_NUMA_NODE: _bindgen_ty_3 = 4;
@@ -586,13 +586,13 @@ pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_3 = 2048;
 pub const BPF_F_INNER_MAP: _bindgen_ty_3 = 4096;
 pub const BPF_F_LINK: _bindgen_ty_3 = 8192;
 pub const BPF_F_PATH_FD: _bindgen_ty_3 = 16384;
-pub type _bindgen_ty_3 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_3 = ::aya_ebpf_cty::c_uint;
 pub mod bpf_stats_type {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_STATS_RUN_TIME: Type = 0;
 }
 pub mod bpf_stack_build_id_status {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_STACK_BUILD_ID_EMPTY: Type = 0;
     pub const BPF_STACK_BUILD_ID_VALID: Type = 1;
     pub const BPF_STACK_BUILD_ID_IP: Type = 2;
@@ -601,7 +601,7 @@ pub mod bpf_stack_build_id_status {
 #[derive(Copy, Clone)]
 pub struct bpf_stack_build_id {
     pub status: __s32,
-    pub build_id: [::aya_bpf_cty::c_uchar; 20usize],
+    pub build_id: [::aya_ebpf_cty::c_uchar; 20usize],
     pub __bindgen_anon_1: bpf_stack_build_id__bindgen_ty_1,
 }
 #[repr(C)]
@@ -643,7 +643,7 @@ pub struct bpf_attr__bindgen_ty_1 {
     pub map_flags: __u32,
     pub inner_map_fd: __u32,
     pub numa_node: __u32,
-    pub map_name: [::aya_bpf_cty::c_char; 16usize],
+    pub map_name: [::aya_ebpf_cty::c_char; 16usize],
     pub map_ifindex: __u32,
     pub btf_fd: __u32,
     pub btf_key_type_id: __u32,
@@ -689,7 +689,7 @@ pub struct bpf_attr__bindgen_ty_4 {
     pub log_buf: __u64,
     pub kern_version: __u32,
     pub prog_flags: __u32,
-    pub prog_name: [::aya_bpf_cty::c_char; 16usize],
+    pub prog_name: [::aya_ebpf_cty::c_char; 16usize],
     pub prog_ifindex: __u32,
     pub expected_attach_type: __u32,
     pub prog_btf_fd: __u32,
@@ -921,7 +921,7 @@ pub struct bpf_attr__bindgen_ty_19 {
     pub flags: __u32,
 }
 pub mod bpf_func_id {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_FUNC_unspec: Type = 0;
     pub const BPF_FUNC_map_lookup_elem: Type = 1;
     pub const BPF_FUNC_map_update_elem: Type = 2;
@@ -1138,41 +1138,41 @@ pub mod bpf_func_id {
 }
 pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_4 = 1;
 pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_4 = 2;
-pub type _bindgen_ty_4 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_4 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_5 = 15;
-pub type _bindgen_ty_5 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_5 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_PSEUDO_HDR: _bindgen_ty_6 = 16;
 pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_6 = 32;
 pub const BPF_F_MARK_ENFORCE: _bindgen_ty_6 = 64;
-pub type _bindgen_ty_6 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_6 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_INGRESS: _bindgen_ty_7 = 1;
-pub type _bindgen_ty_7 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_7 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_8 = 1;
-pub type _bindgen_ty_8 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_8 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_9 = 255;
 pub const BPF_F_USER_STACK: _bindgen_ty_9 = 256;
 pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_9 = 512;
 pub const BPF_F_REUSE_STACKID: _bindgen_ty_9 = 1024;
 pub const BPF_F_USER_BUILD_ID: _bindgen_ty_9 = 2048;
-pub type _bindgen_ty_9 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_9 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_10 = 2;
 pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_10 = 4;
 pub const BPF_F_SEQ_NUMBER: _bindgen_ty_10 = 8;
 pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_10 = 16;
-pub type _bindgen_ty_10 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_10 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_11 = 16;
-pub type _bindgen_ty_11 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_11 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_INDEX_MASK: _bindgen_ty_12 = 4294967295;
 pub const BPF_F_CURRENT_CPU: _bindgen_ty_12 = 4294967295;
 pub const BPF_F_CTXLEN_MASK: _bindgen_ty_12 = 4503595332403200;
-pub type _bindgen_ty_12 = ::aya_bpf_cty::c_ulonglong;
+pub type _bindgen_ty_12 = ::aya_ebpf_cty::c_ulonglong;
 pub const BPF_F_CURRENT_NETNS: _bindgen_ty_13 = -1;
-pub type _bindgen_ty_13 = ::aya_bpf_cty::c_int;
+pub type _bindgen_ty_13 = ::aya_ebpf_cty::c_int;
 pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_14 = 0;
 pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_14 = 1;
 pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_14 = 2;
 pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_14 = 3;
-pub type _bindgen_ty_14 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_14 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_15 = 1;
 pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_15 = 2;
 pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_15 = 4;
@@ -1182,55 +1182,55 @@ pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_15 = 32;
 pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_15 = 64;
 pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_15 = 128;
 pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_15 = 256;
-pub type _bindgen_ty_15 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_15 = ::aya_ebpf_cty::c_uint;
 pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_16 = 255;
 pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_16 = 56;
-pub type _bindgen_ty_16 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_16 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_17 = 1;
-pub type _bindgen_ty_17 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_17 = ::aya_ebpf_cty::c_uint;
 pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_18 = 1;
 pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_18 = 1;
-pub type _bindgen_ty_18 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_18 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_19 = 1;
-pub type _bindgen_ty_19 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_19 = ::aya_ebpf_cty::c_uint;
 pub const BPF_RB_NO_WAKEUP: _bindgen_ty_20 = 1;
 pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_20 = 2;
-pub type _bindgen_ty_20 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_20 = ::aya_ebpf_cty::c_uint;
 pub const BPF_RB_AVAIL_DATA: _bindgen_ty_21 = 0;
 pub const BPF_RB_RING_SIZE: _bindgen_ty_21 = 1;
 pub const BPF_RB_CONS_POS: _bindgen_ty_21 = 2;
 pub const BPF_RB_PROD_POS: _bindgen_ty_21 = 3;
-pub type _bindgen_ty_21 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_21 = ::aya_ebpf_cty::c_uint;
 pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_22 = 2147483648;
 pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_22 = 1073741824;
 pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_22 = 8;
-pub type _bindgen_ty_22 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_22 = ::aya_ebpf_cty::c_uint;
 pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_23 = 1;
 pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_23 = 2;
-pub type _bindgen_ty_23 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_23 = ::aya_ebpf_cty::c_uint;
 pub mod bpf_adj_room_mode {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_ADJ_ROOM_NET: Type = 0;
     pub const BPF_ADJ_ROOM_MAC: Type = 1;
 }
 pub mod bpf_hdr_start_off {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_HDR_START_MAC: Type = 0;
     pub const BPF_HDR_START_NET: Type = 1;
 }
 pub mod bpf_lwt_encap_mode {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_LWT_ENCAP_SEG6: Type = 0;
     pub const BPF_LWT_ENCAP_SEG6_INLINE: Type = 1;
     pub const BPF_LWT_ENCAP_IP: Type = 2;
 }
 pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_24 = 1;
-pub type _bindgen_ty_24 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_24 = ::aya_ebpf_cty::c_uint;
 pub const BPF_F_BROADCAST: _bindgen_ty_25 = 8;
 pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_25 = 16;
-pub type _bindgen_ty_25 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_25 = ::aya_ebpf_cty::c_uint;
 pub mod _bindgen_ty_26 {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_SKB_TSTAMP_UNSPEC: Type = 0;
     pub const BPF_SKB_TSTAMP_DELIVERY_MONO: Type = 1;
 }
@@ -1356,7 +1356,7 @@ pub union bpf_xfrm_state__bindgen_ty_1 {
     pub remote_ipv6: [__u32; 4usize],
 }
 pub mod bpf_ret_code {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_OK: Type = 0;
     pub const BPF_DROP: Type = 2;
     pub const BPF_REDIRECT: Type = 7;
@@ -1453,7 +1453,7 @@ pub struct bpf_xdp_sock {
     pub queue_id: __u32,
 }
 pub mod xdp_action {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const XDP_ABORTED: Type = 0;
     pub const XDP_DROP: Type = 1;
     pub const XDP_PASS: Type = 2;
@@ -1479,7 +1479,7 @@ pub struct bpf_devmap_val {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub union bpf_devmap_val__bindgen_ty_1 {
-    pub fd: ::aya_bpf_cty::c_int,
+    pub fd: ::aya_ebpf_cty::c_int,
     pub id: __u32,
 }
 #[repr(C)]
@@ -1491,11 +1491,11 @@ pub struct bpf_cpumap_val {
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub union bpf_cpumap_val__bindgen_ty_1 {
-    pub fd: ::aya_bpf_cty::c_int,
+    pub fd: ::aya_ebpf_cty::c_int,
     pub id: __u32,
 }
 pub mod sk_action {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const SK_DROP: Type = 0;
     pub const SK_PASS: Type = 1;
 }
@@ -1518,7 +1518,7 @@ pub struct sk_msg_md {
 #[repr(align(8))]
 #[derive(Copy, Clone)]
 pub union sk_msg_md__bindgen_ty_1 {
-    pub data: *mut ::aya_bpf_cty::c_void,
+    pub data: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -1533,7 +1533,7 @@ impl sk_msg_md__bindgen_ty_1 {
 #[repr(align(8))]
 #[derive(Copy, Clone)]
 pub union sk_msg_md__bindgen_ty_2 {
-    pub data_end: *mut ::aya_bpf_cty::c_void,
+    pub data_end: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -1576,7 +1576,7 @@ pub struct sk_reuseport_md {
 #[repr(align(8))]
 #[derive(Copy, Clone)]
 pub union sk_reuseport_md__bindgen_ty_1 {
-    pub data: *mut ::aya_bpf_cty::c_void,
+    pub data: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -1591,7 +1591,7 @@ impl sk_reuseport_md__bindgen_ty_1 {
 #[repr(align(8))]
 #[derive(Copy, Clone)]
 pub union sk_reuseport_md__bindgen_ty_2 {
-    pub data_end: *mut ::aya_bpf_cty::c_void,
+    pub data_end: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -1646,7 +1646,7 @@ pub struct bpf_prog_info {
     pub created_by_uid: __u32,
     pub nr_map_ids: __u32,
     pub map_ids: __u64,
-    pub name: [::aya_bpf_cty::c_char; 16usize],
+    pub name: [::aya_ebpf_cty::c_char; 16usize],
     pub ifindex: __u32,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
@@ -1706,7 +1706,7 @@ pub struct bpf_map_info {
     pub value_size: __u32,
     pub max_entries: __u32,
     pub map_flags: __u32,
-    pub name: [::aya_bpf_cty::c_char; 16usize],
+    pub name: [::aya_ebpf_cty::c_char; 16usize],
     pub ifindex: __u32,
     pub btf_vmlinux_value_type_id: __u32,
     pub netns_dev: __u64,
@@ -1934,7 +1934,7 @@ impl bpf_sock_ops__bindgen_ty_2 {
 #[repr(align(8))]
 #[derive(Copy, Clone)]
 pub union bpf_sock_ops__bindgen_ty_3 {
-    pub skb_data: *mut ::aya_bpf_cty::c_void,
+    pub skb_data: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -1949,7 +1949,7 @@ impl bpf_sock_ops__bindgen_ty_3 {
 #[repr(align(8))]
 #[derive(Copy, Clone)]
 pub union bpf_sock_ops__bindgen_ty_4 {
-    pub skb_data_end: *mut ::aya_bpf_cty::c_void,
+    pub skb_data_end: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -1968,7 +1968,7 @@ pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_27 = 16;
 pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_27 = 32;
 pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_27 = 64;
 pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_27 = 127;
-pub type _bindgen_ty_27 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_27 = ::aya_ebpf_cty::c_uint;
 pub const BPF_SOCK_OPS_VOID: _bindgen_ty_28 = 0;
 pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_28 = 1;
 pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_28 = 2;
@@ -1985,7 +1985,7 @@ pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_28 = 12;
 pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_28 = 13;
 pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_28 = 14;
 pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_28 = 15;
-pub type _bindgen_ty_28 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_28 = ::aya_ebpf_cty::c_uint;
 pub const BPF_TCP_ESTABLISHED: _bindgen_ty_29 = 1;
 pub const BPF_TCP_SYN_SENT: _bindgen_ty_29 = 2;
 pub const BPF_TCP_SYN_RECV: _bindgen_ty_29 = 3;
@@ -1999,13 +1999,13 @@ pub const BPF_TCP_LISTEN: _bindgen_ty_29 = 10;
 pub const BPF_TCP_CLOSING: _bindgen_ty_29 = 11;
 pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_29 = 12;
 pub const BPF_TCP_MAX_STATES: _bindgen_ty_29 = 13;
-pub type _bindgen_ty_29 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_29 = ::aya_ebpf_cty::c_uint;
 pub mod _bindgen_ty_31 {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1;
 }
 pub mod _bindgen_ty_32 {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1;
     pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2;
 }
@@ -2019,10 +2019,10 @@ pub struct bpf_perf_event_value {
 pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_33 = 1;
 pub const BPF_DEVCG_ACC_READ: _bindgen_ty_33 = 2;
 pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_33 = 4;
-pub type _bindgen_ty_33 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_33 = ::aya_ebpf_cty::c_uint;
 pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_34 = 1;
 pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_34 = 2;
-pub type _bindgen_ty_34 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_34 = ::aya_ebpf_cty::c_uint;
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct bpf_cgroup_dev_ctx {
@@ -2038,7 +2038,7 @@ pub struct bpf_raw_tracepoint_args {
 pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_35 = 1;
 pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_35 = 2;
 pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_35 = 4;
-pub type _bindgen_ty_35 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_35 = ::aya_ebpf_cty::c_uint;
 pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_36 = 0;
 pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_36 = 1;
 pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_36 = 2;
@@ -2048,7 +2048,7 @@ pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_36 = 5;
 pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_36 = 6;
 pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_36 = 7;
 pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_36 = 8;
-pub type _bindgen_ty_36 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_36 = ::aya_ebpf_cty::c_uint;
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub struct bpf_fib_lookup {
@@ -2104,17 +2104,17 @@ pub union bpf_redir_neigh__bindgen_ty_1 {
     pub ipv6_nh: [__u32; 4usize],
 }
 pub mod bpf_check_mtu_flags {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_MTU_CHK_SEGS: Type = 1;
 }
 pub mod bpf_check_mtu_ret {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_MTU_CHK_RET_SUCCESS: Type = 0;
     pub const BPF_MTU_CHK_RET_FRAG_NEEDED: Type = 1;
     pub const BPF_MTU_CHK_RET_SEGS_TOOBIG: Type = 2;
 }
 pub mod bpf_task_fd_type {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_FD_TYPE_RAW_TRACEPOINT: Type = 0;
     pub const BPF_FD_TYPE_TRACEPOINT: Type = 1;
     pub const BPF_FD_TYPE_KPROBE: Type = 2;
@@ -2125,7 +2125,7 @@ pub mod bpf_task_fd_type {
 pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_37 = 1;
 pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_37 = 2;
 pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_37 = 4;
-pub type _bindgen_ty_37 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_37 = ::aya_ebpf_cty::c_uint;
 #[repr(C)]
 #[derive(Copy, Clone)]
 pub struct bpf_flow_keys {
@@ -2314,7 +2314,7 @@ impl bpf_sockopt__bindgen_ty_1 {
 #[repr(align(8))]
 #[derive(Copy, Clone)]
 pub union bpf_sockopt__bindgen_ty_2 {
-    pub optval: *mut ::aya_bpf_cty::c_void,
+    pub optval: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -2329,7 +2329,7 @@ impl bpf_sockopt__bindgen_ty_2 {
 #[repr(align(8))]
 #[derive(Copy, Clone)]
 pub union bpf_sockopt__bindgen_ty_3 {
-    pub optval_end: *mut ::aya_bpf_cty::c_void,
+    pub optval_end: *mut ::aya_ebpf_cty::c_void,
     pub _bitfield_align_1: [u8; 0],
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
 }
@@ -2393,12 +2393,12 @@ impl bpf_sk_lookup {
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct btf_ptr {
-    pub ptr: *mut ::aya_bpf_cty::c_void,
+    pub ptr: *mut ::aya_ebpf_cty::c_void,
     pub type_id: __u32,
     pub flags: __u32,
 }
 pub mod bpf_core_relo_kind {
-    pub type Type = ::aya_bpf_cty::c_uint;
+    pub type Type = ::aya_ebpf_cty::c_uint;
     pub const BPF_CORE_FIELD_BYTE_OFFSET: Type = 0;
     pub const BPF_CORE_FIELD_BYTE_SIZE: Type = 1;
     pub const BPF_CORE_FIELD_EXISTS: Type = 2;
@@ -2422,7 +2422,7 @@ pub struct bpf_core_relo {
     pub kind: bpf_core_relo_kind::Type,
 }
 pub const BPF_F_TIMER_ABS: _bindgen_ty_39 = 1;
-pub type _bindgen_ty_39 = ::aya_bpf_cty::c_uint;
+pub type _bindgen_ty_39 = ::aya_ebpf_cty::c_uint;
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct bpf_iter_num {
@@ -2431,14 +2431,14 @@ pub struct bpf_iter_num {
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct pt_regs {
-    pub uregs: [::aya_bpf_cty::c_long; 18usize],
+    pub uregs: [::aya_ebpf_cty::c_long; 18usize],
 }
-pub type sa_family_t = ::aya_bpf_cty::c_ushort;
+pub type sa_family_t = ::aya_ebpf_cty::c_ushort;
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct sockaddr {
     pub sa_family: sa_family_t,
-    pub sa_data: [::aya_bpf_cty::c_char; 14usize],
+    pub sa_data: [::aya_ebpf_cty::c_char; 14usize],
 }
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]

File diff suppressed because it is too large
+ 260 - 260
ebpf/aya-ebpf-bindings/src/armv7/helpers.rs


+ 0 - 0
bpf/aya-bpf-bindings/src/armv7/mod.rs → ebpf/aya-ebpf-bindings/src/armv7/mod.rs


Some files were not shown because too many files changed in this diff