--- hping2-beta54/waitpacket.c.orig Thu Jul 6 19:06:11 2000 +++ hping2-beta54/waitpacket.c Thu Mar 15 14:33:57 2001 @@ -196,15 +196,16 @@ if (opt_seqnum) { static unsigned long old_th_seq = 0; - unsigned long seq_diff; - if (tcp->th_seq >= old_th_seq) - seq_diff = tcp->th_seq - old_th_seq; + unsigned long seq_diff, tmp; + tmp = ntohl(tcp->th_seq); + if (tmp >= old_th_seq) + seq_diff = tmp - old_th_seq; else seq_diff = (4294967295U - old_th_seq) - + tcp->th_seq; - old_th_seq = tcp->th_seq; + + tmp; + old_th_seq = tmp; printf("%10lu +%lu\n", - (unsigned long) tcp->th_seq, + (unsigned long) tmp, (unsigned long) seq_diff); } if (!opt_quiet && !opt_seqnum) {