memcpy(data, buf + IPMI_MSG_DATAOUT, *rxlen);
memcpy(data, buf + IPMI_MSG_DATARCV, *rxlen);
ipmi_recvcmd(struct ipmi_softc *sc, int maxlen, int *rxlen, void *data){	u_int8_t	*buf, rc = 0;	int		rawlen;	/* Need three extra bytes: netfn/cmd/ccode + data */	buf = malloc(maxlen + 3, M_DEVBUF, M_WAITOK);	if (buf == NULL) {		printf("ipmi_recvcmd: malloc fails\n");		return -1;	}	/* Receive message from interface, copy out result data */	sc->sc_if->recvmsg(sc, maxlen + 3, &rawlen, buf);	*rxlen = rawlen - IPMI_MSG_DATAOUT;	if (*rxlen > 0 && data)		memcpy(data, buf + IPMI_MSG_DATAOUT, *rxlen);	if ((rc = buf[IPMI_MSG_CCODE]) != 0) {		dbg_printf(1, "ipmi_recvmsg: nfln=%.2x cmd=%.2x err=%.2x\n",		    buf[IPMI_MSG_NFLN], buf[IPMI_MSG_CMD], buf[IPMI_MSG_CCODE]);	}	dbg_printf(10, "ipmi_recvcmd: nfln=%.2x cmd=%.2x err=%.2x len=%.2x\n",	    buf[IPMI_MSG_NFLN], buf[IPMI_MSG_CMD], buf[IPMI_MSG_CCODE],	    *rxlen);	dbg_dump(10, " recv", *rxlen, data);	free(buf, M_DEVBUF);	return (rc);}