Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (s and S) setsockopt(2)
IP_MULTICAST_IF
Specifies the interface (subnet) to use for outbound multicast
UDP datagrams. option_value is an unsigned int.
IP_MULTICAST_TTL
Specifies 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
• -1 to indicate a limit of 255 hops
The default maximum number of hops allowed is 1. All other
values cause an error and errno is set to [EINVAL].
IP_MULTICAST_LOOP
Enables or disables multicast messages sent to loopback for
applications that have joined the same group on the same inter-
face. This option is enabled by default. 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 specified 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 specified 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
Specifies 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 specified for sockets of other types, the function
call fails and sets errno to [ENOPROTOOPT].
option_value takes an int value. Specifying any nonzero value
527186-023 Hewlett-Packard Company 7−71