Why is the FIN flag in TCP called FIN?
FIN is an abbreviation for "Finish"
In the normal case, each side terminates its end of the connection by sending a special message with the FIN (finish) bit set. This message, sometimes called a FIN, serves as a connection termination request to the other device, while also possibly carrying data like a regular segment. The device receiving the FIN responds with an acknowledgment to the FIN to indicate that it was received. The connection as a whole is not considered terminated until both sides have finished the shut down procedure by sending a FIN and receiving an ACK.
https://superuser.com/questions/878499/why-is-the-fin-flag-in-tcp-called-fin
https://stackoverflow.com/questions/2346446/how-to-know-which-is-the-last-tcp-segment-received-by-the-server-when-data-is-tr#:~:text=You%20might%20use%20PSH%20flag,is%20marked%20by%20this%20flag.
Suppose the receiving buffer has already some data to be processed by the application. A segment with the PSH flag set to 1 is sent now. The sending buffer will not wait to be filled, instead, it will immediately push the data into the wire. Now, this data will queue up behind the already non-processed data in the receiving buffer. After the previous data is processed then only the data with PSH=1 can be forwarded to the application.
When URG is set, the data can be immediately forwarded to the application ignoring the already existent data in the receiving buffer. In other words, URG=1 violates the FIFO structure.
The major difference between PSH=1 and URG=1 is that the former follows the ordering of the data in the receiving buffer whereas the latter doesn't and that's why the name is URG i.e. to send urgent data.
https://networkengineering.stackexchange.com/questions/58592/can-anyone-explain-to-me-the-difference-between-the-psh-and-urg-flags-in-tcp-seg
No comments:
Post a Comment