tcpdump mailing list archives
Re: print-tcp.c: remove commas from output, to
From: Rick Jones <rick.jones2 () hp com>
Date: Wed, 17 Jan 2007 11:56:21 -0800
Kevin Steves wrote:
commas aren't used in tcp fields so remove these that are before and after cksum.
i'm not necessarily trying to stop the patch, but while it may not be consistent with other output, maintaining "consistency" with previous versions has the nice property of being less likely to break someones scripts no?
rick jones
Index: print-tcp.c =================================================================== RCS file: /tcpdump/master/tcpdump/print-tcp.c,v retrieving revision 1.126 diff -u -r1.126 print-tcp.c --- print-tcp.c 2 Nov 2006 08:56:16 -0000 1.126 +++ print-tcp.c 17 Jan 2007 19:45:14 -0000 @@ -411,12 +411,12 @@ if (TTEST2(tp->th_sport, length)) { sum = tcp_cksum(ip, tp, length);- (void)printf(", cksum 0x%04x",EXTRACT_16BITS(&tp->th_sum));+ (void)printf(" cksum 0x%04x",EXTRACT_16BITS(&tp->th_sum)); if (sum != 0) { tcp_sum = EXTRACT_16BITS(&tp->th_sum); - (void)printf(" (incorrect -> 0x%04x),",in_cksum_shouldbe(tcp_sum, sum)); + (void)printf(" (incorrect -> 0x%04x)",in_cksum_shouldbe(tcp_sum, sum)); } else - (void)printf(" (correct),"); + (void)printf(" (correct)"); } } #ifdef INET6 @@ -424,12 +424,12 @@ u_int16_t sum,tcp_sum; if (TTEST2(tp->th_sport, length)) { sum = tcp6_cksum(ip6, tp, length); - (void)printf(", cksum 0x%04x",EXTRACT_16BITS(&tp->th_sum)); + (void)printf(" cksum 0x%04x",EXTRACT_16BITS(&tp->th_sum)); if (sum != 0) { tcp_sum = EXTRACT_16BITS(&tp->th_sum); - (void)printf(" (incorrect (-> 0x%04x),",in_cksum_shouldbe(tcp_sum, sum)); + (void)printf(" (incorrect (-> 0x%04x)",in_cksum_shouldbe(tcp_sum, sum)); } else - (void)printf(" (correct),"); + (void)printf(" (correct)");}} - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- print-tcp.c: remove commas from output, to be consistent Kevin Steves (Jan 17)
- Re: print-tcp.c: remove commas from output, to Rick Jones (Jan 17)
- Re: print-tcp.c: remove commas from output, to Stephen Donnelly (Jan 17)
- Re: print-tcp.c: remove commas from output, to Hannes Gredler (Jan 17)
- Re: print-tcp.c: remove commas from output, to be consistent Kevin Steves (Jan 17)
- Re: print-tcp.c: remove commas from output, to be consistent Hannes Gredler (Jan 17)
- Re: print-tcp.c: remove commas from output, to be consistent Kevin Steves (Jan 28)
- Re: print-tcp.c: remove commas from output, to be consistent Hannes Gredler (Jan 29)
- Re: print-tcp.c: remove commas from output, to be consistent Kevin Steves (Jan 17)
- Re: print-tcp.c: remove commas from output, to Rick Jones (Jan 17)