Open System Services System Calls Reference Manual (G06.28+, H06.05+)
setsockopt(2) OSS System Calls Reference Manual
TCP_SACKENA
Specifies whether TCP selective acknowledgments are enabled.
option_value takes an int value. A nonzero value indicates that
selective acknowledgments are enabled. A 0 (zero) value indi-
cates that selective acknowledgments should not be used.
TCP_TOTRXMTVAL
Sets the total maximum retransmission duration in multiples of
500 milliseconds. Once the duration is reached, the TCP
cpnnection is dropped.
option_value takes an int value. Valid values are in the range 1
through 28800. When the value specified for the
TCP_RXMTCNT option is multiplied by the value used for the
TCP_MAXRMT option and the result is less than the value
used for TCP_TOTRXMTVAL, the TCP connection will be
dropped before the TCP_TOTRXMTVAL value is reached.
Options at other protocol levels vary in format and name.
option_value Points to the buffer containing the appropriate option value. For options that can
be classified as disabled or enabled, a value of 0 (zero) indicates that the option
should be disabled and a value of 1 indicates that the option should be enabled.
option_len Contains the size of the buffer pointed to by the option_value parameter.
DESCRIPTION
The setsockopt( ) function sets options associated with a socket. Options can exist at multiple
protocol levels. The SO_* options are always present at the uppermost socket level.
The setsockopt( ) function provides an application program with the means to control socket
communication. An application program can use the setsockopt( ) function to enable debugging
at the protocol level, allocate buffer space, control time-outs, or permit socket data broadcasts.
The sys/socket.h header file defines all the SO_* options available to the setsockopt( ) function.
RETURN VALUES
Upon successful completion, the setsockopt( ) function returns the value 0 (zero). Otherwise, the
value -1 is returned and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the setsockopt() function sets errno to the correspond-
ing value:
[EBADF] The socket parameter is not a valid file descriptor.
[ECONNRESET]
One of the following conditions occurred:
• The transport-provider process for this socket is no longer available.
• The TCP/IP subsystem for this socket is no longer available.
• The connection was forcibly closed by the peer socket.
The socket can only be closed.
7−48 Hewlett-Packard Company 527186-007