2 * FreeRTOS+TCP Labs Build 160919 (C) 2016 Real Time Engineers ltd.
\r
3 * Authors include Hein Tibosch and Richard Barry
\r
5 *******************************************************************************
\r
6 ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ***
\r
9 *** FREERTOS+TCP IS STILL IN THE LAB (mainly because the FTP and HTTP ***
\r
10 *** demos have a dependency on FreeRTOS+FAT, which is only in the Labs ***
\r
13 *** FreeRTOS+TCP is functional and has been used in commercial products ***
\r
14 *** for some time. Be aware however that we are still refining its ***
\r
15 *** design, the source code does not yet quite conform to the strict ***
\r
16 *** coding and style standards mandated by Real Time Engineers ltd., and ***
\r
17 *** the documentation and testing is not necessarily complete. ***
\r
19 *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE ***
\r
20 *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at ***
\r
21 *** the sole discretion of Real Time Engineers Ltd., be offered versions ***
\r
22 *** under a license other than that described below. ***
\r
25 ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ***
\r
26 *******************************************************************************
\r
28 * FreeRTOS+TCP can be used under two different free open source licenses. The
\r
29 * license that applies is dependent on the processor on which FreeRTOS+TCP is
\r
30 * executed, as follows:
\r
32 * If FreeRTOS+TCP is executed on one of the processors listed under the Special
\r
33 * License Arrangements heading of the FreeRTOS+TCP license information web
\r
34 * page, then it can be used under the terms of the FreeRTOS Open Source
\r
35 * License. If FreeRTOS+TCP is used on any other processor, then it can be used
\r
36 * under the terms of the GNU General Public License V2. Links to the relevant
\r
39 * The FreeRTOS+TCP License Information Page: http://www.FreeRTOS.org/tcp_license
\r
40 * The FreeRTOS Open Source License: http://www.FreeRTOS.org/license
\r
41 * The GNU General Public License Version 2: http://www.FreeRTOS.org/gpl-2.0.txt
\r
43 * FreeRTOS+TCP is distributed in the hope that it will be useful. You cannot
\r
44 * use FreeRTOS+TCP unless you agree that you use the software 'as is'.
\r
45 * FreeRTOS+TCP is provided WITHOUT ANY WARRANTY; without even the implied
\r
46 * warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
\r
47 * PURPOSE. Real Time Engineers Ltd. disclaims all conditions and terms, be they
\r
48 * implied, expressed, or statutory.
\r
50 * 1 tab == 4 spaces!
\r
52 * http://www.FreeRTOS.org
\r
53 * http://www.FreeRTOS.org/plus
\r
54 * http://www.FreeRTOS.org/labs
\r
58 #ifndef FREERTOS_TCP_IP_H
\r
59 #define FREERTOS_TCP_IP_H
\r
65 BaseType_t xProcessReceivedTCPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer );
\r
67 typedef enum eTCP_STATE {
\r
68 /* Comments about the TCP states are borrowed from the very useful
\r
70 * http://en.wikipedia.org/wiki/Transmission_Control_Protocol */
\r
71 eCLOSED = 0u, /* 0 (server + client) no connection state at all. */
\r
72 eTCP_LISTEN, /* 1 (server) waiting for a connection request
\r
73 from any remote TCP and port. */
\r
74 eCONNECT_SYN, /* 2 (client) internal state: socket wants to send
\r
76 eSYN_FIRST, /* 3 (server) Just created, must ACK the SYN request. */
\r
77 eSYN_RECEIVED, /* 4 (server) waiting for a confirming connection request
\r
78 acknowledgement after having both received and sent a connection request. */
\r
79 eESTABLISHED, /* 5 (server + client) an open connection, data received can be
\r
80 delivered to the user. The normal state for the data transfer phase of the connection. */
\r
81 eFIN_WAIT_1, /* 6 (server + client) waiting for a connection termination request from the remote TCP,
\r
82 or an acknowledgement of the connection termination request previously sent. */
\r
83 eFIN_WAIT_2, /* 7 (server + client) waiting for a connection termination request from the remote TCP. */
\r
84 eCLOSE_WAIT, /* 8 (server + client) waiting for a connection termination request from the local user. */
\r
85 eCLOSING, /* (server + client) waiting for a connection termination request acknowledgement from the remote TCP. */
\r
86 eLAST_ACK, /* 9 (server + client) waiting for an acknowledgement of the connection termination request
\r
87 previously sent to the remote TCP
\r
88 (which includes an acknowledgement of its connection termination request). */
\r
89 eTIME_WAIT, /* 10 (either server or client) waiting for enough time to pass to be sure the remote TCP received the
\r
90 acknowledgement of its connection termination request. [According to RFC 793 a connection can
\r
91 stay in TIME-WAIT for a maximum of four minutes known as a MSL (maximum segment lifetime).] */
\r
99 #endif /* FREERTOS_TCP_IP_H */
\r