This commit is contained in:
geoffrey 2025-01-29 20:13:31 +01:00
parent 6aa1eed6ee
commit 0a910af5bb
5 changed files with 69921 additions and 123120 deletions

@ -1,12 +1,13 @@
GCC=gcc
CL=clang-11
CFLAGS=-Wall
LIBS=-lbpf
LIBS=-L../libbpf/src -l:libbpf.a -lelf -lz
#LIBS=-lbpf
all: dns-trace.ebpf.o dns-trace
dns-trace.ebpf.o: src/dns-trace.ebpf.c
$(CL) -g -O2 -target bpf -c src/dns-trace.ebpf.c -o src/dns-trace.ebpf.o
$(CL) -g -O2 -target bpf -D __TARGET_ARCH_x86_64 -D __BPF_TRACING__ -L../libbpf/src -l:libbpf.a -c src/dns-trace.ebpf.c -o src/dns-trace.ebpf.o
dns-trace: src/dns-trace.c
$(GCC) $(CFLAGS) src/dns-trace.c -o dns-trace $(LIBS)

18
README.md Normal file

@ -0,0 +1,18 @@
# Introduction
## Requirements
First, you need to install these packages:
```
apt-get install bpftool clang libbpf-dev gcc-multilib
```
Clone the project and compile it:
```
$ git clone https://github.com/libbpf/libbpf/
cd libbpf/src && make
```
After that, you can execute the program:

BIN
dns-trace

Binary file not shown.

Binary file not shown.

193018
src/vmlinux.h

File diff suppressed because it is too large Load Diff