[ ]
 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Homepage FreeRTOS Labs FreeRTOS+TCP FreeRTOS+FAT Contact / Enquiries


FreeRTOS+TCP is still in the lab
FreeRTOS+TCP is already used in commercial products and we encourage you to try it yourself. Be aware however that we are still refining its design, and the source code and documentation do not yet meet Real Time Engineers Ltd's strict quality standards.
Please use the forum for support, feedback and ideas, or contact us directly if you have a specific business interest.

MSS

MSS stands for Maximum Segment Size. It defines the maximum amount of data that can be sent or received in a TCP or UDP packet. It differs from the MTU value in that its value only applies to the data size, not the frame size, so it excludes the Ethernet, IP, TCP or UDP protocol headers. The MSS is dependent on the MTU and the maximum number of options bytes.

The following is an example MSS calculation starting from an MTU of 1526 bytes. The number of bytes consumed by the various headers contained within the frame are subtracted to get the MSS size:

1526  MTU size
 -14  Ethernet header size
 -20  IP protocol header size
 -20  TCP protocol header size
 -12  TCP options bytes
----
1460  MSS size
					
In FreeRTOS+TCP the MSS value is set by the ipconfigTCP_MSS setting in FreeRTOSIPConfig.h. If ipconfigTCP_MSS is not defined then it will be set to a default value of 1460.

In the above example the calculated MSS value of 1460 bytes is suitable for a local area network (LAN), but is probably too large for use across the Internet, where the MSS should be restricted to 1400 bytes for maximum reliability. Therefore if the IP address of a remote node is outside of the local network (see netmask), then FreeRTOS+TCP will automatically set the MSS to the smallest of either 1400 or the configured ipconfigTCP_MSS value.


Useful links:


Other networking basics pages:



[ Back to the top ]    [ About FreeRTOS ]    [ FreeRTOS Labs Sitemap ]    [ Main FreeRTOS Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.