Zum Hauptinhalt springen

3. Multicast Reception State Maintained by Systems (Von Systemen verwalteter Multicast-Empfangsstatus)

3. Multicast Reception State Maintained by Systems (Von Systemen verwalteter Multicast-Empfangsstatus)

3.1. Socket State (Socket-Status)

For each socket on which IPMulticastListen has been invoked, the system records the desired multicast reception state for that socket. That state conceptually consists of a set of records of the form:

Für jeden Socket, auf dem IPMulticastListen aufgerufen wurde, zeichnet das System den gewünschten Multicast-Empfangsstatus für diesen Socket auf. Dieser Status besteht konzeptionell aus einer Reihe von Datensätzen der Form:

(interface, multicast-address, filter-mode, source-list)

The socket state evolves in response to each invocation of IPMulticastListen on the socket, as follows:

Der Socket-Status entwickelt sich als Reaktion auf jeden Aufruf von IPMulticastListen auf dem Socket wie folgt:

  • If the requested filter mode is INCLUDE and the requested source list is empty, then the entry corresponding to the requested interface and multicast address is deleted if present. If no such entry is present, the request is ignored.

  • Wenn der angeforderte Filtermodus INCLUDE ist und die angeforderte Quellliste leer ist, wird der Eintrag, der der angeforderten Schnittstelle und Multicast-Adresse entspricht, gelöscht, falls vorhanden. Wenn kein solcher Eintrag vorhanden ist, wird die Anforderung ignoriert.

  • If the requested filter mode is EXCLUDE or the requested source list is non-empty, then the entry corresponding to the requested interface and multicast address, if present, is changed to contain the requested filter mode and source list. If no such entry is present, a new entry is created, using the parameters specified in the request.

  • Wenn der angeforderte Filtermodus EXCLUDE ist oder die angeforderte Quellliste nicht leer ist, wird der Eintrag, der der angeforderten Schnittstelle und Multicast-Adresse entspricht, falls vorhanden, so geändert, dass er den angeforderten Filtermodus und die Quellliste enthält. Wenn kein solcher Eintrag vorhanden ist, wird unter Verwendung der in der Anforderung angegebenen Parameter ein neuer Eintrag erstellt.

3.2. Interface State (Schnittstellenstatus)

In addition to the per-socket multicast reception state, a system must also maintain or compute multicast reception state for each of its interfaces. That state conceptually consists of a set of records of the form:

Zusätzlich zum Multicast-Empfangsstatus pro Socket muss ein System auch den Multicast-Empfangsstatus für jede seiner Schnittstellen verwalten oder berechnen. Dieser Status besteht konzeptionell aus einer Reihe von Datensätzen der Form:

(multicast-address, filter-mode, source-list)

At most one record per multicast-address exists for a given interface. This per-interface state is derived from the per-socket state, but may differ from the per-socket state when different sockets have differing filter modes and/or source lists for the same multicast address and interface. For example, suppose one application or process invokes the following operation on socket s1:

Für eine bestimmte Schnittstelle existiert höchstens ein Datensatz pro Multicast-Adresse. Dieser Status pro Schnittstelle wird vom Status pro Socket abgeleitet, kann sich jedoch vom Status pro Socket unterscheiden, wenn verschiedene Sockets unterschiedliche Filtermodi und/oder Quelllisten für dieselbe Multicast-Adresse und Schnittstelle haben. Nehmen wir beispielsweise an, eine Anwendung oder ein Prozess ruft die folgende Operation auf Socket s1 auf:

IPMulticastListen ( s1, i, m, INCLUDE, {a, b, c} )

requesting reception on interface i of packets sent to multicast address m, only if they come from source a, b, or c. Suppose another application or process invokes the following operation on socket s2:

und fordert den Empfang von Paketen auf Schnittstelle i an, die an die Multicast-Adresse m gesendet werden, nur wenn sie von Quelle a, b oder c stammen. Nehmen wir an, eine andere Anwendung oder ein anderer Prozess ruft die folgende Operation auf Socket s2 auf:

IPMulticastListen ( s2, i, m, INCLUDE, {b, c, d} )

requesting reception on the same interface i of packets sent to the same multicast address m, only if they come from sources b, c, or d. In order to satisfy the reception requirements of both sockets, it is necessary for interface i to receive packets sent to m from any one of the sources a, b, c, or d. Thus, in this example, the reception state of interface i for multicast address m has filter mode INCLUDE and source list {a, b, c, d}.

und fordert den Empfang von Paketen auf derselben Schnittstelle i an, die an dieselbe Multicast-Adresse m gesendet werden, nur wenn sie von den Quellen b, c oder d stammen. Um die Empfangsanforderungen beider Sockets zu erfüllen, ist es notwendig, dass Schnittstelle i Pakete empfängt, die von einer der Quellen a, b, c oder d an m gesendet werden. Daher hat in diesem Beispiel der Empfangsstatus der Schnittstelle i für die Multicast-Adresse m den Filtermodus INCLUDE und die Quellliste {a, b, c, d}.

After a multicast packet has been accepted from an interface by the IP layer, its subsequent delivery to the application or process listening on a particular socket depends on the multicast reception state of that socket [and possibly also on other conditions, such as what transport-layer port the socket is bound to]. So, in the above example, if a packet arrives on interface i, destined to multicast address m, with source address a, it will be delivered on socket s1 but not on socket s2. Note that IGMP Queries and Reports are not subject to source filtering and must always be processed by hosts and routers.

Nachdem ein Multicast-Paket von der IP-Schicht von einer Schnittstelle akzeptiert wurde, hängt seine anschließende Zustellung an die Anwendung oder den Prozess, die/der auf einem bestimmten Socket lauscht, vom Multicast-Empfangsstatus dieses Sockets ab [und möglicherweise auch von anderen Bedingungen, z. B. an welchen Transport-Layer-Port der Socket gebunden ist]. Im obigen Beispiel wird also ein Paket, das auf Schnittstelle i ankommt, für die Multicast-Adresse m bestimmt ist und die Quelladresse a hat, an Socket s1, aber nicht an Socket s2 zugestellt. Beachten Sie, dass IGMP-Abfragen und -Berichte keiner Quellfilterung unterliegen und immer von Hosts und Routern verarbeitet werden müssen.

Filtering of packets based upon a socket's multicast reception state is a new feature of this service interface. The previous service interface [RFC1112] described no filtering based upon multicast join state; rather, a join on a socket simply caused the host to join a group on the given interface, and packets destined for that group could be delivered to all sockets whether they had joined or not.

Das Filtern von Paketen basierend auf dem Multicast-Empfangsstatus eines Sockets ist eine neue Funktion dieser Serviceschnittstelle. Die vorherige Serviceschnittstelle [RFC1112] beschrieb keine Filterung basierend auf dem Multicast-Join-Status; vielmehr bewirkte ein Join auf einem Socket einfach, dass der Host einer Gruppe auf der angegebenen Schnittstelle beitrat, und Pakete, die für diese Gruppe bestimmt waren, konnten an alle Sockets zugestellt werden, unabhängig davon, ob sie beigetreten waren oder nicht.

The general rules for deriving the per-interface state from the per-socket state are as follows: For each distinct (interface, multicast-address) pair that appears in any socket state, a per-interface record is created for that multicast address on that interface. Considering all socket records containing the same (interface, multicast-address) pair,

Die allgemeinen Regeln zum Ableiten des Status pro Schnittstelle aus dem Status pro Socket lauten wie folgt: Für jedes eindeutige Paar (Schnittstelle, Multicast-Adresse), das in einem Socket-Status vorkommt, wird ein Datensatz pro Schnittstelle für diese Multicast-Adresse auf dieser Schnittstelle erstellt. Unter Berücksichtigung aller Socket-Datensätze, die dasselbe Paar (Schnittstelle, Multicast-Adresse) enthalten,

  • if any such record has a filter mode of EXCLUDE, then the filter mode of the interface record is EXCLUDE, and the source list of the interface record is the intersection of the source lists of all socket records in EXCLUDE mode, minus those source addresses that appear in any socket record in INCLUDE mode. For example, if the socket records for multicast address m on interface i are:

  • wenn irgendein solcher Datensatz einen Filtermodus von EXCLUDE hat, dann ist der Filtermodus des Schnittstellendatensatzes EXCLUDE, und die Quellliste des Schnittstellendatensatzes ist die Schnittmenge der Quelllisten aller Socket-Datensätze im EXCLUDE-Modus, abzüglich der Quelladressen, die in einem Socket-Datensatz im INCLUDE-Modus vorkommen. Wenn beispielsweise die Socket-Datensätze für die Multicast-Adresse m auf der Schnittstelle i wie folgt lauten:

from socket s1:  ( i, m, EXCLUDE, {a, b, c, d} )
from socket s2: ( i, m, EXCLUDE, {b, c, d, e} )
from socket s3: ( i, m, INCLUDE, {d, e, f} )

then the corresponding interface record on interface i is:

dann lautet der entsprechende Schnittstellendatensatz auf Schnittstelle i:

( m, EXCLUDE, {b, c} )

If a fourth socket is added, such as:

Wenn ein vierter Socket hinzugefügt wird, wie z. B.:

from socket s4:  ( i, m, EXCLUDE, {} )

then the interface record becomes:

dann wird der Schnittstellendatensatz zu:

( m, EXCLUDE, {} )
  • if all such records have a filter mode of INCLUDE, then the filter mode of the interface record is INCLUDE, and the source list of the interface record is the union of the source lists of all the socket records. For example, if the socket records for multicast address m on interface i are:

  • wenn alle solchen Datensätze einen Filtermodus von INCLUDE haben, dann ist der Filtermodus des Schnittstellendatensatzes INCLUDE, und die Quellliste des Schnittstellendatensatzes ist die Vereinigung der Quelllisten aller Socket-Datensätze. Wenn beispielsweise die Socket-Datensätze für die Multicast-Adresse m auf der Schnittstelle i wie folgt lauten:

from socket s1:  ( i, m, INCLUDE, {a, b, c} )
from socket s2: ( i, m, INCLUDE, {b, c, d} )
from socket s3: ( i, m, INCLUDE, {e, f} )

then the corresponding interface record on interface i is:

dann lautet der entsprechende Schnittstellendatensatz auf Schnittstelle i:

( m, INCLUDE, {a, b, c, d, e, f} )

An implementation MUST NOT use an EXCLUDE interface record to represent a group when all sockets for this group are in INCLUDE state. If system resource limits are reached when an interface state source list is calculated, an error MUST be returned to the application which requested the operation.

Eine Implementierung DARF KEINEN EXCLUDE-Schnittstellendatensatz verwenden, um eine Gruppe darzustellen, wenn sich alle Sockets für diese Gruppe im INCLUDE-Status befinden. Wenn beim Berechnen einer Schnittstellenstatus-Quellliste Systemressourcengrenzen erreicht werden, MUSS ein Fehler an die Anwendung zurückgegeben werden, die die Operation angefordert hat.

The above rules for deriving the interface state are (re-)evaluated whenever an IPMulticastListen invocation modifies the socket state by adding, deleting, or modifying a per-socket state record. Note that a change of socket state does not necessarily result in a change of interface state.

Die oben genannten Regeln zum Ableiten des Schnittstellenstatus werden (neu) bewertet, wann immer ein IPMulticastListen-Aufruf den Socket-Status durch Hinzufügen, Löschen oder Ändern eines Datensatzes pro Socket ändert. Beachten Sie, dass eine Änderung des Socket-Status nicht unbedingt zu einer Änderung des Schnittstellenstatus führt.