added useful log messages

This commit is contained in:
cozis
2023-05-17 12:10:43 +02:00
parent b63fb7df6c
commit a5b5cf4567
5 changed files with 34 additions and 5 deletions
+13
View File
@@ -53,6 +53,19 @@ struct tcp_listener_t {
void *callback_data;
};
typedef enum {
TCP_STATE_CLOSED,
TCP_STATE_LISTEN,
TCP_STATE_SYN_SENT,
TCP_STATE_SYN_RCVD,
TCP_STATE_ESTAB,
TCP_STATE_FIN_WAIT_1,
TCP_STATE_FIN_WAIT_2,
TCP_STATE_CLOSE_WAIT,
TCP_STATE_LAST_ACK,
TCP_STATE_TIME_WAIT,
} tcp_state_t;
struct tcp_connection_t {
tcp_listener_t *listener; // Listener that accepted this connection
tcp_connection_t *next;