Il giorno sab, 25/02/2006 alle 10.29 -0800, Umamaheswararao Karyampudi ha scritto: > In ne2000_receive(), I copied the packet received to a > static char [] and printed the packet using > static void print_packet(char *s, int len) > { > int i,j; > for (i=0;i<len;i++) { > if (i%20 == 0) > printf("\n"); > printf("%02x ", s[i]); > } > printf("\n"); > } > And some bytes it prints as fffffffff<last byte> > instead of just the last byte. > For eg: > 52 54 00 12 34 56 00 ffffffff 4f 0a 46 05 08 00 45 00 > 00 ffffff80 00 00 > 40 00 40 01 ffffffbc 2b ffffffc0 ffffffa8 fffffffe > fffffffe ffffffc0 ffffffa8 ff >
Maybe it's just a sign problem. Try declaring the s[] buffer as unsigned char instead of just char. Hope this helps, Alessandro
signature.asc
Description: Questa parte del messaggio รจ firmata
_______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel