1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
// This file is part of linux-support. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/linux-support/master/COPYRIGHT. No part of linux-support, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
// Copyright © 2020 The developers of linux-support. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/linux-support/master/COPYRIGHT.
/// Get settings.
///
/// Please use `ETHTOOL_GLINKSETTINGS`.
pub const ETHTOOL_GSET: u32 = 0x00000001;
/// Set settings.
///
/// Please use `ETHTOOL_SLINKSETTINGS`.
pub const ETHTOOL_SSET: u32 = 0x00000002;
/// Get driver information.
pub const ETHTOOL_GDRVINFO: u32 = 0x00000003;
/// Get NIC registers.
pub const ETHTOOL_GREGS: u32 = 0x00000004;
/// Get wake-on-lan options.
pub const ETHTOOL_GWOL: u32 = 0x00000005;
/// Set wake-on-lan options.
pub const ETHTOOL_SWOL: u32 = 0x00000006;
/// Get driver message level
pub const ETHTOOL_GMSGLVL: u32 = 0x00000007;
/// Set driver message level.
pub const ETHTOOL_SMSGLVL: u32 = 0x00000008;
/// Restart autonegotiation.
pub const ETHTOOL_NWAY_RST: u32 = 0x00000009;
/// Get link status for host, ie whether the interface *and* the physical port (if there is one) are up (is an `ethtool_value`).
pub const ETHTOOL_GLINK: u32 = 0x0000000A;
/// Get EEPROM data.
pub const ETHTOOL_GEEPROM: u32 = 0x0000000B;
/// Set EEPROM data.
pub const ETHTOOL_SEEPROM: u32 = 0x0000000C;
/// Get coalesce configuration.
pub const ETHTOOL_GCOALESCE: u32 = 0x0000000E;
/// Set coalesce configuration.
pub const ETHTOOL_SCOALESCE: u32 = 0x0000000F;
/// Get ring parameters.
pub const ETHTOOL_GRINGPARAM: u32 = 0x00000010;
/// Set ring parameters.
pub const ETHTOOL_SRINGPARAM: u32 = 0x00000011;
/// Get pause parameters.
pub const ETHTOOL_GPAUSEPARAM: u32 = 0x00000012;
/// Set pause parameters.
pub const ETHTOOL_SPAUSEPARAM: u32 = 0x00000013;
/// Get receive hardware checksum enable (is an `ethtool_value`).
pub const ETHTOOL_GRXCSUM: u32 = 0x00000014;
/// Set receive hardware checksum enable (is an `ethtool_value`).
pub const ETHTOOL_SRXCSUM: u32 = 0x00000015;
/// Get transmit hardware checksum enable (is an `ethtool_value`).
pub const ETHTOOL_GTXCSUM: u32 = 0x00000016;
/// Set transmit hardware checksum enable (is an `ethtool_value`).
pub const ETHTOOL_STXCSUM: u32 = 0x00000017;
/// Get scatter-gather enable (is an `ethtool_value`).
pub const ETHTOOL_GSG: u32 = 0x00000018;
/// Set scatter-gather enable (is an `ethtool_value`).
pub const ETHTOOL_SSG: u32 = 0x00000019;
/// Execute NIC self-test.
pub const ETHTOOL_TEST: u32 = 0x0000001A;
/// Get specified string set.
pub const ETHTOOL_GSTRINGS: u32 = 0x0000001B;
/// Identify the NIC.
pub const ETHTOOL_PHYS_ID: u32 = 0x0000001C;
/// Get NIC-specific statistics.
pub const ETHTOOL_GSTATS: u32 = 0x0000001D;
/// Get TSO enable (is an `ethtool_value`).
pub const ETHTOOL_GTSO: u32 = 0x0000001E;
/// Set TSO enable (is an `ethtool_value`).
pub const ETHTOOL_STSO: u32 = 0x0000001F;
/// Get permanent hardware address.
pub const ETHTOOL_GPERMADDR: u32 = 0x00000020;
/// Get UFO enable (is an `ethtool_value`).
pub const ETHTOOL_GUFO: u32 = 0x00000021;
/// Set UFO enable (is an `ethtool_value`).
pub const ETHTOOL_SUFO: u32 = 0x00000022;
/// Get GSO enable (is an `ethtool_value`).
pub const ETHTOOL_GGSO: u32 = 0x00000023;
/// Set GSO enable (is an `ethtool_value`).
pub const ETHTOOL_SGSO: u32 = 0x00000024;
/// Get flags bitmap (is an `ethtool_value`).
pub const ETHTOOL_GFLAGS: u32 = 0x00000025;
/// Set flags bitmap (is an `ethtool_value`).
pub const ETHTOOL_SFLAGS: u32 = 0x00000026;
/// Get driver-private flags bitmap.
pub const ETHTOOL_GPFLAGS: u32 = 0x00000027;
/// Set driver-private flags bitmap.
pub const ETHTOOL_SPFLAGS: u32 = 0x00000028;
/// Get receive flow hash configuration.
pub const ETHTOOL_GRXFH: u32 = 0x00000029;
/// Set receive flow hash configuration.
pub const ETHTOOL_SRXFH: u32 = 0x0000002A;
/// Get GRO enable (is an `ethtool_value`).
pub const ETHTOOL_GGRO: u32 = 0x0000002B;
/// Set GRO enable (is an `ethtool_value`).
pub const ETHTOOL_SGRO: u32 = 0x0000002C;
/// Get receive rings available for load-balancing (LB).
pub const ETHTOOL_GRXRINGS: u32 = 0x0000002D;
/// Get receive class rule count.
///
/// Used by Network Flow Classifier.
pub const ETHTOOL_GRXCLSRLCNT: u32 = 0x0000002E;
/// Get receive classification rule.
///
/// Used by Network Flow Classifier.
pub const ETHTOOL_GRXCLSRULE: u32 = 0x0000002F;
/// Get all receive classification rule.
///
/// Used by Network Flow Classifier.
pub const ETHTOOL_GRXCLSRLALL: u32 = 0x00000030;
/// Delete receive classification rule.
///
/// Used by Network Flow Classifier.
pub const ETHTOOL_SRXCLSRLDEL: u32 = 0x00000031;
/// Insert receive classification rule.
///
/// Used by Network Flow Classifier.
pub const ETHTOOL_SRXCLSRLINS: u32 = 0x00000032;
/// Flash firmware to device.
pub const ETHTOOL_FLASHDEV: u32 = 0x00000033;
/// Reset hardware.
pub const ETHTOOL_RESET: u32 = 0x00000034;
/// Add an n-tuple filter to device.
///
/// No longer used by any drivers in Linux 5.8.
pub const ETHTOOL_SRXNTUPLE: u32 = 0x00000035;
/// No longer used by any drivers in Linux 5.8.
pub const ETHTOOL_GRXNTUPLE: u32 = 0x00000036;
/// Get string set info.
pub const ETHTOOL_GSSET_INFO: u32 = 0x00000037;
/// Get receive flow hash indirection table.
pub const ETHTOOL_GRXFHINDIR: u32 = 0x00000038;
/// Set receive flow hash indirection table.
pub const ETHTOOL_SRXFHINDIR: u32 = 0x00000039;
/// Get device offload settings.
pub const ETHTOOL_GFEATURES: u32 = 0x0000003A;
/// Change device offload settings.
pub const ETHTOOL_SFEATURES: u32 = 0x0000003B;
/// Get number of channels.
pub const ETHTOOL_GCHANNELS: u32 = 0x0000003C;
/// Set number of channels.
pub const ETHTOOL_SCHANNELS: u32 = 0x0000003D;
/// Set dump settings.
pub const ETHTOOL_SET_DUMP: u32 = 0x0000003E;
/// Get dump settings.
pub const ETHTOOL_GET_DUMP_FLAG: u32 = 0x0000003F;
/// Get dump data.
pub const ETHTOOL_GET_DUMP_DATA: u32 = 0x00000040;
/// Get time stamping and PHC information.
pub const ETHTOOL_GET_TS_INFO: u32 = 0x00000041;
/// Get plug-in module information.
pub const ETHTOOL_GMODULEINFO: u32 = 0x00000042;
/// Get plug-in module eeprom.
pub const ETHTOOL_GMODULEEEPROM: u32 = 0x00000043;
/// Get Energy Efficient Ethernet (EEE) settings.
pub const ETHTOOL_GEEE: u32 = 0x00000044;
/// Set Energy Efficient Ethernet (EEE) settings.
pub const ETHTOOL_SEEE: u32 = 0x00000045;
/// Get receive flow hash configuration.
pub const ETHTOOL_GRSSH: u32 = 0x00000046;
/// Set receive flow hash configuration.
pub const ETHTOOL_SRSSH: u32 = 0x00000047;
/// Get tunable configuration.
pub const ETHTOOL_GTUNABLE: u32 = 0x00000048;
/// Set tunable configuration.
pub const ETHTOOL_STUNABLE: u32 = 0x00000049;
/// get PHY-specific statistics.
pub const ETHTOOL_GPHYSTATS: u32 = 0x0000004A;
/// Set per queue options.
pub const ETHTOOL_PERQUEUE: u32 = 0x0000004B;
/// Get ethtool_link_settings.
pub const ETHTOOL_GLINKSETTINGS: u32 = 0x0000004C;
/// Set ethtool_link_settings.
pub const ETHTOOL_SLINKSETTINGS: u32 = 0x0000004D;
/// Get PHY tunable configuration.
pub const ETHTOOL_PHY_GTUNABLE: u32 = 0x0000004E;
/// Set PHY tunable configuration.
pub const ETHTOOL_PHY_STUNABLE: u32 = 0x0000004F;
/// Get Forward Error Correction (FEC) settings.
pub const ETHTOOL_GFECPARAM: u32 = 0x00000050;
/// Set Forward Error Correction (FEC) settings.
pub const ETHTOOL_SFECPARAM: u32 = 0x00000051;