Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arloor/bpf_rs_hub
https://github.com/arloor/bpf_rs_hub
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/arloor/bpf_rs_hub
- Owner: arloor
- Created: 2024-04-23T07:05:41.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-10-15T03:16:12.000Z (about 1 month ago)
- Last Synced: 2024-10-15T03:19:50.570Z (about 1 month ago)
- Language: C
- Size: 755 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 基于libbpf-rs的lib集合
## 安装依赖
1. Clang编译器。至少需要Clang10,CO-RE需要Clang11或Clang12
2. libbpf库
3. bpftool可执行性文件,用来生成vmlinux.h和xx_skel.h
4. zlib (libz-dev or zlib-devel ) 和 libelf (libelf-dev or elfutils-libelf-devel )
5. pkg-config: libbpf-rs使用pkg-config来查找libbpf库**ubuntu 22.04 安装:**
```bash
apt-get install -y libbpf-dev libz-dev libelf-dev pkg-config clang bpftool
```**centos stream 9 安装:**
```bash
yum install -y libbpf zlib-devel elfutils-libelf-devel pkgconf-pkg-config clang bpftool
```## 生成vmlinux.h
```bash
bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
```## 静态链接libbpf libelf zlib
```bash
yum install -y autoconf gettext-devel flex bison gawk make pkg-config automake
apt-get install -y autoconf autopoint flex bison gawk make pkg-config automake
```激活vendored feature