TCP/IP Programming Manual

optlen
input value; the length, in bytes, of the list pointed to by optval_ptr. If too small, the error
EINVAL is returned. (See Errors (page 188).)
tag
input value; the tag parameter to be used for the nowait operation initiated by
setsockopt_nw.
Table 14 Types and Lengths of Socket Option Values
TypeSocket Option
Integer (Boolean)SO_BROADCAST
IntegerSO_ERROR
IntegerSO_TYPE
Integer (Boolean)SO_DONTROUTE
Integer (Boolean)SO_REUSEADDR
Struct linger {SO_LINGER
short l_onoff; /*boolean*/
short l_linger; /*time*/
};
Integer (Boolean)SO_KEEPALIVE
Integer (Boolean)SO_OOBINLINE
IntegerSO_SNDBUF
IntegerSO_RCVBUF
IntegerIP_OPTIONS
Integer (Boolean)TCP_NODELAY
Integer (Boolean)TCP_SACKENA
IntegerTCP_MINRXMT
IntegerTCP_MAXRXMT
IntegerTCP_RXMTCNT
IntegerTCP_TOTRXMTVAL
struct in_addrIP_MULTICAST_IF
integerIPV6_MULTICAST_IF
charIP_MULTICAST_TTL
integerIPV6_MULTICAST_HOPS
charIP_MULTICAST_LOOP
integerIPV6_MULTICAST_LOOP
struct ip_mreqIP_ADD_MEMBERSHIP
struct ipv6_mreqIPV6_JOIN_GROUP
struct ip_mreqIP_DROP_MEMBERSHIP
struct ipv6_mreqIPV6_LEAVE_GROUP
Note: For Boolean options, the option value should be set to TRUE or a nonzero value to enable the option; the option
value should be set to 0 (zero) or FALSE to disable the option.
setsockopt, setsockopt_nw 187