lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Change TCP MSS dynamically


From: address@hidden
Subject: Re: [lwip-users] Change TCP MSS dynamically
Date: Tue, 23 May 2017 22:19:59 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

shruthi wrote:
Is it possible to change the TCP MSS dynamically in run-time before
connecting to a TCP server? I came across the link -
https://lists.gnu.org/archive/html/lwip-devel/2004-01/msg00003.html. Has
this been implemented?

Wow, that link is really old. And no, it hasn't been implemented. It seems noone responded to that mail...

Anyway, the code is still the same. To clarify your request, there are 2 MSS involved in tcp, one for each direction. A TCP *must* use 536 for sending unless the remote TCP sends the MSS option with the SYN segment.

Now TCP_MSS is used for 2 things:
1) as an upper bound on the MSS advertised by the remote TCP
2) as a value sent during (active or passive) connect

The message from 2004 was about using pcb->mss as a value to send with our SYN to advertise our MSS to the remote TCP. Clearly, that doesn't work as pcb->mss is our *sending* MSS. It is initialized to 536 for active connects and set to the remote host's MSS for passive connect.

I suggest defining TCP_MSS to a globally known u16_t and changing that on the fly as you need... That might work without changes to the sources.

Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]