Skip to content

nchallak/gobpf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gobpf

Build Status GoDoc

This repository provides go bindings for the bcc framework as well as low-level routines to load and use eBPF programs from .elf files.

gobpf is in early stage, but usable. Input and contributions are very much welcome.

To get started, first install (either by package or source) libbcc. Then, simply:

go install github.com/iovisor/gobpf
sudo -E go test github.com/iovisor/gobpf

Example code can be found in the examples/ directory.

We recommend to vendor gobpf and pin its version as the API probably undergoes change during development.

Building ELF object files

To build ELF object files for usage with github.com/iovisor/gobpf/elf, you must use distinct sections (SEC("...")). Currently, only kprobe/... and maps/... are supported. For an example, see tests/dummy.c.

About

Go bindings for creating BPF programs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 94.9%
  • Shell 3.5%
  • C 1.6%