Debian Codegraph @

upstream/debian-unstable/man2/IP_ADD_SOURCE_MEMBERSHIP.2const

raw
1 .\" Copyright, the authors of the Linux man-pages project
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .TH IP_ADD_SOURCE_MEMBERSHIP 2const 2025-11-25 "Linux man-pages 6.18"
6 .SH NAME
7 IP_ADD_SOURCE_MEMBERSHIP
8 \-
9 join a multicast group
10 and allow receiving data
11 only from a specified source
12 .SH LIBRARY
13 Standard C library
14 .RI ( libc ,\~ \-lc )
15 .SH SYNOPSIS
16 .nf
17 .BR "#include <netinet/in.h>" " /* Definition of " IP* " constants */"
18 .B #include <sys/socket.h>
19 .P
20 .BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IP,\~IP_ADD_SOURCE_MEMBERSHIP,
21 .BI " const\~struct\~ip_mreq_source\~*" val ,
22 .B " sizeof(struct\~ip_mreq_source));"
23 .fi
24 .SH DESCRIPTION
25 Join a multicast group and allow receiving data only
26 from a specified source.
27 .P
28 This option can be used multiple times to allow
29 receiving data from more than one source.
30 .SH ERRORS
31 See
32 .BR IPPROTO_IP (2const).
33 See
34 .BR setsockopt (2).
35 See
36 .BR ip (7).
37 .SH HISTORY
38 Linux 2.4.22, Linux 2.5.68.
39 .SH SEE ALSO
40 .BR IPPROTO_IP (2const),
41 .BR IP_ADD_MEMBERSHIP (2const),
42 .BR ip_mreq_source (2type),
43 .BR setsockopt (2),
44 .BR ip (7)