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 if (i%20 == 0) > printf("\n"); > printf("%02x ", s[i]); > } > printf("\n"); > } > And some bytes it prints as fffffffff > 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