Open hazelnutsgz opened 5 years ago
bcc doesn't support cBPF, only eBPF. I also don't know any C or Python to cBPF compilers...
bcc doesn't support cBPF, only eBPF. I also don't know any C or Python to cBPF compilers...
Yes, what I am saying is C => eBPF.
I happened to come across this one https://github.com/iovisor/ubpf, hope it could be of help.
sock_fprog
is for cBPF. Also, your code snippet contains cBPF bytecode. seccomp-bpf supports only cBPF.
You can compile from C to eBPF using the Clang compiler. uBPF is a userspace eBPF VM. It can execute your eBPF bytecode, but won't help you compile.
@pchaigno Thanks~
Hi, I am planning to generate the BPF "assembly" code(
BPF_JUMP
,BPF_STMT
etc.) by writing C or Python code.I was wondering if bcc could provide such interfaces to users. Since what I have found is all about higher API (like tracing), Thanks~