| Patrick Venture | 4d49ae6 | 2018-09-17 11:35:32 -0700 | [diff] [blame] | 1 | #pragma once | 
|  | 2 |  | 
| Patrick Venture | f085d91 | 2019-03-15 08:50:00 -0700 | [diff] [blame^] | 3 | #include "handler.hpp" | 
|  | 4 |  | 
| William A. Kennington III | 2c9e162 | 2019-02-07 15:45:19 -0800 | [diff] [blame] | 5 | #include <ipmid/api.h> | 
| Patrick Venture | 4d49ae6 | 2018-09-17 11:35:32 -0700 | [diff] [blame] | 6 |  | 
|  | 7 | namespace google | 
|  | 8 | { | 
|  | 9 | namespace ipmi | 
|  | 10 | { | 
|  | 11 |  | 
| Patrick Venture | 5d26d83 | 2019-03-13 16:31:09 -0700 | [diff] [blame] | 12 | // The reply to the ethdevice command specifies the | 
|  | 13 | // IPMI channel number and the if_name used for the | 
|  | 14 | // ncis connection. | 
|  | 15 | struct EthDeviceReply | 
|  | 16 | { | 
|  | 17 | uint8_t subcommand; | 
|  | 18 | uint8_t channel; | 
|  | 19 | // if_name_len doesn't include the null-terminator. | 
|  | 20 | uint8_t if_name_len; | 
|  | 21 | uint8_t if_name[0]; | 
|  | 22 | } __attribute__((packed)); | 
|  | 23 |  | 
| Patrick Venture | 4d49ae6 | 2018-09-17 11:35:32 -0700 | [diff] [blame] | 24 | // Handle the eth query command. | 
|  | 25 | // Sys can query the if_name and IPMI channel of the BMC's NCSI ethernet | 
|  | 26 | // device. | 
|  | 27 | ipmi_ret_t GetEthDevice(const uint8_t* reqBuf, uint8_t* replyBuf, | 
| Patrick Venture | f085d91 | 2019-03-15 08:50:00 -0700 | [diff] [blame^] | 28 | size_t* dataLen, | 
|  | 29 | const HandlerInterface* handler = &handlerImpl); | 
| Patrick Venture | 4d49ae6 | 2018-09-17 11:35:32 -0700 | [diff] [blame] | 30 |  | 
|  | 31 | } // namespace ipmi | 
|  | 32 | } // namespace google |