Debian Codegraph @

upstream/debian-unstable/man2/IP_MSFILTER.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_MSFILTER 2const 2025-11-25 "Linux man-pages 6.18"
6 .SH NAME
7 IP_MSFILTER
8 \-
9 multicast source filtering
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_MSFILTER,
19 .BI " const\~struct\~ip_msfilter\~*" val ,
20 .B " sizeof(struct\~ip_msfilter));"
21 .fi
22 .P
23 .EX
24 struct ip_msfilter {
25 struct in_addr imsf_multiaddr; // IP multicast group address
26 struct in_addr imsf_interface; // IP address of local interface
27 uint32_t imsf_fmode; // Filter\-mode
28 \&
29 uint32_t imsf_numsrc; // Number of elements in .imsf_slist
30 struct in_addr imsf_slist[1]; // Array of source addresses
31 };
32 .EE
33 .SH DESCRIPTION
34 This option provides access to the advanced full-state filtering API.
35 .P
36 There are two macros,
37 .B MCAST_INCLUDE
38 and
39 .BR MCAST_EXCLUDE ,
40 which can be used to specify the filtering mode.
41 .P
42 Additionally,
43 the
44 .BR IP_MSFILTER_SIZE (n)
45 macro exists to determine how much memory is needed to store
46 .I ip_msfilter
47 structure with
48 .I n
49 sources in the source list.
50 .P
51 For the full description of multicast source filtering
52 refer to RFC 3376.
53 .SH ERRORS
54 See
55 .BR IPRROTO_IP (2const).
56 See
57 .BR setsockopt (2).
58 See
59 .BR ip (7).
60 .SH STANDARDS
61 Linux.
62 .SH HISTORY
63 Linux 2.4.22, Linux 2.5.68.
64 .SH SEE ALSO
65 .BR IPPROTO_IP (2const),
66 .BR setsockopt (2),
67 .BR ip (7)