Documentation
¶
Index ¶
- func LoadBpf() (*ebpf.CollectionSpec, error)
- func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error
- type BpfIpInfo
- type BpfMapSpecs
- type BpfMaps
- type BpfNatKey
- type BpfNatValue
- type BpfObjects
- type BpfProgramSpecs
- type BpfPrograms
- type BpfQnameKey
- type BpfSockKey
- type BpfSpecs
- type BpfVariableSpecs
- type BpfVariables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadBpf ¶
func LoadBpf() (*ebpf.CollectionSpec, error)
LoadBpf returns the embedded CollectionSpec for Bpf.
func LoadBpfObjects ¶
func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error
LoadBpfObjects loads Bpf and converts it into a struct.
The following types are suitable as obj argument:
*BpfObjects *BpfPrograms *BpfMaps
See ebpf.CollectionSpec.LoadAndAssign documentation for details.
Types ¶
type BpfMapSpecs ¶
type BpfMapSpecs struct {
IpInfo *ebpf.MapSpec `ebpf:"ip_info"`
NatTable *ebpf.MapSpec `ebpf:"nat_table"`
QnameMap *ebpf.MapSpec `ebpf:"qname_map"`
Sockhash *ebpf.MapSpec `ebpf:"sockhash"`
}
BpfMapSpecs contains maps before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type BpfMaps ¶
type BpfMaps struct {
IpInfo *ebpf.Map `ebpf:"ip_info"`
NatTable *ebpf.Map `ebpf:"nat_table"`
QnameMap *ebpf.Map `ebpf:"qname_map"`
Sockhash *ebpf.Map `ebpf:"sockhash"`
}
BpfMaps contains all maps after they have been loaded into the kernel.
It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign.
type BpfNatValue ¶
type BpfObjects ¶
type BpfObjects struct {
BpfPrograms
BpfMaps
BpfVariables
}
BpfObjects contains all objects after they have been loaded into the kernel.
It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*BpfObjects) Close ¶
func (o *BpfObjects) Close() error
type BpfProgramSpecs ¶
type BpfProgramSpecs struct {
ExternalTcxEgress *ebpf.ProgramSpec `ebpf:"external_tcx_egress"`
ExternalTcxIngress *ebpf.ProgramSpec `ebpf:"external_tcx_ingress"`
NetkitPeer *ebpf.ProgramSpec `ebpf:"netkit_peer"`
NetkitPrimary *ebpf.ProgramSpec `ebpf:"netkit_primary"`
ProgMsgVerdict *ebpf.ProgramSpec `ebpf:"prog_msg_verdict"`
SockopsLogger *ebpf.ProgramSpec `ebpf:"sockops_logger"`
TapTcxEgress *ebpf.ProgramSpec `ebpf:"tap_tcx_egress"`
TapTcxIngress *ebpf.ProgramSpec `ebpf:"tap_tcx_ingress"`
XdpProg *ebpf.ProgramSpec `ebpf:"xdp_prog"`
}
BpfProgramSpecs contains programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type BpfPrograms ¶
type BpfPrograms struct {
ExternalTcxEgress *ebpf.Program `ebpf:"external_tcx_egress"`
ExternalTcxIngress *ebpf.Program `ebpf:"external_tcx_ingress"`
NetkitPeer *ebpf.Program `ebpf:"netkit_peer"`
NetkitPrimary *ebpf.Program `ebpf:"netkit_primary"`
ProgMsgVerdict *ebpf.Program `ebpf:"prog_msg_verdict"`
SockopsLogger *ebpf.Program `ebpf:"sockops_logger"`
TapTcxEgress *ebpf.Program `ebpf:"tap_tcx_egress"`
TapTcxIngress *ebpf.Program `ebpf:"tap_tcx_ingress"`
XdpProg *ebpf.Program `ebpf:"xdp_prog"`
}
BpfPrograms contains all programs after they have been loaded into the kernel.
It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*BpfPrograms) Close ¶
func (p *BpfPrograms) Close() error
type BpfQnameKey ¶
type BpfQnameKey struct{ Qname [256]uint8 }
type BpfSockKey ¶
type BpfSpecs ¶
type BpfSpecs struct {
BpfProgramSpecs
BpfMapSpecs
BpfVariableSpecs
}
BpfSpecs contains maps and programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type BpfVariableSpecs ¶
type BpfVariableSpecs struct {
DefaultMac *ebpf.VariableSpec `ebpf:"default_mac"`
}
BpfVariableSpecs contains global variables before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type BpfVariables ¶
BpfVariables contains all global variables after they have been loaded into the kernel.
It can be passed to LoadBpfObjects or ebpf.CollectionSpec.LoadAndAssign.