diff --git a/examples/cgroup-skb-egress/cgroup-skb-egress-ebpf/src/main.rs b/examples/cgroup-skb-egress/cgroup-skb-egress-ebpf/src/main.rs index d9b9aa67..f9d9bd73 100644 --- a/examples/cgroup-skb-egress/cgroup-skb-egress-ebpf/src/main.rs +++ b/examples/cgroup-skb-egress/cgroup-skb-egress-ebpf/src/main.rs @@ -17,14 +17,14 @@ use cgroup_skb_egress_common::PacketLog; mod bindings; use bindings::iphdr; -#[map(name = "EVENTS")] +#[map] static EVENTS: PerfEventArray = PerfEventArray::with_max_entries(1024, 0); -#[map(name = "BLOCKLIST")] // (1) +#[map] // (1) static BLOCKLIST: HashMap = HashMap::with_max_entries(1024, 0); -#[cgroup_skb(name = "cgroup_skb_egress")] +#[cgroup_skb] pub fn cgroup_skb_egress(ctx: SkBuffContext) -> i32 { match { try_cgroup_skb_egress(ctx) } { Ok(ret) => ret, diff --git a/examples/kprobetcp/kprobetcp-ebpf/src/main.rs b/examples/kprobetcp/kprobetcp-ebpf/src/main.rs index 085ea8d4..65d4e150 100644 --- a/examples/kprobetcp/kprobetcp-ebpf/src/main.rs +++ b/examples/kprobetcp/kprobetcp-ebpf/src/main.rs @@ -17,7 +17,7 @@ use aya_log_ebpf::info; const AF_INET: u16 = 2; const AF_INET6: u16 = 10; -#[kprobe(name = "kprobetcp")] +#[kprobe] pub fn kprobetcp(ctx: ProbeContext) -> u32 { match try_kprobetcp(ctx) { Ok(ret) => ret, diff --git a/examples/tc-egress/tc-egress-ebpf/src/main.rs b/examples/tc-egress/tc-egress-ebpf/src/main.rs index 0b363196..2ebed21e 100644 --- a/examples/tc-egress/tc-egress-ebpf/src/main.rs +++ b/examples/tc-egress/tc-egress-ebpf/src/main.rs @@ -16,7 +16,7 @@ use network_types::{ #[map] static BLOCKLIST: HashMap = HashMap::with_max_entries(1024, 0); -#[classifier(name = "tc_egress")] +#[classifier] pub fn tc_egress(ctx: TcContext) -> i32 { match try_tc_egress(ctx) { Ok(ret) => ret, diff --git a/examples/xdp-drop/xdp-drop-ebpf/src/main.rs b/examples/xdp-drop/xdp-drop-ebpf/src/main.rs index dc2e2a78..053defab 100644 --- a/examples/xdp-drop/xdp-drop-ebpf/src/main.rs +++ b/examples/xdp-drop/xdp-drop-ebpf/src/main.rs @@ -21,7 +21,7 @@ fn panic(_info: &core::panic::PanicInfo) -> ! { unsafe { core::hint::unreachable_unchecked() } } -#[map(name = "BLOCKLIST")] // (1) +#[map] // (1) static BLOCKLIST: HashMap = HashMap::::with_max_entries(1024, 0); diff --git a/examples/xdp-hello/xdp-hello-ebpf/src/main.rs b/examples/xdp-hello/xdp-hello-ebpf/src/main.rs index 34d1f653..7d501005 100644 --- a/examples/xdp-hello/xdp-hello-ebpf/src/main.rs +++ b/examples/xdp-hello/xdp-hello-ebpf/src/main.rs @@ -4,7 +4,7 @@ use aya_bpf::{bindings::xdp_action, macros::xdp, programs::XdpContext}; use aya_log_ebpf::info; -#[xdp(name = "xdp_hello")] // (4) +#[xdp] // (4) pub fn xdp_hello(ctx: XdpContext) -> u32 { // (5) match unsafe { try_xdp_hello(ctx) } {