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

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

From: ronnie sahlberg <ronniesahlberg@xxxxxxxxx>
Date: Fri, 23 Dec 2005 05:46:36 +0000
ACK is not set under two conditions:
1, initial SYN packet which occurs before the window is properly defined
2, for RST segments where window is meaningless anyway.


we should not display it for RST segments.

should we display it for SYN-!ACK segments?




On 12/23/05, Guy Harris <gharris@xxxxxxxxx> wrote:
> Bill Meier wrote:
>
> >    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);
> > +    }
> >    }
>
> Should the window setting be displayed even if ACK isn't set?  Obviously
> the ack shouldn't be - to quote RFC 793:
>
>    Acknowledgment Number:  32 bits
>
>      If the ACK control bit is set this field contains the value of the
>      next sequence number the sender of the segment is expecting to
>      receive.  Once a connection is established this is always sent.
>
> (and if ACK isn't set, the field's contents are meaningless), but 793
> doesn't say anything about the window value being valid only if ACK is set.
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>