include/nuttx/net/netconfig.h: add MSS values for usrsock

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
This commit is contained in:
Juha Niskanen 2021-10-15 15:16:45 +03:00 committed by Xiang Xiao
parent e0389ce1fb
commit fc1ac6e3e0
1 changed files with 14 additions and 0 deletions

View File

@ -272,7 +272,14 @@
# define TUN_UDP_MSS(h) (CONFIG_NET_TUN_PKTSIZE - __UDP_HDRLEN - (h))
#endif
#ifdef CONFIG_NET_USRSOCK
# define __MIN_UDP_MSS(h) INT_MAX
# define __MAX_UDP_MSS(h) 0
#endif
#ifdef CONFIG_NET_ETHERNET
# undef __MIN_UDP_MSS
# undef __MAX_UDP_MSS
# define __MIN_UDP_MSS(h) ETH_UDP_MSS(h)
# define __MAX_UDP_MSS(h) ETH_UDP_MSS(h)
# define __ETH_MIN_UDP_MSS(h) ETH_UDP_MSS(h)
@ -452,7 +459,14 @@
# define TUN_TCP_MSS(h) (CONFIG_NET_TUN_PKTSIZE - __TCP_HDRLEN - (h))
#endif
#ifdef CONFIG_NET_USRSOCK
# define __MIN_TCP_MSS(h) INT_MAX
# define __MAX_TCP_MSS(h) 0
#endif
#ifdef CONFIG_NET_ETHERNET
# undef __MIN_TCP_MSS
# undef __MAX_TCP_MSS
# define __MIN_TCP_MSS(h) ETH_TCP_MSS(h)
# define __MAX_TCP_MSS(h) ETH_TCP_MSS(h)
# define __ETH_MIN_TCP_MSS(h) ETH_TCP_MSS(h)