inspektor-gadget

Форк
0
/
tcpretrans_bpfel_arm64.go 
152 строки · 3.5 Кб
1
// Code generated by bpf2go; DO NOT EDIT.
2
//go:build arm64
3

4
package tracer
5

6
import (
7
	"bytes"
8
	_ "embed"
9
	"fmt"
10
	"io"
11

12
	"github.com/cilium/ebpf"
13
)
14

15
type tcpretransEvent struct {
16
	Saddr       [16]uint8
17
	Daddr       [16]uint8
18
	Timestamp   uint64
19
	Af          uint16
20
	Dport       uint16
21
	Sport       uint16
22
	State       uint8
23
	Tcpflags    uint8
24
	Reason      uint32
25
	Netns       uint32
26
	ProcCurrent struct {
27
		MountNsId uint64
28
		Pid       uint32
29
		Tid       uint32
30
		Uid       uint32
31
		Gid       uint32
32
		Task      [16]uint8
33
	}
34
	ProcSocket struct {
35
		MountNsId uint64
36
		Pid       uint32
37
		Tid       uint32
38
		Uid       uint32
39
		Gid       uint32
40
		Task      [16]uint8
41
	}
42
	_ [8]byte
43
}
44

45
// loadTcpretrans returns the embedded CollectionSpec for tcpretrans.
46
func loadTcpretrans() (*ebpf.CollectionSpec, error) {
47
	reader := bytes.NewReader(_TcpretransBytes)
48
	spec, err := ebpf.LoadCollectionSpecFromReader(reader)
49
	if err != nil {
50
		return nil, fmt.Errorf("can't load tcpretrans: %w", err)
51
	}
52

53
	return spec, err
54
}
55

56
// loadTcpretransObjects loads tcpretrans and converts it into a struct.
57
//
58
// The following types are suitable as obj argument:
59
//
60
//	*tcpretransObjects
61
//	*tcpretransPrograms
62
//	*tcpretransMaps
63
//
64
// See ebpf.CollectionSpec.LoadAndAssign documentation for details.
65
func loadTcpretransObjects(obj interface{}, opts *ebpf.CollectionOptions) error {
66
	spec, err := loadTcpretrans()
67
	if err != nil {
68
		return err
69
	}
70

71
	return spec.LoadAndAssign(obj, opts)
72
}
73

74
// tcpretransSpecs contains maps and programs before they are loaded into the kernel.
75
//
76
// It can be passed ebpf.CollectionSpec.Assign.
77
type tcpretransSpecs struct {
78
	tcpretransProgramSpecs
79
	tcpretransMapSpecs
80
}
81

82
// tcpretransSpecs contains programs before they are loaded into the kernel.
83
//
84
// It can be passed ebpf.CollectionSpec.Assign.
85
type tcpretransProgramSpecs struct {
86
	IgTcpretrans *ebpf.ProgramSpec `ebpf:"ig_tcpretrans"`
87
}
88

89
// tcpretransMapSpecs contains maps before they are loaded into the kernel.
90
//
91
// It can be passed ebpf.CollectionSpec.Assign.
92
type tcpretransMapSpecs struct {
93
	Events        *ebpf.MapSpec `ebpf:"events"`
94
	GadgetSockets *ebpf.MapSpec `ebpf:"gadget_sockets"`
95
}
96

97
// tcpretransObjects contains all objects after they have been loaded into the kernel.
98
//
99
// It can be passed to loadTcpretransObjects or ebpf.CollectionSpec.LoadAndAssign.
100
type tcpretransObjects struct {
101
	tcpretransPrograms
102
	tcpretransMaps
103
}
104

105
func (o *tcpretransObjects) Close() error {
106
	return _TcpretransClose(
107
		&o.tcpretransPrograms,
108
		&o.tcpretransMaps,
109
	)
110
}
111

112
// tcpretransMaps contains all maps after they have been loaded into the kernel.
113
//
114
// It can be passed to loadTcpretransObjects or ebpf.CollectionSpec.LoadAndAssign.
115
type tcpretransMaps struct {
116
	Events        *ebpf.Map `ebpf:"events"`
117
	GadgetSockets *ebpf.Map `ebpf:"gadget_sockets"`
118
}
119

120
func (m *tcpretransMaps) Close() error {
121
	return _TcpretransClose(
122
		m.Events,
123
		m.GadgetSockets,
124
	)
125
}
126

127
// tcpretransPrograms contains all programs after they have been loaded into the kernel.
128
//
129
// It can be passed to loadTcpretransObjects or ebpf.CollectionSpec.LoadAndAssign.
130
type tcpretransPrograms struct {
131
	IgTcpretrans *ebpf.Program `ebpf:"ig_tcpretrans"`
132
}
133

134
func (p *tcpretransPrograms) Close() error {
135
	return _TcpretransClose(
136
		p.IgTcpretrans,
137
	)
138
}
139

140
func _TcpretransClose(closers ...io.Closer) error {
141
	for _, closer := range closers {
142
		if err := closer.Close(); err != nil {
143
			return err
144
		}
145
	}
146
	return nil
147
}
148

149
// Do not access this directly.
150
//
151
//go:embed tcpretrans_bpfel_arm64.o
152
var _TcpretransBytes []byte
153

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.