+
+ /* tuning needs to happen after the socket is */
+ /* created but before the connection happens */
+ /* so winscale is negotiated properly -cjr */
+
+ /* Set tcp receive buffer if requested */
+ if (options.tcp_rcv_buf)
+ {
+ if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF,
+ (void *)&options.tcp_rcv_buf,
+ sizeof(options.tcp_rcv_buf)) >= 0)
+ {
+ debug("setsockopt SO_RCVBUF: %.100s", strerror(errno));
+ }
+ else
+ {
+ /* coudln't set the socket size to use spec. */
+ /* should default to system param and continue */
+ /* warn the user though - cjr */
+ error("Couldn't set socket receive buffer as requested. Continuing anyway.");
+ }
+ }
+
+ /* Bind the socket to an alternative local IP address */