vishal...@gmail.com <(E-Mail Removed)> wrote:
> maxseg = 0;
> maxseg_len = sizeof (maxseg);
> getsockopt(sockfd, IPPROTO_TCP, TCP_MAXSEG, &maxseg, &maxseg_len);
> maxseg = 1024;
> setsockopt(sockfd, IPPROTO_TCP, TCP_MAXSEG, &maxseg, maxseg_len)
I know it is a pedantic question, but are you sure the setsockopt()
returned success?
Do you have another getsockopt() call after it to retrieve the value
again?
Just a really wild guess, and likely wrong, perhaps setting the MSS is
a priviledged operation and regular userids cannot do it?
The manpage for TCP doesn't say anything about priviledge though:
TCP_MAXSEG
The maximum segment size for outgoing TCP packets. If this
option is set before connection establishment, it also changes
the MSS value announced to the other end in the initial packet.
Values greater than the (eventual) interface MTU have no effect.
TCP will also impose its minimum and maximum bounds over the
value provided.
Also, if you intend your code to be portable, keep in mind that not
all stacks actually allow the application to set the MSS, only to
retrieve it.
rick jones
--
The glass is neither half-empty nor half-full. The glass has a leak.
The real question is "Can it be patched?"
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...