This is a template for eunomia-bpf eBPF programs. You can use t as a template, compile it online with Github Actions
or offline as a bootstrap template.
Download the pre-compiled ecli
binary from here: eunomia-bpf/eunomia-bpf
To install, just download and use the ecli
binary from here: eunomia-bpf/eunomia-bpf:
wget https://aka.pw/bpf-ecli -O ecli && chmod +x ecli
bootstrap.bpf.c
, commit it and wait for the workflow to stopecli
with remote url:$ sudo ./ecli run https://eunomia-bpf.github.io/ebpm-template/package.json
just write some code in the bootstrap.bpf.c
, after that, simply run this:
$ docker run -it -v ./:/src yunwei37/ebpm:latest # use absolute path
you will get a package.json
in your root dir. Just run:
$ sudo ./ecli run package.json
The ebpf compiled code can run on different kernel versions(CO-RE). You can just copied the json to another machine. see: github.com/eunomia-bpf/eunomia-bpf for the runtime, and eunomia-bpf/eunomia-cc for our compiler tool chains.
This is an example of ebpf code, we copied the bootstrap.bpf.c from libbpf-bootstrap, without any modification. You can read their README
for details: https://github.com/libbpf/libbpf-bootstrap
for more examples, please see: eunomia-bpf/eunomia-bpf/tree/master/bpftools/examples
For more documents, please refer to https://eunomia-bpf.github.io/