functions implement the advanced, full-state multicast API
defined in RFC 3678.
An application may use these functions to atomically set and
retrieve the multicast source address filters associated with a socket
and a multicast
allow an application to discover the filter mode, and
source filter entries,
for an existing group membership.
The kernel will always return the number of source filter
entries on the socket for that group in
argument is non-zero, the kernel will attempt to return up to
filter entries in the array pointed to by
argument may be set to 0, in which case the
argument will be ignored.
argument may be used to place the socket into inclusive or exclusive
group membership modes, by using the
argument specifies the number of source entries in the
argument has a value of 0,
all source filters will be removed from the socket.
Removing all source filters from a membership which is in the
filter mode will cause the group to be left on that socket.
The protocol-independent function
allows an application to join a multicast group on an interface
which may not have an assigned protocol address,
by passing its index for the
Any changes made by these functions
will be communicated to IGMPv3 and/or MLDv2 routers
on the local network as appropriate.
If no IGMPv3 or MLDv2 routers are present, changes in the source filter
lists made by these functions will not cause
state changes to be transmitted, with the exception of any
change which causes a group to be joined or left.
The kernel will continue to maintain the source filter state
regardless of the IGMP or MLD version in use on the link.
The IPv4 specific versions of these functions are implemented in terms
of the protocol-independent functions.
Application writers are encouraged to use the protocol-independent functions
for efficiency, and forwards compatibility with IPv6 networks.
For the protocol-independent functions
argument specifies the size of the structure pointed to by
This is required in order to differentiate between different
does not support source address selection for the IPv4
protocol family, therefore the use of multicast APIs with
an unnumbered IPv4 interface is
In all cases, the first assigned IPv4 address on the interface
will be used as the source address of IGMP control traffic.
If this address is removed or changed, the results are undefined.