3 ms·
eBPF could use a better interface, though. I REALLY don't want to have to write this stuff in C. Think we could get a scripting language?
by qwertyuiop924 10y ago
eBPF could use a better interface, though. I REALLY don't want to have to write this stuff in C. Think we could get a scripting language?
- okket 10y agoYou only have to write the kernel stuff in C (which is a small part, since you are just collecting data), for the front end you can use BCC (Python/Lua) https://github.com/iovisor/bcc https://github.com/iovisor/bcc Personal favorite: https://github.com/iovisor/bcc/blob/master/tools/sslsniff_example.txt https://github.com/iovisor/bcc/blob/master/tools/sslsniff_ex...
- qwertyuiop924 10y agoInteresting. I'll have to read the docs, but... This looks like a job for... FUNCTIONAL PROGRAMMING!
- brendangregg 10y agoYes, we could, and I imagine we will at some point. It'll have become a user-level problem: the kernel capabilities are there (BPF+everything else), and there's the bcc user-level libraries (written in C) that make using the kernel stuff easier. The easiest way to add a front end would be to consume the bcc libraries. There's plenty of examples of how to use them (the Python and lua interfaces). So if a scripting interface existed, would you use it? For what? Yes, it'd be nice to have, but I think a lot of people will get as far as using the provided bcc tools and be happy with that.
- qwertyuiop924 10y agoIf we could write bpf programs in something other than C, it would go a long way towards opening up eBPF to people who wouldn't be able to write their own scripts otherwise.