]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOS_TCP_IP.h
Sync FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP with the version in GitHub at (23665258ca...
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-Plus-TCP / include / FreeRTOS_TCP_IP.h
1 /*\r
2  * FreeRTOS+TCP V2.2.0\r
3  * Copyright (C) 2017 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
4  *\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
11  *\r
12  * The above copyright notice and this permission notice shall be included in all\r
13  * copies or substantial portions of the Software.\r
14  *\r
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
17  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
19  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
21  *\r
22  * http://aws.amazon.com/freertos\r
23  * http://www.FreeRTOS.org\r
24  */\r
25 \r
26 #ifndef FREERTOS_TCP_IP_H\r
27 #define FREERTOS_TCP_IP_H\r
28 \r
29 #ifdef __cplusplus\r
30 extern "C" {\r
31 #endif\r
32 \r
33 BaseType_t xProcessReceivedTCPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer );\r
34 \r
35 typedef enum eTCP_STATE {\r
36         /* Comments about the TCP states are borrowed from the very useful\r
37          * Wiki page:\r
38          * http://en.wikipedia.org/wiki/Transmission_Control_Protocol */\r
39         eCLOSED = 0u,   /* 0 (server + client) no connection state at all. */\r
40         eTCP_LISTEN,    /* 1 (server) waiting for a connection request\r
41                                                  from any remote TCP and port. */\r
42         eCONNECT_SYN,   /* 2 (client) internal state: socket wants to send\r
43                                                  a connect */\r
44         eSYN_FIRST,             /* 3 (server) Just created, must ACK the SYN request. */\r
45         eSYN_RECEIVED,  /* 4 (server) waiting for a confirming connection request\r
46                                                  acknowledgement after having both received and sent a connection request. */\r
47         eESTABLISHED,   /* 5 (server + client) an open connection, data received can be\r
48                                                  delivered to the user. The normal state for the data transfer phase of the connection. */\r
49         eFIN_WAIT_1,    /* 6 (server + client) waiting for a connection termination request from the remote TCP,\r
50                                                  or an acknowledgement of the connection termination request previously sent. */\r
51         eFIN_WAIT_2,    /* 7 (server + client) waiting for a connection termination request from the remote TCP. */\r
52         eCLOSE_WAIT,    /* 8 (server + client) waiting for a connection termination request from the local user. */\r
53         eCLOSING,               /*   (server + client) waiting for a connection termination request acknowledgement from the remote TCP. */\r
54         eLAST_ACK,              /* 9 (server + client) waiting for an acknowledgement of the connection termination request\r
55                                                  previously sent to the remote TCP\r
56                                                  (which includes an acknowledgement of its connection termination request). */\r
57         eTIME_WAIT,             /* 10 (either server or client) waiting for enough time to pass to be sure the remote TCP received the\r
58                                                  acknowledgement of its connection termination request. [According to RFC 793 a connection can\r
59                                                  stay in TIME-WAIT for a maximum of four minutes known as a MSL (maximum segment lifetime).] */\r
60 } eIPTCPState_t;\r
61 \r
62 \r
63 #ifdef __cplusplus\r
64 } // extern "C"\r
65 #endif\r
66 \r
67 #endif /* FREERTOS_TCP_IP_H */\r
68 \r
69 \r
70 \r
71 \r
72 \r
73 \r
74 \r
75 \r
76 \r
77 \r
78 \r
79 \r
80 \r