initial drop of phosphor-ipmi-ethstats

initial drop of phosphor-ipmi-ethstats OEM IPMI commands.  These
commands return ethernet device statistics from the BMC.

Change-Id: Iece5d8604ef90f48f08ce1ae710dd295288ff23f
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/ethstats.hpp b/ethstats.hpp
new file mode 100644
index 0000000..ac170aa
--- /dev/null
+++ b/ethstats.hpp
@@ -0,0 +1,53 @@
+#pragma once
+
+#include <cstdint>
+
+namespace ethstats
+{
+
+/**
+ * @brief Ethstat Request structure.
+ */
+struct EthStatRequest
+{
+    uint8_t statId;
+    uint8_t if_name_len;
+    uint8_t if_name[0];
+} __attribute__((packed));
+
+/**
+ * @brief Ethstat Reply structure.
+ */
+struct EthStatReply
+{
+    uint8_t statId;
+    uint64_t value;
+} __attribute__((packed));
+
+enum EthernetStatisticsIds
+{
+    RX_BYTES = 0,
+    RX_COMPRESSED = 1,
+    RX_CRC_ERRORS = 2,
+    RX_DROPPED = 3,
+    RX_ERRORS = 4,
+    RX_FIFO_ERRORS = 5,
+    RX_FRAME_ERRORS = 6,
+    RX_LENGTH_ERRORS = 7,
+    RX_MISSED_ERRORS = 8,
+    RX_NOHANDLER = 9,
+    RX_OVER_ERRORS = 10,
+    RX_PACKETS = 11,
+    TX_ABORTED_ERRORS = 12,
+    TX_BYTES = 13,
+    TX_CARRIER_ERRORS = 14,
+    TX_COMPRESSED = 15,
+    TX_DROPPED = 16,
+    TX_ERRORS = 17,
+    TX_FIFO_ERRORS = 18,
+    TX_HEARTBEAT_ERRORS = 19,
+    TX_PACKETS = 20,
+    TX_WINDOW_ERRORS = 21,
+};
+
+} // namespace ethstats