Skip to content

Commit

Permalink
Rename aya-bpf to aya-ebpf.
Browse files Browse the repository at this point in the history
  • Loading branch information
pdliyan committed Mar 23, 2024
1 parent dce5317 commit bc61bde
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions {{project-name}}-ebpf/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn try_{{crate_name}}(ctx: ProbeContext) -> Result<u32, u32> {
Ok(0)
}
{%- when "kretprobe" %}
use aya_bpf::{macros::kretprobe, programs::ProbeContext};
use aya_ebpf::{macros::kretprobe, programs::ProbeContext};
use aya_log_ebpf::info;

#[kretprobe]
Expand All @@ -34,7 +34,7 @@ fn try_{{crate_name}}(ctx: ProbeContext) -> Result<u32, u32> {
Ok(0)
}
{%- when "fentry" %}
use aya_bpf::{
use aya_ebpf::{
macros::fentry,
programs::FEntryContext,
};
Expand All @@ -53,7 +53,7 @@ fn try_{{crate_name}}(ctx: FEntryContext) -> Result<u32, u32> {
Ok(0)
}
{%- when "fexit" %}
use aya_bpf::{
use aya_ebpf::{
macros::fexit,
programs::FExitContext,
};
Expand All @@ -72,7 +72,7 @@ fn try_{{crate_name}}(ctx: FExitContext) -> Result<u32, u32> {
Ok(0)
}
{%- when "uprobe" %}
use aya_bpf::{
use aya_ebpf::{
macros::uprobe,
programs::ProbeContext,
};
Expand All @@ -91,7 +91,7 @@ fn try_{{crate_name}}(ctx: ProbeContext) -> Result<u32, u32> {
Ok(0)
}
{%- when "uretprobe" %}
use aya_bpf::{
use aya_ebpf::{
macros::uretprobe,
programs::ProbeContext,
};
Expand All @@ -110,7 +110,7 @@ fn try_{{crate_name}}(ctx: ProbeContext) -> Result<u32, u32> {
Ok(0)
}
{%- when "sock_ops" %}
use aya_bpf::{
use aya_ebpf::{
macros::sock_ops,
programs::SockOpsContext,
};
Expand All @@ -129,7 +129,7 @@ fn try_{{crate_name}}(ctx: SockOpsContext) -> Result<u32, u32> {
Ok(0)
}
{%- when "sk_msg" %}
use aya_bpf::{
use aya_ebpf::{
macros::{map, sk_msg},
maps::SockHash,
programs::SkMsgContext,
Expand All @@ -154,7 +154,7 @@ fn try_{{crate_name}}(ctx: SkMsgContext) -> Result<u32, u32> {
Ok(0)
}
{%- when "xdp" %}
use aya_bpf::{bindings::xdp_action, macros::xdp, programs::XdpContext};
use aya_ebpf::{bindings::xdp_action, macros::xdp, programs::XdpContext};
use aya_log_ebpf::info;

#[xdp]
Expand All @@ -170,7 +170,7 @@ fn try_{{crate_name}}(ctx: XdpContext) -> Result<u32, u32> {
Ok(xdp_action::XDP_PASS)
}
{%- when "classifier" %}
use aya_bpf::{macros::classifier, programs::TcContext};
use aya_ebpf::{macros::classifier, programs::TcContext};
use aya_log_ebpf::info;

#[classifier]
Expand All @@ -186,7 +186,7 @@ fn try_{{crate_name}}(ctx: TcContext) -> Result<i32, i32> {
Ok(0)
}
{%- when "cgroup_skb" %}
use aya_bpf::{
use aya_ebpf::{
macros::cgroup_skb,
programs::SkBuffContext,
};
Expand All @@ -205,7 +205,7 @@ fn try_{{crate_name}}(ctx: SkBuffContext) -> Result<i32, i32> {
Ok(0)
}
{%- when "tracepoint" %}
use aya_bpf::{
use aya_ebpf::{
macros::tracepoint,
programs::TracePointContext,
};
Expand All @@ -224,7 +224,7 @@ fn try_{{crate_name}}(ctx: TracePointContext) -> Result<u32, u32> {
Ok(0)
}
{%- when "lsm" %}
use aya_bpf::{
use aya_ebpf::{
macros::lsm,
programs::LsmContext,
};
Expand All @@ -243,7 +243,7 @@ fn try_{{lsm_hook}}(ctx: LsmContext) -> Result<i32, i32> {
Ok(0)
}
{%- when "tp_btf" %}
use aya_bpf::{
use aya_ebpf::{
macros::btf_tracepoint,
programs::BtfTracePointContext,
};
Expand All @@ -262,7 +262,7 @@ fn try_{{tracepoint_name}}(ctx: BtfTracePointContext) -> Result<i32, i32> {
Ok(0)
}
{%- when "socket_filter" %}
use aya_bpf::{
use aya_ebpf::{
macros::socket_filter,
programs::SkBuffContext,
};
Expand All @@ -272,7 +272,7 @@ pub fn {{crate_name}}(_ctx: SkBuffContext) -> i64 {
return 0
}
{%- when "cgroup_sysctl" %}
use aya_bpf::{
use aya_ebpf::{
macros::cgroup_sysctl,
programs::SysctlContext,
};
Expand All @@ -291,7 +291,7 @@ fn try_{{crate_name}}(ctx: SysctlContext) -> Result<i32, i32> {
Ok(0)
}
{%- when "cgroup_sockopt" %}
use aya_bpf::{macros::cgroup_sockopt, programs::SockoptContext};
use aya_ebpf::{macros::cgroup_sockopt, programs::SockoptContext};
use aya_log_ebpf::info;

#[cgroup_sockopt({{sockopt_target}})]
Expand All @@ -307,7 +307,7 @@ fn try_{{crate_name}}(ctx: SockoptContext) -> Result<i32, i32> {
Ok(0)
}
{%- when "raw_tracepoint" %}
use aya_bpf::{macros::raw_tracepoint, programs::RawTracePointContext};
use aya_ebpf::{macros::raw_tracepoint, programs::RawTracePointContext};
use aya_log_ebpf::info;

#[raw_tracepoint(tracepoint="{{tracepoint_name}}")]
Expand All @@ -323,7 +323,7 @@ fn try_{{crate_name}}(ctx: RawTracePointContext) -> Result<i32, i32> {
Ok(0)
}
{%- when "perf_event" %}
use aya_bpf::{
use aya_ebpf::{
helpers::bpf_get_smp_processor_id, macros::perf_event, programs::PerfEventContext, BpfContext,
};
use aya_log_ebpf::info;
Expand Down

0 comments on commit bc61bde

Please sign in to comment.