2 * FreeRTOS+TCP V2.0.0
\r
3 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
\r
5 * Permission is hereby granted, free of charge, to any person obtaining a copy of
\r
6 * this software and associated documentation files (the "Software"), to deal in
\r
7 * the Software without restriction, including without limitation the rights to
\r
8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
\r
9 * the Software, and to permit persons to whom the Software is furnished to do so,
\r
10 * subject to the following conditions:
\r
12 * The above copyright notice and this permission notice shall be included in all
\r
13 * copies or substantial portions of the Software. If you wish to use our Amazon
\r
14 * FreeRTOS name, please do so in a fair use way that does not cause confusion.
\r
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
\r
18 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
\r
19 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
\r
20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
23 * http://www.FreeRTOS.org
\r
24 * http://aws.amazon.com/freertos
\r
26 * 1 tab == 4 spaces!
\r
29 #ifndef FREERTOS_TCP_IP_H
\r
30 #define FREERTOS_TCP_IP_H
\r
36 BaseType_t xProcessReceivedTCPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer );
\r
38 typedef enum eTCP_STATE {
\r
39 /* Comments about the TCP states are borrowed from the very useful
\r
41 * http://en.wikipedia.org/wiki/Transmission_Control_Protocol */
\r
42 eCLOSED = 0u, /* 0 (server + client) no connection state at all. */
\r
43 eTCP_LISTEN, /* 1 (server) waiting for a connection request
\r
44 from any remote TCP and port. */
\r
45 eCONNECT_SYN, /* 2 (client) internal state: socket wants to send
\r
47 eSYN_FIRST, /* 3 (server) Just created, must ACK the SYN request. */
\r
48 eSYN_RECEIVED, /* 4 (server) waiting for a confirming connection request
\r
49 acknowledgement after having both received and sent a connection request. */
\r
50 eESTABLISHED, /* 5 (server + client) an open connection, data received can be
\r
51 delivered to the user. The normal state for the data transfer phase of the connection. */
\r
52 eFIN_WAIT_1, /* 6 (server + client) waiting for a connection termination request from the remote TCP,
\r
53 or an acknowledgement of the connection termination request previously sent. */
\r
54 eFIN_WAIT_2, /* 7 (server + client) waiting for a connection termination request from the remote TCP. */
\r
55 eCLOSE_WAIT, /* 8 (server + client) waiting for a connection termination request from the local user. */
\r
56 eCLOSING, /* (server + client) waiting for a connection termination request acknowledgement from the remote TCP. */
\r
57 eLAST_ACK, /* 9 (server + client) waiting for an acknowledgement of the connection termination request
\r
58 previously sent to the remote TCP
\r
59 (which includes an acknowledgement of its connection termination request). */
\r
60 eTIME_WAIT, /* 10 (either server or client) waiting for enough time to pass to be sure the remote TCP received the
\r
61 acknowledgement of its connection termination request. [According to RFC 793 a connection can
\r
62 stay in TIME-WAIT for a maximum of four minutes known as a MSL (maximum segment lifetime).] */
\r
70 #endif /* FREERTOS_TCP_IP_H */
\r