bpfgo

package
v0.0.0-...-e8abf59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PORT_CONSENSUS = 1
	PORT_SIAMUX    = 2
	PORT_QUIC      = 3
)

Variables

This section is empty.

Functions

func BPFPath

func BPFPath() string

Optional helper if you want to load from a different path in dev

func CleanupZeroEntriesUsingHandles

func CleanupZeroEntriesUsingHandles(ip4Map, ip6Map *ebpf.Map) error

CleanupZeroEntriesUsingHandles deletes keys whose values are all zero.

func ResetCountersUsingHandles

func ResetCountersUsingHandles(ip4Map, ip6Map *ebpf.Map) error

ResetCountersUsingHandles sets every map value to zero while preserving keys.

Types

type Handles

type Handles struct {
	Coll      *ebpf.Collection
	IP4Stats  *ebpf.Map
	IP6Stats  *ebpf.Map
	TCLastIP4 *ebpf.Map
	XDPLink   link.Link
	TCLink    link.Link
}

func Load

func Load(iface string) (*Handles, error)

func (*Handles) Close

func (h *Handles) Close()

type SiaIPStats

type SiaIPStats struct {
	ConsensusUp   uint64
	ConsensusDown uint64
	SiamuxUp      uint64
	SiamuxDown    uint64
	QuicUp        uint64
	QuicDown      uint64
}

New semantic stats struct (matches BPF struct)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL