bce_be32toh
val = bce_be32toh(val);
magic = bce_be32toh(buf[0]);
BCE_PRINTF("offset 0x%08X = 0x%08X\n", result, bce_be32toh(val[0]));