Synopsis
typedef enum {
CTL_NCP_SOCKET_STATE_UNALLOCATED,
CTL_NCP_SOCKET_STATE_CLOSED,
CTL_NCP_SOCKET_STATE_LISTEN,
CTL_NCP_SOCKET_SYN_SENT,
CTL_NCP_SOCKET_SYN_RECEIVED,
CTL_NCP_SOCKET_ESTABLISHED,
CTL_NCP_SOCKET_FIN_WAIT1,
CTL_NCP_SOCKET_FIN_WAIT2,
CTL_NCP_SOCKET_CLOSE_WAIT,
CTL_NCP_SOCKET_CLOSING,
CTL_NCP_SOCKET_LAST_ACK,
CTL_NCP_SOCKET_TIME_WAIT
} CTL_TCP_SOCKET_STATE_t;
Description
CTL_TCP_SOCKET_STATE_t describes the state of the socket along the lines
of RFC 793.
-
CTL_NCP_SOCKET_STATE_UNALLOCATED
- NOT RFC 793...kind of like "Super Duper Closed". The RFC assumes
that the system has dynamic socket allocation; we don't.
-
CTL_NCP_SOCKET_STATE_CLOSED
- No connection state at all.
-
CTL_NCP_SOCKET_STATE_LISTEN
- Waiting for a connection request from any remote TCP and port.
-
CTL_NCP_SOCKET_SYN_SENT
- Waiting for a matching connection request after having sent
a connection request.
-
CTL_NCP_SOCKET_SYN_RECEIVED
- Waiting for a confirming connection request acknowledgment after
having both received and sent a connection request.
-
CTL_NCP_SOCKET_ESTABLISHED
- An open connection, data received can be delivered to the user.
The normal state for the data transfer phase of the connection.
-
CTL_NCP_SOCKET_FIN_WAIT1
- Waiting for a connection termination request from the remote
TCP, or an acknowledgment of the connection termination request
previously sent.
-
CTL_NCP_SOCKET_FIN_WAIT2
- Waiting for a connection termination request from the remote
TCP.
-
CTL_NCP_SOCKET_CLOSE_WAIT
- Waiting for a connection termination request from the local user.
-
CTL_NCP_SOCKET_CLOSING
- Waiting for a connection termination request acknowledgment
from the remote TCP.
-
CTL_NCP_SOCKET_LAST_ACK
- Waiting for an acknowledgment of the connection termination
request previously sent to the remote TCP (which includes
an acknowledgment of its connection termination request).
-
CTL_NCP_SOCKET_TIME_WAIT
- Waiting for enough time to pass to be sure the remote TCP
received the acknowledgment of its connection termination
request.