From 57a69fe9d28e858562a429bacd9a0a7700b96726 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Thu, 7 Mar 2024 12:28:09 +0100 Subject: [PATCH] docs: Use `Ebpf` instead of `Bpf` --- README.md | 8 ++++---- aya/README.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a9eb2650..4a6a8672 100644 --- a/README.md +++ b/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()?; diff --git a/aya/README.md b/aya/README.md index f64767f9..d879fff0 100644 --- a/aya/README.md +++ b/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()?;