![](/images/new-backgrounds/1193384/193384445x1.webp)
Appendix C
TCP Status Transitions
The TCP socket status can be confirmed using the socket status data returned for the FINS command SOCKET STATUS READ (2764).
| CLOSED | ACTIVE OPEN | |||
|
|
| |||
|
|
| snd SYN | ||
| Passive OPEN | CLOSE | |||
|
|
|
| ||
| LISTEN | CLOSE |
|
| |
|
|
| |||
| rcv SYN |
| |||
| SEND |
|
| ||
| snd SYN,ACK |
| |||
| snd SYN |
|
| ||
|
|
|
| ||
SYN | rcv SYN | SYN | |||
RECEIVED | snd ACK | SENT | |||
|
|
|
| ||
| rcv ACK of SYN | rcv SYN,ACK | |||
|
|
| snd ACK | ||
CLOSE | ESTABLISHED |
|
|
| |
snd FIN |
|
|
| ||
| CLOSE | rcv FIN | |||
| snd FIN | snd ACK | |||
FIN |
|
| CLOSED | ||
|
| WAIT | |||
|
| ||||
|
|
|
|
| |
| rcv FIN | CLOSE |
| ||
|
| ||||
rcv ACK of FIN | snd ACK |
| |||
snd FIN |
| ||||
|
|
|
| ||
FIN | CLOSING |
|
|
| |
rcv FIN | rcv ACK of FIN |
| rcv ACK of FIN | ||
| |||||
|
|
|
| ||
|
|
|
|
| |
snd ACK |
|
| Timeout=2MSL | ||
|
| ||||
|
|
| |||
| TIME WAIT | CLOSED |
Status | Meaning |
|
|
CLOSED | Connection closed. |
|
|
LISTEN | Waiting for connection. |
|
|
SYN SENT | SYN sent in active status. |
|
|
SYN RECEIVED | SYN received and sent. |
|
|
ESTABLISHED | Already established. |
|
|
CLOSE WAIT | FIN received and waiting for completion. |
|
|
FIN WAIT 1 | Completed and FIN sent. |
|
|
CLOSING | Completed and exchanged FIN. Awaiting ACK. |
|
|
LAST ACK | FIN sent and completed. Awaiting ACK. |
|
|
FIN WAIT 2 | Completed and ACK received. Awaiting FIN. |
|
|
TIME WAIT | After closing, pauses twice the maximum segment life |
| (2MSL). |
|
|
199