+ return -csum;
+}
+
+void decode_bmc_cmd(unsigned char *buf, int len)
+{
+ int i;
+
+ printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
+ printf("Connection Header:\n");
+ printf("\trs Slave Addr.: 0x%02x\n", buf[0]);
+ printf("\tnetFn: 0x%02x, LUN: 0x%02x\n", (buf[1]>>2)&0x3f, (buf[1] & 0x03));
+ printf("\tChecksum: 0x%02x (%s)\n", buf[2],
+ (buf[2] == ipmb_csum(buf, 2)) ? "OK" : "Wrong");
+ printf("Data:\n");
+ printf("\trq Slave Addr.: 0x%02x\n", buf[3]);
+ printf("\trqSeq: 0x%02x, rqLUN: 0x%02x\n", (buf[4]>>2)&0x3f, (buf[4] & 0x03));
+ printf("\tcmd: 0x%02x\n", buf[5]);
+ printf("\tData: ");
+ for(i = 6; i < (len - 1); i++) {
+ printf("0x%02x ", buf[i]);
+ }