In article <[EMAIL PROTECTED]>,
Sandeep Agarwal <[EMAIL PROTECTED]> writes:
> Hi
> What is the deafult size of the receive and send buffers in Linux. Also
cat /proc/sys/net/core/[rw]mem_default
> when I set the size by using setsockopt() I see that the size is set to
> double that of what I have specified. i.e. if I set the size to be 32k and
> then I use getsockopt() it returns a value of 64k. However the window size
> advertised is 32k.
> Is this the normal behaviour or am I missing something...
It is normal behaviour. Linux counts internal packet headers etc. in the
buffer size, and as a heuristic it uses half of the reserved space for them.
For compatibility with BSD which does not count headers the setsockopt
settings are doubled.
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]