1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef _LINUX_ETHTOOL_H
13 #define _LINUX_ETHTOOL_H
15 #include <linux/types.h>
34 #define ETHTOOL_BUSINFO_LEN 32
35 struct ethtool_drvinfo {
40 char bus_info[ETHTOOL_BUSINFO_LEN];
52 struct ethtool_wolinfo {
56 __u8 sopass[SOPASS_MAX];
59 struct ethtool_value {
71 struct ethtool_eeprom {
79 struct ethtool_coalesce {
82 __u32 rx_coalesce_usecs;
84 __u32 rx_max_coalesced_frames;
86 __u32 rx_coalesce_usecs_irq;
87 __u32 rx_max_coalesced_frames_irq;
89 __u32 tx_coalesce_usecs;
91 __u32 tx_max_coalesced_frames;
93 __u32 tx_coalesce_usecs_irq;
94 __u32 tx_max_coalesced_frames_irq;
96 __u32 stats_block_coalesce_usecs;
98 __u32 use_adaptive_rx_coalesce;
99 __u32 use_adaptive_tx_coalesce;
102 __u32 rx_coalesce_usecs_low;
103 __u32 rx_max_coalesced_frames_low;
104 __u32 tx_coalesce_usecs_low;
105 __u32 tx_max_coalesced_frames_low;
108 __u32 rx_coalesce_usecs_high;
109 __u32 rx_max_coalesced_frames_high;
110 __u32 tx_coalesce_usecs_high;
111 __u32 tx_max_coalesced_frames_high;
113 __u32 rate_sample_interval;
116 struct ethtool_ringparam {
119 __u32 rx_max_pending;
120 __u32 rx_mini_max_pending;
121 __u32 rx_jumbo_max_pending;
122 __u32 tx_max_pending;
125 __u32 rx_mini_pending;
126 __u32 rx_jumbo_pending;
130 struct ethtool_pauseparam {
138 #define ETH_GSTRING_LEN 32
139 enum ethtool_stringset {
145 struct ethtool_gstrings {
152 enum ethtool_test_flags {
153 ETH_TEST_FL_OFFLINE = (1 << 0),
154 ETH_TEST_FL_FAILED = (1 << 1),
157 struct ethtool_test {
165 struct ethtool_stats {
171 struct ethtool_perm_addr {
178 ETH_FLAG_LRO = (1 << 15),
181 struct ethtool_rxnfc {
187 #define ETHTOOL_GSET 0x00000001
188 #define ETHTOOL_SSET 0x00000002
189 #define ETHTOOL_GDRVINFO 0x00000003
190 #define ETHTOOL_GREGS 0x00000004
191 #define ETHTOOL_GWOL 0x00000005
192 #define ETHTOOL_SWOL 0x00000006
193 #define ETHTOOL_GMSGLVL 0x00000007
194 #define ETHTOOL_SMSGLVL 0x00000008
195 #define ETHTOOL_NWAY_RST 0x00000009
196 #define ETHTOOL_GLINK 0x0000000a
197 #define ETHTOOL_GEEPROM 0x0000000b
198 #define ETHTOOL_SEEPROM 0x0000000c
199 #define ETHTOOL_GCOALESCE 0x0000000e
200 #define ETHTOOL_SCOALESCE 0x0000000f
201 #define ETHTOOL_GRINGPARAM 0x00000010
202 #define ETHTOOL_SRINGPARAM 0x00000011
203 #define ETHTOOL_GPAUSEPARAM 0x00000012
204 #define ETHTOOL_SPAUSEPARAM 0x00000013
205 #define ETHTOOL_GRXCSUM 0x00000014
206 #define ETHTOOL_SRXCSUM 0x00000015
207 #define ETHTOOL_GTXCSUM 0x00000016
208 #define ETHTOOL_STXCSUM 0x00000017
209 #define ETHTOOL_GSG 0x00000018
210 #define ETHTOOL_SSG 0x00000019
211 #define ETHTOOL_TEST 0x0000001a
212 #define ETHTOOL_GSTRINGS 0x0000001b
213 #define ETHTOOL_PHYS_ID 0x0000001c
214 #define ETHTOOL_GSTATS 0x0000001d
215 #define ETHTOOL_GTSO 0x0000001e
216 #define ETHTOOL_STSO 0x0000001f
217 #define ETHTOOL_GPERMADDR 0x00000020
218 #define ETHTOOL_GUFO 0x00000021
219 #define ETHTOOL_SUFO 0x00000022
220 #define ETHTOOL_GGSO 0x00000023
221 #define ETHTOOL_SGSO 0x00000024
222 #define ETHTOOL_GFLAGS 0x00000025
223 #define ETHTOOL_SFLAGS 0x00000026
224 #define ETHTOOL_GPFLAGS 0x00000027
225 #define ETHTOOL_SPFLAGS 0x00000028
227 #define ETHTOOL_GRXFH 0x00000029
228 #define ETHTOOL_SRXFH 0x0000002a
229 #define ETHTOOL_GGRO 0x0000002b
230 #define ETHTOOL_SGRO 0x0000002c
232 #define SPARC_ETH_GSET ETHTOOL_GSET
233 #define SPARC_ETH_SSET ETHTOOL_SSET
235 #define SUPPORTED_10baseT_Half (1 << 0)
236 #define SUPPORTED_10baseT_Full (1 << 1)
237 #define SUPPORTED_100baseT_Half (1 << 2)
238 #define SUPPORTED_100baseT_Full (1 << 3)
239 #define SUPPORTED_1000baseT_Half (1 << 4)
240 #define SUPPORTED_1000baseT_Full (1 << 5)
241 #define SUPPORTED_Autoneg (1 << 6)
242 #define SUPPORTED_TP (1 << 7)
243 #define SUPPORTED_AUI (1 << 8)
244 #define SUPPORTED_MII (1 << 9)
245 #define SUPPORTED_FIBRE (1 << 10)
246 #define SUPPORTED_BNC (1 << 11)
247 #define SUPPORTED_10000baseT_Full (1 << 12)
248 #define SUPPORTED_Pause (1 << 13)
249 #define SUPPORTED_Asym_Pause (1 << 14)
250 #define SUPPORTED_2500baseX_Full (1 << 15)
252 #define ADVERTISED_10baseT_Half (1 << 0)
253 #define ADVERTISED_10baseT_Full (1 << 1)
254 #define ADVERTISED_100baseT_Half (1 << 2)
255 #define ADVERTISED_100baseT_Full (1 << 3)
256 #define ADVERTISED_1000baseT_Half (1 << 4)
257 #define ADVERTISED_1000baseT_Full (1 << 5)
258 #define ADVERTISED_Autoneg (1 << 6)
259 #define ADVERTISED_TP (1 << 7)
260 #define ADVERTISED_AUI (1 << 8)
261 #define ADVERTISED_MII (1 << 9)
262 #define ADVERTISED_FIBRE (1 << 10)
263 #define ADVERTISED_BNC (1 << 11)
264 #define ADVERTISED_10000baseT_Full (1 << 12)
265 #define ADVERTISED_Pause (1 << 13)
266 #define ADVERTISED_Asym_Pause (1 << 14)
267 #define ADVERTISED_2500baseX_Full (1 << 15)
270 #define SPEED_100 100
271 #define SPEED_1000 1000
272 #define SPEED_2500 2500
273 #define SPEED_10000 10000
275 #define DUPLEX_HALF 0x00
276 #define DUPLEX_FULL 0x01
279 #define PORT_AUI 0x01
280 #define PORT_MII 0x02
281 #define PORT_FIBRE 0x03
282 #define PORT_BNC 0x04
284 #define XCVR_INTERNAL 0x00
285 #define XCVR_EXTERNAL 0x01
286 #define XCVR_DUMMY1 0x02
287 #define XCVR_DUMMY2 0x03
288 #define XCVR_DUMMY3 0x04
290 #define AUTONEG_DISABLE 0x00
291 #define AUTONEG_ENABLE 0x01
293 #define WAKE_PHY (1 << 0)
294 #define WAKE_UCAST (1 << 1)
295 #define WAKE_MCAST (1 << 2)
296 #define WAKE_BCAST (1 << 3)
297 #define WAKE_ARP (1 << 4)
298 #define WAKE_MAGIC (1 << 5)
299 #define WAKE_MAGICSECURE (1 << 6)
301 #define TCP_V4_FLOW 0x01
302 #define UDP_V4_FLOW 0x02
303 #define SCTP_V4_FLOW 0x03
304 #define AH_ESP_V4_FLOW 0x04
305 #define TCP_V6_FLOW 0x05
306 #define UDP_V6_FLOW 0x06
307 #define SCTP_V6_FLOW 0x07
308 #define AH_ESP_V6_FLOW 0x08
310 #define RXH_DEV_PORT (1 << 0)
311 #define RXH_L2DA (1 << 1)
312 #define RXH_VLAN (1 << 2)
313 #define RXH_L3_PROTO (1 << 3)
314 #define RXH_IP_SRC (1 << 4)
315 #define RXH_IP_DST (1 << 5)
316 #define RXH_L4_B_0_1 (1 << 6)
317 #define RXH_L4_B_2_3 (1 << 7)
318 #define RXH_DISCARD (1 << 31)