MSS stands for Maximum Segment Size. It
defines the maximum amount of data that can be sent or received in a
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:
In FreeRTOS+TCP the MSS value is set by the
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
then FreeRTOS+TCP will automatically set the MSS to the smallest of either 1400 or
the configured ipconfigTCP_MSS value.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.