Relative Content

Tag Archive for linuxtcp

Linux socket data sit in send queue until receive timeout

When sending data as a TCP client under Linux, it occasionally happens that the write operation is successful, but the data seems to remain in the send buffer and is only sent out after a receive timeout. This conclusion is based on my use of tcpdump to capture packets and my collection of SendQ sizes during the lag period. Regarding socket configuration, it is currently set to blocking mode for sending and the NODELAY flag is enabled. By the way, the server side is an old-fashioned SLIP device.
data stuck in sendqueque

Linux IP Implementation – reordering of packets

I’m studying how TCP works in Linux.
“TCP uses a sequence number to identify each byte of data. The sequence number identifies the order of the bytes sent from each computer so that the data can be reconstructed in order, regardless of any out-of-order delivery that may occur. The sequence number of the first byte is chosen by the transmitter for the first packet, which is flagged SYN. This number can be arbitrary, and should, in fact, be unpredictable to defend against TCP sequence prediction attacks.”

Linux IP Implementation – reordering of packages

I’m studying how TCP works in Linux.
“TCP uses a sequence number to identify each byte of data. The sequence number identifies the order of the bytes sent from each computer so that the data can be reconstructed in order, regardless of any out-of-order delivery that may occur. The sequence number of the first byte is chosen by the transmitter for the first packet, which is flagged SYN. This number can be arbitrary, and should, in fact, be unpredictable to defend against TCP sequence prediction attacks.”