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.
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 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.