IP_MULTICAST_ALL2const
Delivery policy of multicast messages
Usage
#include <netinet/in.h> /* Definition of IP* constants */ #include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IP, IP_MULTICAST_ALL, const int *val, sizeof(int));
Library
Standard C library (libc, -lc)
Overview
This option can be used to modify the delivery policy of multicast messages.
If set to 1 (default), the socket will receive messages from all the groups that have been joined globally on the whole system.
If set to 0, it will deliver messages only from the groups that have been explicitly joined (for example via IP_ADD_MEMBERSHIP(2const)) on this particular socket.
Errors
See IPPROTO_IP(2const). See setsockopt(2). See ip(7).