TCP/IP Programming Manual

When level is IPPROTO_IP, the value is:
Set IP options for each outgoing packet. optval_ptr is a pointer to a list of IP options
and values whose format is as defined in RFC 791.
IP_OPTIONS
Set the multicast interface IP address (that is, subnet IP address) to which the multicast
output is destined. A default interface is chosen if this option is not set or is set to
INADDR_ANY.
IP_MULTICAST_IF
Set Time-To-Live for multicast datagram. Default TTL is 1.IP_MULTICAST_TTL
Enable(1) or disable(0) loopback of messages sent to multicast groups. Default is
loopback-enabled.
IP_MULTICAST_LOOP
Add a multicast group to the socket. If the associated interface IP address is set to
INADDR_ANY or in6addr_any, a default interface is chosen.
IP_ADD_MEMBERSHIP
Delete a multicast group from the socket.IP_DROP_MEMBERSHIP
When level is IPPROTO_IPV6, the value is:
Set the multicast interface IP address (that is, subnet IP address) to which the multicast
output is destined. A default interface is chosen if this option is not set or is set to
in6addr_any for IPv6.
IPV6_MULTICAST_IF
Set Time-To-Live for multicast datagram. Default TTL is 1.IPV6_MULTICAST_HOPS
Enable(1) or disable(0) loopback of messages sent to multicast groups. Default is
loopback-enabled.
IPV6_MULTICAST_LOOP
Add a multicast group to the socket. If the associated interface IP address is set to
INADDR_ANY or in6addr_any, a default interface is chosen.
IPV6_JOIN_GROUP
Delete a multicast group from the socket.IPV6_LEAVE_GROUP
AF_INET6 sockets are restricted to IPv6–only communication.IPV6_V6ONLY
When level is IPPROTO_TCP, you should include the tcp.h file. The value is:
Do not buffer data packets before sending them. TCP_NODELAY is recommended where
per-character buffering and acknowledgment is inefficient; for example, in a
TCP_NODELAY
non-character-based application such as a terminal emulator client sending mouse and
window movement information to a terminal server.
Enables TCP selective acknowledgements.TCP_SACKENA
Sets the minimum time for TCP retransmission timeout. The default is 1 second. The range
is 500 milliseconds to 30 seconds.
TCP_MINRXMT
Sets the maximum time for a TCP retransmission timeout. The default is 64 seconds. The
range is 500 milliseconds to 20 minutes.
TCP_MAXRXMT
Sets the maximum number of continuous retransmissions prior to dropping a TCP
connection. The default is 12. The range is 1 to 12.
TCP_RXMTCNT
Sets the maximum continuous time spent retransmitting without receiving an
acknowledgement from the other endpoint. The default is 12 minutes. The range is 500
milliseconds to 4 hours.
TCP_TOTRXMTVAL
When level is a user-defined protocol above IP, the possible values are defined by the
protocol.
optval_ptr
input value; points to the value of the socket option, specified by optname, which is passed
to the level specified in level. Table 14 and Table 15 list the type and length of the value of
each socket option. Boolean-type values are integers, where 0 indicates false and 1 indicates
true.
186 Library Routines