From 41949e6a49d88eba3ec4e82fee2ab5ed15af6cd1 Mon Sep 17 00:00:00 2001 From: Juraj Andrassy Date: Sat, 7 Oct 2023 15:57:28 +0200 Subject: [PATCH] header file with common constants for client.state() values --- src/utility/tcp_states.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/utility/tcp_states.h diff --git a/src/utility/tcp_states.h b/src/utility/tcp_states.h new file mode 100644 index 00000000..ca3a4d83 --- /dev/null +++ b/src/utility/tcp_states.h @@ -0,0 +1,21 @@ +#ifndef TCP_STATES_H +#define TCP_STATES_H + +#include "w5100.h" + +// common constants for client.state() return values +enum tcp_state { + CLOSED = SnSR::CLOSED, + LISTEN = SnSR::LISTEN, + SYN_SENT = SnSR::SYNSENT, + SYN_RCVD = SnSR::SYNRECV, + ESTABLISHED = SnSR::ESTABLISHED, + FIN_WAIT_1 = SnSR::FIN_WAIT, + FIN_WAIT_2 = SnSR::FIN_WAIT, + CLOSE_WAIT = SnSR::CLOSE_WAIT, + CLOSING = SnSR::CLOSING, + LAST_ACK = SnSR::LAST_ACK, + TIME_WAIT = SnSR::TIME_WAIT +}; + +#endif