.\" Copyright, the authors of the Linux man-pages project .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .TH IP_ADD_SOURCE_MEMBERSHIP 2const 2025-11-25 "Linux man-pages 6.17" .SH NAME IP_ADD_SOURCE_MEMBERSHIP \- join a multicast group and allow receiving data only from a specified source .SH LIBRARY Standard C library .RI ( libc ,\~ \-lc ) .SH SYNOPSIS .nf .BR "#include " " /* Definition of " IP* " constants */" .B #include .P .BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IP,\~IP_ADD_SOURCE_MEMBERSHIP, .BI " const\~struct\~ip_mreq_source\~*" val , .B " sizeof(struct\~ip_mreq_source));" .fi .SH DESCRIPTION Join a multicast group and allow receiving data only from a specified source. .P This option can be used multiple times to allow receiving data from more than one source. .SH ERRORS See .BR IPPROTO_IP (2const). See .BR setsockopt (2). See .BR ip (7). .SH HISTORY Linux 2.4.22, Linux 2.5.68. .SH SEE ALSO .BR IPPROTO_IP (2const), .BR IP_ADD_MEMBERSHIP (2const), .BR ip_mreq_source (2type), .BR setsockopt (2), .BR ip (7)