blob: dcaf33ecb03932ff6a8c14cb3b671da327b506e3 [file] [log] [blame]
Patrick Venture54c3b532018-08-01 11:45:49 -07001#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 */
17ipmi_ret_t startTransfer(UpdateInterface* updater, const uint8_t* reqBuf,
18 uint8_t* replyBuf, size_t* dataLen);
Patrick Venture79e131f2018-08-01 13:34:35 -070019
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 */
30ipmi_ret_t dataBlock(UpdateInterface* updater, const uint8_t* reqBuf,
31 uint8_t* replyBuf, size_t* dataLen);