blob: 60a98b57934c6f7bd9beeda365e47b78e453d927 [file] [log] [blame]
Patrick Venture4d49ae62018-09-17 11:35:32 -07001#pragma once
2
William A. Kennington III2c9e1622019-02-07 15:45:19 -08003#include <ipmid/api.h>
Patrick Venture4d49ae62018-09-17 11:35:32 -07004
5namespace google
6{
7namespace ipmi
8{
9
Patrick Venture5d26d832019-03-13 16:31:09 -070010// The reply to the ethdevice command specifies the
11// IPMI channel number and the if_name used for the
12// ncis connection.
13struct EthDeviceReply
14{
15 uint8_t subcommand;
16 uint8_t channel;
17 // if_name_len doesn't include the null-terminator.
18 uint8_t if_name_len;
19 uint8_t if_name[0];
20} __attribute__((packed));
21
Patrick Venture4d49ae62018-09-17 11:35:32 -070022// Handle the eth query command.
23// Sys can query the if_name and IPMI channel of the BMC's NCSI ethernet
24// device.
25ipmi_ret_t GetEthDevice(const uint8_t* reqBuf, uint8_t* replyBuf,
26 size_t* dataLen);
27
28} // namespace ipmi
29} // namespace google