Open System Services System Calls Reference Manual (G06.25+, H06.03+)

System Functions (s and S) setsockopt(2)
IP_MULTICAST_TTL
Species the hop limit for outbound multicast UDP datagrams.
option_value is an int that is either:
Between 0 and 255 to indicate the maximum number of
hops allowed
Between 0 and 255 to indicate the maximum number of
hops allowed
-1 to indicate that the default value should be used
All other values cause an error and errno is set to [EINVAL].
IP_MULTICAST_LOOP
Species that the host belongs to the multicast group that it is
sending to, and a copy of the datagram should be sent by loop-
back to the originating host. This is the default behavior.
option_value is an unsigned int.
The SOL_SOCKET (socket-level protocol) options are:
SO_BROADCAST
Enables or disables sending of broadcast messages. The default
value used when the socket is created is 0 (zero), which disables
the option.
This option is valid only for AF_INET or AF_INET6 datagram
(UDP) sockets. If this option is specied for sockets of other
types, the function call fails and errno is set to [ENOPRO-
TOOPT].
option_value takes an int value. Specifying any nonzero value
enables broadcast messages.
SO_DEBUG Enables or disables recording of debugging information in the
underlying protocol modules. The default value used when the
socket is created is 0 (zero), which disables the option.
This option is valid only for AF_INET or AF_INET6 sockets.
If this option is specied for sockets of other types, the function
call fails and errno is set to [ENOPROTOOPT].
option_value takes an int value. Specifying a nonzero value
enables recording of debugging information.
SO_DONTROUTE
Species whether outgoing messages should bypass the standard
routing facilities and be directed to the appropriate network
interface, according to the destination address. The default
value used when the socket is created is 0 (zero), which indi-
cates the use of standard routing.
This option is valid only for AF_INET or AF_INET6 sockets.
If this option is specied for sockets of other types, the function
call fails and sets errno to [ENOPROTOOPT].
option_value takes an int value. Specifying any nonzero value
bypasses normal routing.
527186-003 Hewlett-Packard Company 739