bpf

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSia

func LoadSia() (*ebpf.CollectionSpec, error)

LoadSia returns the embedded CollectionSpec for Sia.

func LoadSiaObjects

func LoadSiaObjects(obj interface{}, opts *ebpf.CollectionOptions) error

LoadSiaObjects loads Sia and converts it into a struct.

The following types are suitable as obj argument:

*SiaObjects
*SiaPrograms
*SiaMaps

See ebpf.CollectionSpec.LoadAndAssign documentation for details.

Types

type SiaIn6Addr

type SiaIn6Addr struct {
	In6U struct {
		U6Addr8 [16]uint8
		// contains filtered or unexported fields
	}
	// contains filtered or unexported fields
}

type SiaMapSpecs

type SiaMapSpecs struct {
	Ip4Stats   *ebpf.MapSpec `ebpf:"ip4_stats"`
	Ip6Stats   *ebpf.MapSpec `ebpf:"ip6_stats"`
	PortConfig *ebpf.MapSpec `ebpf:"port_config"`
	TcLastIp4  *ebpf.MapSpec `ebpf:"tc_last_ip4"`
}

SiaMapSpecs contains maps before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type SiaMaps

type SiaMaps struct {
	Ip4Stats   *ebpf.Map `ebpf:"ip4_stats"`
	Ip6Stats   *ebpf.Map `ebpf:"ip6_stats"`
	PortConfig *ebpf.Map `ebpf:"port_config"`
	TcLastIp4  *ebpf.Map `ebpf:"tc_last_ip4"`
}

SiaMaps contains all maps after they have been loaded into the kernel.

It can be passed to LoadSiaObjects or ebpf.CollectionSpec.LoadAndAssign.

func (*SiaMaps) Close

func (m *SiaMaps) Close() error

type SiaObjects

type SiaObjects struct {
	SiaPrograms
	SiaMaps
	SiaVariables
}

SiaObjects contains all objects after they have been loaded into the kernel.

It can be passed to LoadSiaObjects or ebpf.CollectionSpec.LoadAndAssign.

func (*SiaObjects) Close

func (o *SiaObjects) Close() error

type SiaProgramSpecs

type SiaProgramSpecs struct {
	TcEgress   *ebpf.ProgramSpec `ebpf:"tc_egress"`
	XdpIngress *ebpf.ProgramSpec `ebpf:"xdp_ingress"`
}

SiaProgramSpecs contains programs before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type SiaPrograms

type SiaPrograms struct {
	TcEgress   *ebpf.Program `ebpf:"tc_egress"`
	XdpIngress *ebpf.Program `ebpf:"xdp_ingress"`
}

SiaPrograms contains all programs after they have been loaded into the kernel.

It can be passed to LoadSiaObjects or ebpf.CollectionSpec.LoadAndAssign.

func (*SiaPrograms) Close

func (p *SiaPrograms) Close() error

type SiaSiaIpStats

type SiaSiaIpStats struct {
	ConsensusUp   uint64
	ConsensusDown uint64
	SiamuxUp      uint64
	SiamuxDown    uint64
	QuicUp        uint64
	QuicDown      uint64
	// contains filtered or unexported fields
}

type SiaSpecs

type SiaSpecs struct {
	SiaProgramSpecs
	SiaMapSpecs
	SiaVariableSpecs
}

SiaSpecs contains maps and programs before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type SiaVariableSpecs

type SiaVariableSpecs struct {
}

SiaVariableSpecs contains global variables before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type SiaVariables

type SiaVariables struct {
}

SiaVariables contains all global variables after they have been loaded into the kernel.

It can be passed to LoadSiaObjects or ebpf.CollectionSpec.LoadAndAssign.

Jump to

Keyboard shortcuts

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