Lines Matching refs:hdr
30 struct hwbcc_req_hdr hdr; member
40 struct hwbcc_resp_hdr hdr; member
154 resp.hdr.cmd = HWBCC_CMD_SIGN_DATA | HWBCC_CMD_RESP_BIT; in handle_sign_data()
155 resp.hdr.status = rc; in handle_sign_data()
156 resp.hdr.payload_size = payload_size; in handle_sign_data()
157 rc = tipc_send1(chan, &resp, sizeof(resp.hdr) + payload_size); in handle_sign_data()
162 if ((size_t)rc != sizeof(resp.hdr) + payload_size) { in handle_sign_data()
184 resp.hdr.cmd = HWBCC_CMD_GET_BCC | HWBCC_CMD_RESP_BIT; in handle_get_bcc()
185 resp.hdr.status = rc; in handle_get_bcc()
186 resp.hdr.payload_size = payload_size; in handle_get_bcc()
187 rc = tipc_send1(chan, &resp, sizeof(resp.hdr) + payload_size); in handle_get_bcc()
192 if ((size_t)rc != sizeof(resp.hdr) + payload_size) { in handle_get_bcc()
215 resp.hdr.cmd = HWBCC_CMD_GET_DICE_ARTIFACTS | HWBCC_CMD_RESP_BIT; in handle_get_dice_artifacts()
216 resp.hdr.status = rc; in handle_get_dice_artifacts()
217 resp.hdr.payload_size = payload_size; in handle_get_dice_artifacts()
219 rc = tipc_send1(chan, &resp, sizeof(resp.hdr) + payload_size); in handle_get_dice_artifacts()
224 if ((size_t)rc != sizeof(resp.hdr) + payload_size) { in handle_get_dice_artifacts()
243 resp.hdr.cmd = HWBCC_CMD_NS_DEPRIVILEGE | HWBCC_CMD_RESP_BIT; in handle_ns_deprivilege()
244 resp.hdr.status = rc; in handle_ns_deprivilege()
246 rc = tipc_send1(chan, &resp, sizeof(resp.hdr)); in handle_ns_deprivilege()
251 if ((size_t)rc != sizeof(resp.hdr)) { in handle_ns_deprivilege()
263 rc = tipc_recv1(chan, sizeof(req.hdr), &req, sizeof(req)); in on_message()
269 switch (req.hdr.cmd) { in on_message()
271 if ((size_t)rc < sizeof(req.hdr) + sizeof(req.args)) { in on_message()
283 if (rc - sizeof(req.hdr) - sizeof(req.args) != in on_message()
288 return handle_sign_data(s, chan, req.hdr.test_mode, &req.args, in on_message()
293 if (rc != sizeof(req.hdr)) { in on_message()
297 return handle_get_bcc(s, chan, req.hdr.test_mode); in on_message()
300 if (rc != sizeof(req.hdr)) { in on_message()
304 return handle_get_dice_artifacts(s, chan, req.hdr.context); in on_message()
307 if (rc != sizeof(req.hdr)) { in on_message()
314 TLOGE("Received unknown command %x\n", req.hdr.cmd); in on_message()