inspektor-gadget
141 строка · 3.5 Кб
1// Code generated by bpf2go; DO NOT EDIT.
2//go:build arm64
3
4package containerhook5
6import (7"bytes"8_ "embed"9"fmt"10"io"11
12"github.com/cilium/ebpf"13)
14
15type execruntimeRecord struct {16Pid uint3217ArgsSize uint3218CallerComm [16]uint819Args [15360]uint820}
21
22// loadExecruntime returns the embedded CollectionSpec for execruntime.
23func loadExecruntime() (*ebpf.CollectionSpec, error) {24reader := bytes.NewReader(_ExecruntimeBytes)25spec, err := ebpf.LoadCollectionSpecFromReader(reader)26if err != nil {27return nil, fmt.Errorf("can't load execruntime: %w", err)28}29
30return spec, err31}
32
33// loadExecruntimeObjects loads execruntime and converts it into a struct.
34//
35// The following types are suitable as obj argument:
36//
37// *execruntimeObjects
38// *execruntimePrograms
39// *execruntimeMaps
40//
41// See ebpf.CollectionSpec.LoadAndAssign documentation for details.
42func loadExecruntimeObjects(obj interface{}, opts *ebpf.CollectionOptions) error {43spec, err := loadExecruntime()44if err != nil {45return err46}47
48return spec.LoadAndAssign(obj, opts)49}
50
51// execruntimeSpecs contains maps and programs before they are loaded into the kernel.
52//
53// It can be passed ebpf.CollectionSpec.Assign.
54type execruntimeSpecs struct {55execruntimeProgramSpecs
56execruntimeMapSpecs
57}
58
59// execruntimeSpecs contains programs before they are loaded into the kernel.
60//
61// It can be passed ebpf.CollectionSpec.Assign.
62type execruntimeProgramSpecs struct {63IgExecveE *ebpf.ProgramSpec `ebpf:"ig_execve_e"`64IgExecveX *ebpf.ProgramSpec `ebpf:"ig_execve_x"`65IgFaPickE *ebpf.ProgramSpec `ebpf:"ig_fa_pick_e"`66IgFaPickX *ebpf.ProgramSpec `ebpf:"ig_fa_pick_x"`67}
68
69// execruntimeMapSpecs contains maps before they are loaded into the kernel.
70//
71// It can be passed ebpf.CollectionSpec.Assign.
72type execruntimeMapSpecs struct {73ExecArgs *ebpf.MapSpec `ebpf:"exec_args"`74IgFaPickCtx *ebpf.MapSpec `ebpf:"ig_fa_pick_ctx"`75IgFaRecords *ebpf.MapSpec `ebpf:"ig_fa_records"`76}
77
78// execruntimeObjects contains all objects after they have been loaded into the kernel.
79//
80// It can be passed to loadExecruntimeObjects or ebpf.CollectionSpec.LoadAndAssign.
81type execruntimeObjects struct {82execruntimePrograms
83execruntimeMaps
84}
85
86func (o *execruntimeObjects) Close() error {87return _ExecruntimeClose(88&o.execruntimePrograms,89&o.execruntimeMaps,90)91}
92
93// execruntimeMaps contains all maps after they have been loaded into the kernel.
94//
95// It can be passed to loadExecruntimeObjects or ebpf.CollectionSpec.LoadAndAssign.
96type execruntimeMaps struct {97ExecArgs *ebpf.Map `ebpf:"exec_args"`98IgFaPickCtx *ebpf.Map `ebpf:"ig_fa_pick_ctx"`99IgFaRecords *ebpf.Map `ebpf:"ig_fa_records"`100}
101
102func (m *execruntimeMaps) Close() error {103return _ExecruntimeClose(104m.ExecArgs,105m.IgFaPickCtx,106m.IgFaRecords,107)108}
109
110// execruntimePrograms contains all programs after they have been loaded into the kernel.
111//
112// It can be passed to loadExecruntimeObjects or ebpf.CollectionSpec.LoadAndAssign.
113type execruntimePrograms struct {114IgExecveE *ebpf.Program `ebpf:"ig_execve_e"`115IgExecveX *ebpf.Program `ebpf:"ig_execve_x"`116IgFaPickE *ebpf.Program `ebpf:"ig_fa_pick_e"`117IgFaPickX *ebpf.Program `ebpf:"ig_fa_pick_x"`118}
119
120func (p *execruntimePrograms) Close() error {121return _ExecruntimeClose(122p.IgExecveE,123p.IgExecveX,124p.IgFaPickE,125p.IgFaPickX,126)127}
128
129func _ExecruntimeClose(closers ...io.Closer) error {130for _, closer := range closers {131if err := closer.Close(); err != nil {132return err133}134}135return nil136}
137
138// Do not access this directly.
139//
140//go:embed execruntime_bpfel_arm64.o
141var _ExecruntimeBytes []byte142