From: Rick Jones on
wkevin <wkevils(a)gmail.com> wrote:
> What I don't understand here is:
> 1) why the value of is MSS which is exchanged is 1460 and not 1500
> (the MTU value)?

Layers. 1500 bytes is the IP MTU and includes the IP header. The MSS
is the IP MTU less the size of the IP header and the TCP header.
Thus, for IPv4 and typical TCP situations, one subtracts 20 bytes of
IPv4 header, and 20 bytes of TCP header and arrives at a TCP MSS of
1460 bytes.

> 2) the first packet had a "ACK" in the wireshark info coulmn, while
> the
> second packet had a "PSH". what is the meaning of this PSH ?

Very little. It tends to mean "if you've not already notified the
receiver there is data, please be certain to do so now" but 99 times
out of 10 (ie virtually always) the receiver has been notified
already. It will also tend to be set on the last segment of any given
send() by the user. It is not, however, to ever be construed in any
way, shape or form, as a message marker.

> 3) I also tried to set the TCP_MAXSEG with the little code below; it
> did not
> gave an error, still the TCP_MAXSEG was not changed. It was
> 536 and stayed 536 after calling set_sock_opt; any ideas why ?

Perhaps one should not check the segment size until after the connection is
established?

rick jones
--
I don't interest myself in "why." I think more often in terms of
"when," sometimes "where;" always "how much." - Joubert
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...