blob: 12805ded14c2ff05fd0cfa1961cc5edd1014c2b4 [file] [log] [blame]
Patrick Ventured26fff42018-09-18 15:37:59 -07001#pragma once
2
3#include <cstdint>
4
5namespace ethstats
6{
7
8/**
9 * @brief Ethstat Request structure.
10 */
11struct EthStatRequest
12{
13 uint8_t statId;
14 uint8_t if_name_len;
Patrick Ventured26fff42018-09-18 15:37:59 -070015} __attribute__((packed));
16
17/**
18 * @brief Ethstat Reply structure.
19 */
20struct EthStatReply
21{
22 uint8_t statId;
23 uint64_t value;
24} __attribute__((packed));
25
26enum EthernetStatisticsIds
27{
28 RX_BYTES = 0,
29 RX_COMPRESSED = 1,
30 RX_CRC_ERRORS = 2,
31 RX_DROPPED = 3,
32 RX_ERRORS = 4,
33 RX_FIFO_ERRORS = 5,
34 RX_FRAME_ERRORS = 6,
35 RX_LENGTH_ERRORS = 7,
36 RX_MISSED_ERRORS = 8,
37 RX_NOHANDLER = 9,
38 RX_OVER_ERRORS = 10,
39 RX_PACKETS = 11,
40 TX_ABORTED_ERRORS = 12,
41 TX_BYTES = 13,
42 TX_CARRIER_ERRORS = 14,
43 TX_COMPRESSED = 15,
44 TX_DROPPED = 16,
45 TX_ERRORS = 17,
46 TX_FIFO_ERRORS = 18,
47 TX_HEARTBEAT_ERRORS = 19,
48 TX_PACKETS = 20,
49 TX_WINDOW_ERRORS = 21,
50};
51
52} // namespace ethstats