Ethereal-users: Re: [Ethereal-users] What does the flag [FIN, PUSH, ACK] mean????

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

From: Jack Jackson <jack@xxxxxxxxxxxxxxx>
Date: Wed, 15 Sep 2004 10:58:06 -0700
At 10:29 AM 9/15/2004, Guy Harris wrote:
Jack Jackson wrote:

I can't tell if that is correct since you haven't specified which messages are sent and which are received. The normal termination sequence for a TCP connection when all data has been sent is 3 messages:

...but, at least as I read RFC 793, it's permissible to send data in a FIN segment:

...


Presumably if some data is written to a socket and the socket is then closed, a TCP implementation could send out the data in a segment and set FIN on that segment, which means that the data in that segment is the last data that will be sent by that peer on that connection.

That is correct. That is why I said 'when all data has been sent'. Not only can data be sent with FIN, but sending FIN only notifies the other end that the sender of FIN has sent all of his data and wishes to close the connection. The other end is free to send as much data as it wants after receiving FIN. Each FIN closes half of the conversation. The connection is not closed until both ends have sent FIN.