1

I have an aplication that need to have a fixed (516 byes) payload size in the TCP packet. The application itself can't be modified to adjust it settings, therefore i need to tune the TCP Buffer Size of the O.S....

As far as i know the TCP Buffer Size (SO_SNDBUF) may be tuned so that the 'autotuning' won't try to include more data in the packet.

If I tune SO_SNDBUF to 516 will that be only for the payload or will it affect the entire packet (header + payload)?

1 Answers1

2

If you set SO_SNDBUF on a socket to 516, the kernel will double it and assume that the buffers must be 1032 bytes. That overhead is for kernel structures.

If you create a message buffer with 516 bytes, populate it and then call send() or sendto() or write(), then those 516 bytes will be automatically be sent on the wire as a single packet.

amrith
  • 708
  • 1
  • 5
  • 5