| 1 |
.\" Copyright, the authors of the Linux man-pages project |
| 2 |
.\" |
| 3 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 4 |
.\" |
| 5 |
.TH IP_MULTICAST_ALL 2const 2025-11-25 "Linux man-pages 6.18" |
| 6 |
.SH NAME |
| 7 |
IP_MULTICAST_ALL |
| 8 |
\- |
| 9 |
delivery policy of multicast messages |
| 10 |
.SH LIBRARY |
| 11 |
Standard C library |
| 12 |
.RI ( libc ,\~ \-lc ) |
| 13 |
.SH SYNOPSIS |
| 14 |
.nf |
| 15 |
.BR "#include <netinet/in.h>" " /* Definition of " IP* " constants */" |
| 16 |
.B #include <sys/socket.h> |
| 17 |
.P |
| 18 |
.BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IP,\~IP_MULTICAST_ALL, |
| 19 |
.BI " const\~int\~*" val ,\~sizeof(int)); |
| 20 |
.fi |
| 21 |
.SH DESCRIPTION |
| 22 |
This option can be used to modify the delivery policy of multicast messages. |
| 23 |
.P |
| 24 |
If set to 1 (default), |
| 25 |
the socket will receive messages from all the groups that have been joined |
| 26 |
globally on the whole system. |
| 27 |
.P |
| 28 |
If set to 0, |
| 29 |
it will deliver messages only from |
| 30 |
the groups that have been explicitly joined |
| 31 |
(for example via |
| 32 |
.BR IP_ADD_MEMBERSHIP (2const)) |
| 33 |
on this particular socket. |
| 34 |
.SH ERRORS |
| 35 |
See |
| 36 |
.BR IPPROTO_IP (2const). |
| 37 |
See |
| 38 |
.BR setsockopt (2). |
| 39 |
See |
| 40 |
.BR ip (7). |
| 41 |
.SH HISTORY |
| 42 |
Linux 2.6.31. |
| 43 |
.SH SEE ALSO |
| 44 |
.BR IPPROTO_IP (2const), |
| 45 |
.BR setsockopt (2), |
| 46 |
.BR ip (7) |