Ethereal-dev: [Ethereal-dev] [Patch] packet-tcp.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Bill Meier" <wmeier@xxxxxxxxxxx>
Date: Thu, 22 Dec 2005 16:49:32 -0500
This is a small point and I don't know how others may feel, but I suggest 
that the TCP summary INFO column should not show ack= and win= information 
if the TCP header for that packet does not have the ACK flag set. 

Two cases where a TCP header does not have the ACK flag set are:
1. Originating initial SYN packets;
2. Certain RST packets; 

If there is agreement on this then the patch to packet-tcp.c to make this change 
is as below.

Bill Meier


@@ -2814,8 +2814,12 @@
   }
 
   if (check_col(pinfo->cinfo, COL_INFO)) {
-    col_append_fstr(pinfo->cinfo, COL_INFO, " [%s] Seq=%u Ack=%u Win=%u",
-      flags, tcph->th_seq, tcph->th_ack, tcph->th_win);
+    col_append_fstr(pinfo->cinfo, COL_INFO, " [%s] Seq=%u",
+      flags, tcph->th_seq);
+    if (tcph->th_flags & TH_ACK) {
+      col_append_fstr(pinfo->cinfo, COL_INFO, " Ack=%u Win=%u",
+        tcph->th_ack, tcph->th_win);
+    }
   }
 
   if (tree) {