IP_MULTICAST_ALL(2const)

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).

History

Linux 2.6.31.

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.