eth: move structure to header
Move the structure definition to the header file to expose it to the
testing code.
Change-Id: I019a322364e5d6c5cc9d79419c854ee47b65e03e
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/eth.cpp b/eth.cpp
index 6dbf077..45ce91b 100644
--- a/eth.cpp
+++ b/eth.cpp
@@ -32,18 +32,6 @@
uint8_t subcommand;
} __attribute__((packed));
-// The reply to the ethdevice command specifies the
-// IPMI channel number and the if_name used for the
-// ncis connection.
-struct EthDeviceReply
-{
- uint8_t subcommand;
- uint8_t channel;
- // if_name_len doesn't include the null-terminator.
- uint8_t if_name_len;
- uint8_t if_name[0];
-} __attribute__((packed));
-
// The phosphor-host-ipmi daemon requires a configuration that maps
// the if_name to the IPMI LAN channel. However, that doesn't strictly
// define which is meant to be used for NCSI.
diff --git a/eth.hpp b/eth.hpp
index fbd06ca..60a98b5 100644
--- a/eth.hpp
+++ b/eth.hpp
@@ -7,6 +7,18 @@
namespace ipmi
{
+// The reply to the ethdevice command specifies the
+// IPMI channel number and the if_name used for the
+// ncis connection.
+struct EthDeviceReply
+{
+ uint8_t subcommand;
+ uint8_t channel;
+ // if_name_len doesn't include the null-terminator.
+ uint8_t if_name_len;
+ uint8_t if_name[0];
+} __attribute__((packed));
+
// Handle the eth query command.
// Sys can query the if_name and IPMI channel of the BMC's NCSI ethernet
// device.