I am using lwip_socket() to create sockets for TCP/IP communication between two guests in a VM. I tried a bit to set the socket's send and receive buffer sizes. When I enabled LWIP_SO_RCVBUF, I could use setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, &rcv_size, &sizeofint) to set the socket's receive buffer's size. But in a similar way I could not set the socket's send buffer size using SO_SNDBUF. After browsing thru net/api/sockets.c I found that SO_SNDBUF was not implemented.
I also found a TCP option called TCP_SND_BUF in lwip/opt.h file. Does this represent the TCP socket's send buffer size? But still it only hardcodes the value instead of allowing send buffer size to be modified dynamically.
Also each lwip_socket has a struct netconn member. When LWIP_SO_RCVBUF is enabled struct netconn has recv_bufsize member which I think stands for socket's receive buffer size. But there is no member for send buffer size. So is it not programmatically possible to alter the socket's send buffer size? Please let me know your views.