Lines Matching refs:msg
138 reqrsp.req.fn = req->msg.netfn; in ipmi_bmc_send_cmd_ioctl()
140 reqrsp.req.cmd = req->msg.cmd; in ipmi_bmc_send_cmd_ioctl()
141 reqrsp.req.datalength = req->msg.data_len; in ipmi_bmc_send_cmd_ioctl()
142 memcpy(reqrsp.req.data, req->msg.data, req->msg.data_len); in ipmi_bmc_send_cmd_ioctl()
192 int msgsz = offsetof(bmc_msg_t, msg) + sizeof(bmc_req_t) + in ipmi_bmc_send_cmd_putmsg()
193 ((req->msg.data_len > SEND_MAX_PAYLOAD_SIZE) ? in ipmi_bmc_send_cmd_putmsg()
194 (req->msg.data_len - SEND_MAX_PAYLOAD_SIZE) : 0); in ipmi_bmc_send_cmd_putmsg()
195 bmc_msg_t *msg = malloc(msgsz); in ipmi_bmc_send_cmd_putmsg() local
196 bmc_req_t *request = (bmc_req_t *)&msg->msg[0]; in ipmi_bmc_send_cmd_putmsg()
201 msg->m_type = BMC_MSG_REQUEST; in ipmi_bmc_send_cmd_putmsg()
202 msg->m_id = msg_seq++; in ipmi_bmc_send_cmd_putmsg()
203 request->fn = req->msg.netfn; in ipmi_bmc_send_cmd_putmsg()
205 request->cmd = req->msg.cmd; in ipmi_bmc_send_cmd_putmsg()
206 request->datalength = req->msg.data_len; in ipmi_bmc_send_cmd_putmsg()
207 memcpy(request->data, req->msg.data, req->msg.data_len); in ipmi_bmc_send_cmd_putmsg()
210 sb.buf = (unsigned char *)msg; in ipmi_bmc_send_cmd_putmsg()
220 free(msg); in ipmi_bmc_send_cmd_putmsg()
221 msg = NULL; in ipmi_bmc_send_cmd_putmsg()
225 free(msg); in ipmi_bmc_send_cmd_putmsg()
226 msg = NULL; in ipmi_bmc_send_cmd_putmsg()
238 msg = (bmc_msg_t *)sb.buf; in ipmi_bmc_send_cmd_putmsg()
241 printf("Got msg (id 0x%x) type 0x%x\n", msg->m_id, msg->m_type); in ipmi_bmc_send_cmd_putmsg()
246 switch (msg->m_type) { in ipmi_bmc_send_cmd_putmsg()
249 response = (bmc_rsp_t *)&msg->msg[0]; in ipmi_bmc_send_cmd_putmsg()
268 printf("bmc_send_cmd: %s\n", strerror(msg->msg[0])); in ipmi_bmc_send_cmd_putmsg()