- This repository contains 2 example eBPF programs:
minimal
andbootstrap
. - 如需在codespace/devcontainer內編譯
bootstrap
,則需在編譯參數LD的地方加上/usr/lib/libargp.a
- 如有
#include <asm/types.h>
找不到檔案的情況,可以執行下列指令:
sudo ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/asm
sudo apt install -y bpftool libbpf-dev build-essential clang
- https://docs.github.com/en/codespaces/getting-started/quickstart
- https://code.visualstudio.com/docs/devcontainers/tutorial
-
some_program.bpf.c
:
This is the eBPF program we're going to load into the Kernel. -
some_program.c
:
This file is our frontend in the userspace, and it is responsible for loading the eBPF program into Kernel.
