1 #pragma once 2 3 #include "handler.hpp" 4 5 #include <ipmid/api.h> 6 7 namespace google 8 { 9 namespace ipmi 10 { 11 12 // The reply to the ethdevice command specifies the 13 // IPMI channel number and the ifName used for the 14 // ncis connection. 15 struct EthDeviceReply 16 { 17 uint8_t subcommand; 18 uint8_t channel; 19 // ifNameLength doesn't include the null-terminator. 20 uint8_t ifNameLength; 21 } __attribute__((packed)); 22 23 // Handle the eth query command. 24 // Sys can query the ifName and IPMI channel of the BMC's NCSI ethernet 25 // device. 26 ipmi_ret_t getEthDevice(const uint8_t* reqBuf, uint8_t* replyBuf, 27 size_t* dataLen, const HandlerInterface* handler); 28 29 } // namespace ipmi 30 } // namespace google 31