github.com/DataDog/ebpf
Package ebpf is a toolkit for working with eBPF programs. eBPF programs are small snippets of code which are executed directly in a VM in the Linux kernel, which makes them very fast and flexible. Many Linux subsystems now accept eBPF programs. This makes it possible to implement highly application specific logic inside the kernel, without having to modify the actual kernel itself. This package is designed for long-running processes which want to use eBPF to implement part of their application logic. It has no run-time dependencies outside of the library and the Linux kernel itself. eBPF code should be compiled ahead of time using clang, and shipped with your application as any other resource. This package doesn't include code required to attach eBPF to Linux subsystems, since this varies per subsystem. ExampleMarshaler shows how to use custom encoding with map methods. ExampleExtractDistance shows how to attach an eBPF socket filter to extract the network distance of an IP host. Example_program demonstrates how to attach an eBPF program to a tracepoint. The program will be attached to the sys_enter_open syscall and print out the integer 123 everytime the sycall is used. ExampleSocketELF demonstrates how to load an eBPF program from an ELF, and attach it to a raw socket.
proxy.golang.org
v0.0.0-20220301203322-3fc9ab3b8daf
about 4 years ago
5
14
38
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/%21data%21dog/ebpf
spec |
| License | MIT |
| Namespace | github.com/DataDog |
| First Release | over 5 years ago |
| Last Synced | 20 days ago |