Documentation
¶
Index ¶
- func AttachRootCgroup(prg *ebpf.Program, attachType ebpf.AttachType) (link.Link, error)
- func AttachTcxToInterfaces(ifaces []net.Interface, prg *ebpf.Program, attachType ebpf.AttachType) ([]link.Link, map[int]net.Interface, error)
- func LoadNetLedger() (*ebpf.CollectionSpec, error)
- func LoadNetLedgerObjects(obj interface{}, opts *ebpf.CollectionOptions) error
- func LoadTests() (*ebpf.CollectionSpec, error)
- func LoadTestsObjects(obj interface{}, opts *ebpf.CollectionOptions) error
- func ManageTCXLinks(ifacesMap map[int]net.Interface, activeLinks []link.Link, prg *ebpf.Program, ...) (chan struct{}, error)
- type NetLedgerConnMeta
- type NetLedgerConnStats
- type NetLedgerMapSpecs
- type NetLedgerMaps
- type NetLedgerObjects
- type NetLedgerProgramSpecs
- type NetLedgerPrograms
- type NetLedgerSpecs
- type NetLedgerVariableSpecs
- type NetLedgerVariables
- type TestsEvent
- type TestsMapSpecs
- type TestsMaps
- type TestsObjects
- type TestsProgramSpecs
- type TestsPrograms
- type TestsSpecs
- type TestsVariableSpecs
- type TestsVariables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachRootCgroup ¶
func AttachTcxToInterfaces ¶
func LoadNetLedger ¶
func LoadNetLedger() (*ebpf.CollectionSpec, error)
LoadNetLedger returns the embedded CollectionSpec for NetLedger.
func LoadNetLedgerObjects ¶
func LoadNetLedgerObjects(obj interface{}, opts *ebpf.CollectionOptions) error
LoadNetLedgerObjects loads NetLedger and converts it into a struct.
The following types are suitable as obj argument:
*NetLedgerObjects *NetLedgerPrograms *NetLedgerMaps
See ebpf.CollectionSpec.LoadAndAssign documentation for details.
func LoadTests ¶
func LoadTests() (*ebpf.CollectionSpec, error)
LoadTests returns the embedded CollectionSpec for Tests.
func LoadTestsObjects ¶
func LoadTestsObjects(obj interface{}, opts *ebpf.CollectionOptions) error
LoadTestsObjects loads Tests and converts it into a struct.
The following types are suitable as obj argument:
*TestsObjects *TestsPrograms *TestsMaps
See ebpf.CollectionSpec.LoadAndAssign documentation for details.
Types ¶
type NetLedgerConnMeta ¶
type NetLedgerConnStats ¶
type NetLedgerMapSpecs ¶
type NetLedgerMapSpecs struct {
ConnMeta *ebpf.MapSpec `ebpf:"conn_meta"`
ConnStats *ebpf.MapSpec `ebpf:"conn_stats"`
}
NetLedgerMapSpecs contains maps before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type NetLedgerMaps ¶
type NetLedgerMaps struct {
ConnMeta *ebpf.Map `ebpf:"conn_meta"`
ConnStats *ebpf.Map `ebpf:"conn_stats"`
}
NetLedgerMaps contains all maps after they have been loaded into the kernel.
It can be passed to LoadNetLedgerObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*NetLedgerMaps) Close ¶
func (m *NetLedgerMaps) Close() error
type NetLedgerObjects ¶
type NetLedgerObjects struct {
NetLedgerPrograms
NetLedgerMaps
NetLedgerVariables
}
NetLedgerObjects contains all objects after they have been loaded into the kernel.
It can be passed to LoadNetLedgerObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*NetLedgerObjects) Close ¶
func (o *NetLedgerObjects) Close() error
type NetLedgerProgramSpecs ¶
type NetLedgerProgramSpecs struct {
CgConnect4 *ebpf.ProgramSpec `ebpf:"cg_connect4"`
CgEgress *ebpf.ProgramSpec `ebpf:"cg_egress"`
CgIngress *ebpf.ProgramSpec `ebpf:"cg_ingress"`
TcpSockops *ebpf.ProgramSpec `ebpf:"tcp_sockops"`
}
NetLedgerProgramSpecs contains programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type NetLedgerPrograms ¶
type NetLedgerPrograms struct {
CgConnect4 *ebpf.Program `ebpf:"cg_connect4"`
CgEgress *ebpf.Program `ebpf:"cg_egress"`
CgIngress *ebpf.Program `ebpf:"cg_ingress"`
TcpSockops *ebpf.Program `ebpf:"tcp_sockops"`
}
NetLedgerPrograms contains all programs after they have been loaded into the kernel.
It can be passed to LoadNetLedgerObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*NetLedgerPrograms) Close ¶
func (p *NetLedgerPrograms) Close() error
type NetLedgerSpecs ¶
type NetLedgerSpecs struct {
NetLedgerProgramSpecs
NetLedgerMapSpecs
NetLedgerVariableSpecs
}
NetLedgerSpecs contains maps and programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type NetLedgerVariableSpecs ¶
type NetLedgerVariableSpecs struct {
}
NetLedgerVariableSpecs contains global variables before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type NetLedgerVariables ¶
type NetLedgerVariables struct {
}
NetLedgerVariables contains all global variables after they have been loaded into the kernel.
It can be passed to LoadNetLedgerObjects or ebpf.CollectionSpec.LoadAndAssign.
type TestsEvent ¶
type TestsMapSpecs ¶
TestsMapSpecs contains maps before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type TestsMaps ¶
TestsMaps contains all maps after they have been loaded into the kernel.
It can be passed to LoadTestsObjects or ebpf.CollectionSpec.LoadAndAssign.
type TestsObjects ¶
type TestsObjects struct {
TestsPrograms
TestsMaps
TestsVariables
}
TestsObjects contains all objects after they have been loaded into the kernel.
It can be passed to LoadTestsObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*TestsObjects) Close ¶
func (o *TestsObjects) Close() error
type TestsProgramSpecs ¶
type TestsProgramSpecs struct {
HandleTcpConnect *ebpf.ProgramSpec `ebpf:"handle_tcp_connect"`
}
TestsProgramSpecs contains programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type TestsPrograms ¶
TestsPrograms contains all programs after they have been loaded into the kernel.
It can be passed to LoadTestsObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*TestsPrograms) Close ¶
func (p *TestsPrograms) Close() error
type TestsSpecs ¶
type TestsSpecs struct {
TestsProgramSpecs
TestsMapSpecs
TestsVariableSpecs
}
TestsSpecs contains maps and programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type TestsVariableSpecs ¶
type TestsVariableSpecs struct {
}
TestsVariableSpecs contains global variables before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type TestsVariables ¶
type TestsVariables struct {
}
TestsVariables contains all global variables after they have been loaded into the kernel.
It can be passed to LoadTestsObjects or ebpf.CollectionSpec.LoadAndAssign.