Patrick Venture | 54c3b53 | 2018-08-01 11:45:49 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "host-ipmid/ipmid-api.h" |
| 4 | |
| 5 | #include "flash-ipmi.hpp" |
| 6 | |
| 7 | /** |
| 8 | * Prepare to receive a BMC image and then a signature. |
| 9 | * |
| 10 | * @param[in] updater - Pointer to Updater object. |
| 11 | * @param[in] reqBuf - the IPMI packet. |
| 12 | * @param[in] replyBuf - Pointer to buffer for any response. |
| 13 | * @param[in,out] dataLen - Initially reqBuf length, set to replyBuf |
| 14 | * length when done. |
| 15 | * @return corresponding IPMI return code. |
| 16 | */ |
| 17 | ipmi_ret_t startTransfer(UpdateInterface* updater, const uint8_t* reqBuf, |
| 18 | uint8_t* replyBuf, size_t* dataLen); |
Patrick Venture | 79e131f | 2018-08-01 13:34:35 -0700 | [diff] [blame^] | 19 | |
| 20 | /** |
| 21 | * Receive a flash image data block and store it. |
| 22 | * |
| 23 | * @param[in] updater - Pointer to Updater object. |
| 24 | * @param[in] reqBuf - the IPMI packet. |
| 25 | * @param[in] replyBuf - Pointer to buffer for any response. |
| 26 | * @param[in,out] dataLen - Initially reqBuf length, set to replyBuf |
| 27 | * length when done. |
| 28 | * @return corresponding IPMI return code. |
| 29 | */ |
| 30 | ipmi_ret_t dataBlock(UpdateInterface* updater, const uint8_t* reqBuf, |
| 31 | uint8_t* replyBuf, size_t* dataLen); |