Re: setsockopt(..,SO_RCVBUF,..) sets wrong value

Ton Hospel (linux-kernel@ton.iguana.be)
Fri, 3 Aug 2001 02:29:49 +0000 (UTC)


In article <15209.20899.731395.581746@pizda.ninka.net>,
"David S. Miller" <davem@redhat.com> writes:
> Manfred Bartz writes:
> > When I do a setsockopt(..,SO_RCVBUF,..) and then read the value back
> > with getsockopt(), the reported value is exactly twice of what I set.
>
> That's correct. Please search the list archives to learn why things
> behave this way and why they are not going to change.
>
> I wish that this long winded, and often occuring thread not occur
> again.
>

Why not simply divide it by two again before returning it on a get ?

What semantics you give exactly to the value is your business, but the
get/set assymetry is just pointless weirdness.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/