Documentation
¶
Index ¶
- func LoadXdperf() (*ebpf.CollectionSpec, error)
- func LoadXdperfObjects(obj interface{}, opts *ebpf.CollectionOptions) error
- type XdperfDatarec
- type XdperfMapSpecs
- type XdperfMaps
- type XdperfObjects
- type XdperfProgramSpecs
- type XdperfPrograms
- type XdperfSpecs
- type XdperfVariableSpecs
- type XdperfVariables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadXdperf ¶
func LoadXdperf() (*ebpf.CollectionSpec, error)
LoadXdperf returns the embedded CollectionSpec for Xdperf.
func LoadXdperfObjects ¶
func LoadXdperfObjects(obj interface{}, opts *ebpf.CollectionOptions) error
LoadXdperfObjects loads Xdperf and converts it into a struct.
The following types are suitable as obj argument:
*XdperfObjects *XdperfPrograms *XdperfMaps
See ebpf.CollectionSpec.LoadAndAssign documentation for details.
Types ¶
type XdperfDatarec ¶
type XdperfMapSpecs ¶
XdperfMapSpecs contains maps before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type XdperfMaps ¶
XdperfMaps contains all maps after they have been loaded into the kernel.
It can be passed to LoadXdperfObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*XdperfMaps) Close ¶
func (m *XdperfMaps) Close() error
type XdperfObjects ¶
type XdperfObjects struct {
XdperfPrograms
XdperfMaps
XdperfVariables
}
XdperfObjects contains all objects after they have been loaded into the kernel.
It can be passed to LoadXdperfObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*XdperfObjects) Close ¶
func (o *XdperfObjects) Close() error
type XdperfProgramSpecs ¶
type XdperfProgramSpecs struct {
XdpCountPackets *ebpf.ProgramSpec `ebpf:"xdp_count_packets"`
XdpRedirectNotouch *ebpf.ProgramSpec `ebpf:"xdp_redirect_notouch"`
XdpTx *ebpf.ProgramSpec `ebpf:"xdp_tx"`
}
XdperfProgramSpecs contains programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type XdperfPrograms ¶
type XdperfPrograms struct {
XdpCountPackets *ebpf.Program `ebpf:"xdp_count_packets"`
XdpRedirectNotouch *ebpf.Program `ebpf:"xdp_redirect_notouch"`
XdpTx *ebpf.Program `ebpf:"xdp_tx"`
}
XdperfPrograms contains all programs after they have been loaded into the kernel.
It can be passed to LoadXdperfObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*XdperfPrograms) Close ¶
func (p *XdperfPrograms) Close() error
type XdperfSpecs ¶
type XdperfSpecs struct {
XdperfProgramSpecs
XdperfMapSpecs
XdperfVariableSpecs
}
XdperfSpecs contains maps and programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type XdperfVariableSpecs ¶
type XdperfVariableSpecs struct {
Ifidx *ebpf.VariableSpec `ebpf:"ifidx"`
TargetPort *ebpf.VariableSpec `ebpf:"target_port"`
}
XdperfVariableSpecs contains global variables before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type XdperfVariables ¶
type XdperfVariables struct {
Ifidx *ebpf.Variable `ebpf:"ifidx"`
TargetPort *ebpf.Variable `ebpf:"target_port"`
}
XdperfVariables contains all global variables after they have been loaded into the kernel.
It can be passed to LoadXdperfObjects or ebpf.CollectionSpec.LoadAndAssign.