INNER CODE UNIT · Go
LoadBpfObjects
mozillazg/ptcpdump · bpf/bpf_arm_bpfel.go:139
func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error {
spec, err := LoadBpf()
if err != nil {
return err
}
return spec.LoadAndAssign(obj, opts)
}
// BpfSpecs contains maps and programs before they are loaded into the kernel.
//
// It can be passed ebpf.CollectionSpec.Assign.
type BpfSpecs struct {
BpfProgramSpecs
BpfMapSpecs
BpfVariableSpecs
}