inspektor-gadget
1// Code generated by bpf2go; DO NOT EDIT.
2//go:build 386 || amd64
3
4package tracer5
6import (7"bytes"8_ "embed"9"fmt"10"io"11
12"github.com/cilium/ebpf"13)
14
15type auditseccompEvent struct {16Pid uint6417MntnsId uint6418Timestamp uint6419Syscall uint6420Code uint6421Comm [16]uint822}
23
24// loadAuditseccomp returns the embedded CollectionSpec for auditseccomp.
25func loadAuditseccomp() (*ebpf.CollectionSpec, error) {26reader := bytes.NewReader(_AuditseccompBytes)27spec, err := ebpf.LoadCollectionSpecFromReader(reader)28if err != nil {29return nil, fmt.Errorf("can't load auditseccomp: %w", err)30}31
32return spec, err33}
34
35// loadAuditseccompObjects loads auditseccomp and converts it into a struct.
36//
37// The following types are suitable as obj argument:
38//
39// *auditseccompObjects
40// *auditseccompPrograms
41// *auditseccompMaps
42//
43// See ebpf.CollectionSpec.LoadAndAssign documentation for details.
44func loadAuditseccompObjects(obj interface{}, opts *ebpf.CollectionOptions) error {45spec, err := loadAuditseccomp()46if err != nil {47return err48}49
50return spec.LoadAndAssign(obj, opts)51}
52
53// auditseccompSpecs contains maps and programs before they are loaded into the kernel.
54//
55// It can be passed ebpf.CollectionSpec.Assign.
56type auditseccompSpecs struct {57auditseccompProgramSpecs
58auditseccompMapSpecs
59}
60
61// auditseccompSpecs contains programs before they are loaded into the kernel.
62//
63// It can be passed ebpf.CollectionSpec.Assign.
64type auditseccompProgramSpecs struct {65IgAuditSecc *ebpf.ProgramSpec `ebpf:"ig_audit_secc"`66}
67
68// auditseccompMapSpecs contains maps before they are loaded into the kernel.
69//
70// It can be passed ebpf.CollectionSpec.Assign.
71type auditseccompMapSpecs struct {72Events *ebpf.MapSpec `ebpf:"events"`73GadgetMntnsFilterMap *ebpf.MapSpec `ebpf:"gadget_mntns_filter_map"`74TmpEvent *ebpf.MapSpec `ebpf:"tmp_event"`75}
76
77// auditseccompObjects contains all objects after they have been loaded into the kernel.
78//
79// It can be passed to loadAuditseccompObjects or ebpf.CollectionSpec.LoadAndAssign.
80type auditseccompObjects struct {81auditseccompPrograms
82auditseccompMaps
83}
84
85func (o *auditseccompObjects) Close() error {86return _AuditseccompClose(87&o.auditseccompPrograms,88&o.auditseccompMaps,89)90}
91
92// auditseccompMaps contains all maps after they have been loaded into the kernel.
93//
94// It can be passed to loadAuditseccompObjects or ebpf.CollectionSpec.LoadAndAssign.
95type auditseccompMaps struct {96Events *ebpf.Map `ebpf:"events"`97GadgetMntnsFilterMap *ebpf.Map `ebpf:"gadget_mntns_filter_map"`98TmpEvent *ebpf.Map `ebpf:"tmp_event"`99}
100
101func (m *auditseccompMaps) Close() error {102return _AuditseccompClose(103m.Events,104m.GadgetMntnsFilterMap,105m.TmpEvent,106)107}
108
109// auditseccompPrograms contains all programs after they have been loaded into the kernel.
110//
111// It can be passed to loadAuditseccompObjects or ebpf.CollectionSpec.LoadAndAssign.
112type auditseccompPrograms struct {113IgAuditSecc *ebpf.Program `ebpf:"ig_audit_secc"`114}
115
116func (p *auditseccompPrograms) Close() error {117return _AuditseccompClose(118p.IgAuditSecc,119)120}
121
122func _AuditseccompClose(closers ...io.Closer) error {123for _, closer := range closers {124if err := closer.Close(); err != nil {125return err126}127}128return nil129}
130
131// Do not access this directly.
132//
133//go:embed auditseccomp_bpfel_x86.o
134var _AuditseccompBytes []byte135