package ringbuf
import "github.com/cilium/ebpf/ringbuf"
Package ringbuf allows interacting with Linux BPF ring buffer.
BPF allows submitting custom events to a BPF ring buffer map set up by userspace. This is very useful to push things like packet samples from BPF to a daemon running in user space.
Index ¶
- Variables
- type Reader
- func NewReader(ringbufMap *ebpf.Map) (r *Reader, err error)
- func (r *Reader) Close() error
- func (r *Reader) Read() (Record, error)
- type Record
Variables ¶
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader allows reading bpf_ringbuf_output from user space.
func NewReader ¶
NewReader creates a new BPF ringbuf reader.
func (*Reader) Close ¶
Close frees resources used by the reader.
It interrupts calls to Read.
func (*Reader) Read ¶
Read the next record from the BPF ringbuf.
Calling Close interrupts the function.
type Record ¶
type Record struct { RawSample []byte }
Source Files ¶
- Version
- v0.7.0
- Published
- Oct 8, 2021
- Platform
- windows/amd64
- Imports
- 12 packages
- Last checked
- 1 second ago –
Tools for package owners.