4. Protocol Description for Multicast Listeners
This section describes the part of MLDv2 that applies to multicast listeners (hosts or routers). The protocol described in this section is performed over each interface on which multicast reception is supported.
4.1. Multicast Listener State
A multicast listener maintains a per-interface state for each multicast address. This state consists of a filter mode and a list of source addresses.
- Filter Mode: Can be either INCLUDE or EXCLUDE.
- Source List: A set of unicast IP addresses from which multicast packets are accepted (if mode is INCLUDE) or rejected (if mode is EXCLUDE).
4.2. Action on Change of Interface State
When the multicast reception state on an interface changes (e.g., an application joins a group or changes its source filters), the listener immediately transmits a State Change Report.
The State Change Report contains a Multicast Address Record for the affected multicast address. The Record Type and content depend on the change:
| Old State | New State | Record Type | Content |
|---|---|---|---|
| INCLUDE (A) | INCLUDE (B) | ALLOW | B - A |
| INCLUDE (A) | INCLUDE (B) | BLOCK | A - B |
| EXCLUDE (A) | EXCLUDE (B) | ALLOW | A - B |
| EXCLUDE (A) | EXCLUDE (B) | BLOCK | B - A |
| INCLUDE (A) | EXCLUDE (B) | TO_EX | B |
| EXCLUDE (A) | INCLUDE (B) | TO_IN | B |
4.3. Action on Reception of a Query
When a listener receives a Query, it performs the following actions:
- If the Query is a General Query, the listener sends a Current State Report for all multicast addresses for which it has state.
- If the Query is a Multicast-Address-Specific Query, the listener sends a Current State Report for the specified multicast address (if it has state for it).
- If the Query is a Multicast-Address-and-Source-Specific Query, the listener sends a Current State Report for the specified multicast address if the specified sources are of interest.
The Current State Report contains Multicast Address Records with the following Record Types:
- MODE_IS_INCLUDE: Indicates that the interface has a filter mode of INCLUDE for the specified multicast address. The Source List contains the specific sources of interest.
- MODE_IS_EXCLUDE: Indicates that the interface has a filter mode of EXCLUDE for the specified multicast address. The Source List contains the specific sources to be excluded.
The Report is sent after a random delay (up to the Maximum Response Delay specified in the Query) to avoid synchronization of Reports from multiple listeners.