1
// Code generated by bpf2go; DO NOT EDIT.
12
"github.com/cilium/ebpf"
15
type bindsnoopBindEvent struct {
33
// loadBindsnoop returns the embedded CollectionSpec for bindsnoop.
34
func loadBindsnoop() (*ebpf.CollectionSpec, error) {
35
reader := bytes.NewReader(_BindsnoopBytes)
36
spec, err := ebpf.LoadCollectionSpecFromReader(reader)
38
return nil, fmt.Errorf("can't load bindsnoop: %w", err)
44
// loadBindsnoopObjects loads bindsnoop and converts it into a struct.
46
// The following types are suitable as obj argument:
52
// See ebpf.CollectionSpec.LoadAndAssign documentation for details.
53
func loadBindsnoopObjects(obj interface{}, opts *ebpf.CollectionOptions) error {
54
spec, err := loadBindsnoop()
59
return spec.LoadAndAssign(obj, opts)
62
// bindsnoopSpecs contains maps and programs before they are loaded into the kernel.
64
// It can be passed ebpf.CollectionSpec.Assign.
65
type bindsnoopSpecs struct {
70
// bindsnoopSpecs contains programs before they are loaded into the kernel.
72
// It can be passed ebpf.CollectionSpec.Assign.
73
type bindsnoopProgramSpecs struct {
74
IgBindIpv4E *ebpf.ProgramSpec `ebpf:"ig_bind_ipv4_e"`
75
IgBindIpv4X *ebpf.ProgramSpec `ebpf:"ig_bind_ipv4_x"`
76
IgBindIpv6E *ebpf.ProgramSpec `ebpf:"ig_bind_ipv6_e"`
77
IgBindIpv6X *ebpf.ProgramSpec `ebpf:"ig_bind_ipv6_x"`
80
// bindsnoopMapSpecs contains maps before they are loaded into the kernel.
82
// It can be passed ebpf.CollectionSpec.Assign.
83
type bindsnoopMapSpecs struct {
84
Events *ebpf.MapSpec `ebpf:"events"`
85
GadgetMntnsFilterMap *ebpf.MapSpec `ebpf:"gadget_mntns_filter_map"`
86
Ports *ebpf.MapSpec `ebpf:"ports"`
87
Sockets *ebpf.MapSpec `ebpf:"sockets"`
90
// bindsnoopObjects contains all objects after they have been loaded into the kernel.
92
// It can be passed to loadBindsnoopObjects or ebpf.CollectionSpec.LoadAndAssign.
93
type bindsnoopObjects struct {
98
func (o *bindsnoopObjects) Close() error {
99
return _BindsnoopClose(
100
&o.bindsnoopPrograms,
105
// bindsnoopMaps contains all maps after they have been loaded into the kernel.
107
// It can be passed to loadBindsnoopObjects or ebpf.CollectionSpec.LoadAndAssign.
108
type bindsnoopMaps struct {
109
Events *ebpf.Map `ebpf:"events"`
110
GadgetMntnsFilterMap *ebpf.Map `ebpf:"gadget_mntns_filter_map"`
111
Ports *ebpf.Map `ebpf:"ports"`
112
Sockets *ebpf.Map `ebpf:"sockets"`
115
func (m *bindsnoopMaps) Close() error {
116
return _BindsnoopClose(
118
m.GadgetMntnsFilterMap,
124
// bindsnoopPrograms contains all programs after they have been loaded into the kernel.
126
// It can be passed to loadBindsnoopObjects or ebpf.CollectionSpec.LoadAndAssign.
127
type bindsnoopPrograms struct {
128
IgBindIpv4E *ebpf.Program `ebpf:"ig_bind_ipv4_e"`
129
IgBindIpv4X *ebpf.Program `ebpf:"ig_bind_ipv4_x"`
130
IgBindIpv6E *ebpf.Program `ebpf:"ig_bind_ipv6_e"`
131
IgBindIpv6X *ebpf.Program `ebpf:"ig_bind_ipv6_x"`
134
func (p *bindsnoopPrograms) Close() error {
135
return _BindsnoopClose(
143
func _BindsnoopClose(closers ...io.Closer) error {
144
for _, closer := range closers {
145
if err := closer.Close(); err != nil {
152
// Do not access this directly.
154
//go:embed bindsnoop_bpfel_x86.o
155
var _BindsnoopBytes []byte