Documentation
¶
Index ¶
- func LoadTcBpf() (*ebpf.CollectionSpec, error)
- func LoadTcBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error
- type TcBpfLpmKey
- type TcBpfLpmKeyV6
- type TcBpfLpmVal
- type TcBpfMapSpecs
- type TcBpfMaps
- type TcBpfObjects
- type TcBpfPortKey
- type TcBpfPortKeyV6
- type TcBpfPortVal
- type TcBpfProgramSpecs
- type TcBpfPrograms
- type TcBpfSpecs
- type TcBpfVariableSpecs
- type TcBpfVariables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadTcBpf ¶
func LoadTcBpf() (*ebpf.CollectionSpec, error)
LoadTcBpf returns the embedded CollectionSpec for TcBpf.
func LoadTcBpfObjects ¶
func LoadTcBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error
LoadTcBpfObjects loads TcBpf and converts it into a struct.
The following types are suitable as obj argument:
*TcBpfObjects *TcBpfPrograms *TcBpfMaps
See ebpf.CollectionSpec.LoadAndAssign documentation for details.
Types ¶
type TcBpfLpmKey ¶
type TcBpfLpmKeyV6 ¶
type TcBpfLpmVal ¶
type TcBpfMapSpecs ¶
type TcBpfMapSpecs struct {
MapAuditMode *ebpf.MapSpec `ebpf:"map_audit_mode"`
MapCidrs *ebpf.MapSpec `ebpf:"map_cidrs"`
MapCidrsV6 *ebpf.MapSpec `ebpf:"map_cidrs_v6"`
MapDefaultAction *ebpf.MapSpec `ebpf:"map_default_action"`
MapEvents *ebpf.MapSpec `ebpf:"map_events"`
MapPorts *ebpf.MapSpec `ebpf:"map_ports"`
MapPortsV6 *ebpf.MapSpec `ebpf:"map_ports_v6"`
MapSockPid *ebpf.MapSpec `ebpf:"map_sock_pid"`
}
TcBpfMapSpecs contains maps before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type TcBpfMaps ¶
type TcBpfMaps struct {
MapAuditMode *ebpf.Map `ebpf:"map_audit_mode"`
MapCidrs *ebpf.Map `ebpf:"map_cidrs"`
MapCidrsV6 *ebpf.Map `ebpf:"map_cidrs_v6"`
MapDefaultAction *ebpf.Map `ebpf:"map_default_action"`
MapEvents *ebpf.Map `ebpf:"map_events"`
MapPorts *ebpf.Map `ebpf:"map_ports"`
MapPortsV6 *ebpf.Map `ebpf:"map_ports_v6"`
MapSockPid *ebpf.Map `ebpf:"map_sock_pid"`
}
TcBpfMaps contains all maps after they have been loaded into the kernel.
It can be passed to LoadTcBpfObjects or ebpf.CollectionSpec.LoadAndAssign.
type TcBpfObjects ¶
type TcBpfObjects struct {
TcBpfPrograms
TcBpfMaps
TcBpfVariables
}
TcBpfObjects contains all objects after they have been loaded into the kernel.
It can be passed to LoadTcBpfObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*TcBpfObjects) Close ¶
func (o *TcBpfObjects) Close() error
type TcBpfPortKey ¶
type TcBpfPortKeyV6 ¶
type TcBpfPortVal ¶
type TcBpfProgramSpecs ¶
type TcBpfProgramSpecs struct {
CgConnect4 *ebpf.ProgramSpec `ebpf:"cg_connect4"`
CgConnect6 *ebpf.ProgramSpec `ebpf:"cg_connect6"`
CgSendmsg4 *ebpf.ProgramSpec `ebpf:"cg_sendmsg4"`
CgSendmsg6 *ebpf.ProgramSpec `ebpf:"cg_sendmsg6"`
TcEgress *ebpf.ProgramSpec `ebpf:"tc_egress"`
TcIngress *ebpf.ProgramSpec `ebpf:"tc_ingress"`
}
TcBpfProgramSpecs contains programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type TcBpfPrograms ¶
type TcBpfPrograms struct {
CgConnect4 *ebpf.Program `ebpf:"cg_connect4"`
CgConnect6 *ebpf.Program `ebpf:"cg_connect6"`
CgSendmsg4 *ebpf.Program `ebpf:"cg_sendmsg4"`
CgSendmsg6 *ebpf.Program `ebpf:"cg_sendmsg6"`
TcEgress *ebpf.Program `ebpf:"tc_egress"`
TcIngress *ebpf.Program `ebpf:"tc_ingress"`
}
TcBpfPrograms contains all programs after they have been loaded into the kernel.
It can be passed to LoadTcBpfObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*TcBpfPrograms) Close ¶
func (p *TcBpfPrograms) Close() error
type TcBpfSpecs ¶
type TcBpfSpecs struct {
TcBpfProgramSpecs
TcBpfMapSpecs
TcBpfVariableSpecs
}
TcBpfSpecs contains maps and programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type TcBpfVariableSpecs ¶
type TcBpfVariableSpecs struct {
}
TcBpfVariableSpecs contains global variables before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type TcBpfVariables ¶
type TcBpfVariables struct {
}
TcBpfVariables contains all global variables after they have been loaded into the kernel.
It can be passed to LoadTcBpfObjects or ebpf.CollectionSpec.LoadAndAssign.