---
name: "IP_MULTICAST_ALL"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/IP_MULTICAST_ALL"
---

# IP\_MULTICAST\_ALL(2const)

delivery policy of multicast messages

## NAME

IP\_MULTICAST\_ALL - delivery policy of multicast messages

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#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));**

## DESCRIPTION

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)](/IP_ADD_MEMBERSHIP/2const.md)) on this particular socket.

## ERRORS

See [**IPPROTO\_IP**(2const)](/IPPROTO_IP/2const.md). See [**setsockopt**(2)](/setsockopt/2.md). See [**ip**(7)](/ip/7.md).

## HISTORY

Linux 2.6.31.

## SEE ALSO

[**IPPROTO\_IP**(2const)](/IPPROTO_IP/2const.md), [**setsockopt**(2)](/setsockopt/2.md), [**ip**(7)](/ip/7.md)
