メインコンテンツまでスキップ

3. Multicast Reception State Maintained by Systems (システムによって維持されるマルチキャスト受信状態)

3. Multicast Reception State Maintained by Systems (システムによって維持されるマルチキャスト受信状態)

3.1. Socket State (ソケット状態)

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:

IPMulticastListen が呼び出された各ソケットについて、システムはそのソケットの希望するマルチキャスト受信状態を記録します。その状態は概念的には次の形式の一連のレコードで構成されます。

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

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

ソケット状態は、ソケットでの IPMulticastListen の各呼び出しに応じて次のように変化します。

  • 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.

  • 要求されたフィルタモードが INCLUDE かつ要求されたソースリストが空の場合、要求されたインターフェースとマルチキャストアドレスに対応するエントリが存在すれば削除されます。そのようなエントリが存在しない場合、要求は無視されます。

  • 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.

  • 要求されたフィルタモードが EXCLUDE または要求されたソースリストが空でない場合、要求されたインターフェースとマルチキャストアドレスに対応するエントリが存在すれば、要求されたフィルタモードとソースリストを含むように変更されます。そのようなエントリが存在しない場合、要求で指定されたパラメータを使用して新しいエントリが作成されます。

3.2. Interface State (インターフェース状態)

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:

ソケットごとのマルチキャスト受信状態に加えて、システムは各インターフェースのマルチキャスト受信状態も維持または計算する必要があります。その状態は概念的には次の形式の一連のレコードで構成されます。

(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:

特定のインターフェースには、マルチキャストアドレスごとに最大 1 つのレコードが存在します。このインターフェースごとの状態はソケットごとの状態から派生しますが、異なるソケットが同じマルチキャストアドレスとインターフェースに対して異なるフィルタモードやソースリストを持っている場合、ソケットごとの状態とは異なる場合があります。たとえば、あるアプリケーションまたはプロセスがソケット s1 で次の操作を呼び出すとします。

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:

マルチキャストアドレス m に送信されたパケットのインターフェース i での受信を、ソース a、b、または c からのものである場合のみ要求します。別のアプリケーションまたはプロセスがソケット s2 で次の操作を呼び出すとします。

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}.

同じマルチキャストアドレス m に送信されたパケットの同じインターフェース i での受信を、ソース b、c、または d からのものである場合のみ要求します。両方のソケットの受信要件を満たすには、インターフェース i がソース a、b、c、または d のいずれかから m に送信されたパケットを受信する必要があります。したがって、この例では、マルチキャストアドレス m に対するインターフェース i の受信状態は、フィルタモード INCLUDE とソースリスト {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.

マルチキャストパケットが IP 層によってインターフェースから受け入れられた後、特定のソケットで待機しているアプリケーションまたはプロセスへのその後の配信は、そのソケットのマルチキャスト受信状態 [および場合によっては、ソケットがバインドされているトランスポート層ポートなどの他の条件] に依存します。したがって、上記の例では、パケットがインターフェース i に到着し、マルチキャストアドレス m 宛てで、送信元アドレスが a である場合、それはソケット s1 に配信されますが、ソケット s2 には配信されません。IGMP クエリとレポートはソースフィルタリングの対象ではなく、ホストとルーターによって常に処理される必要があることに注意してください。

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.

ソケットのマルチキャスト受信状態に基づくパケットのフィルタリングは、このサービスインターフェースの新機能です。以前のサービスインターフェース [RFC1112] では、マルチキャスト参加状態に基づくフィルタリングについては説明されていませんでした。むしろ、ソケットでの参加は単にホストが特定のインターフェース上のグループに参加することを引き起こし、そのグループ宛てのパケットは、参加しているかどうかに関係なくすべてのソケットに配信される可能性がありました。

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,

ソケットごとの状態からインターフェースごとの状態を導出するための一般的なルールは次のとおりです。任意のソケット状態に現れる個別の(インターフェース、マルチキャストアドレス)ペアごとに、そのインターフェース上のそのマルチキャストアドレスに対してインターフェースごとのレコードが作成されます。同じ(インターフェース、マルチキャストアドレス)ペアを含むすべてのソケットレコードを考慮すると、

  • 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:

  • そのようなレコードのいずれかに EXCLUDE のフィルタモードがある場合、インターフェースレコードのフィルタモードは EXCLUDE であり、インターフェースレコードのソースリストは、EXCLUDE モードのすべてのソケットレコードのソースリストの積集合から、INCLUDE モードの任意のソケットレコードに現れるソースアドレスを引いたものです。たとえば、インターフェース i 上のマルチキャストアドレス m のソケットレコードが次の場合:

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:

その場合、インターフェース i 上の対応するインターフェースレコードは次のようになります。

( m, EXCLUDE, {b, c} )

If a fourth socket is added, such as:

次のような 4 番目のソケットが追加された場合:

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

then the interface record becomes:

その場合、インターフェースレコードは次のようになります。

( 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:

  • そのようなレコードのすべてに INCLUDE のフィルタモードがある場合、インターフェースレコードのフィルタモードは INCLUDE であり、インターフェースレコードのソースリストは、すべてのソケットレコードのソースリストの和集合です。たとえば、インターフェース i 上のマルチキャストアドレス m のソケットレコードが次の場合:

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:

その場合、インターフェース 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.

このグループのすべてのソケットが INCLUDE 状態にある場合、実装はグループを表すために EXCLUDE インターフェースレコードを使用してはなりません(MUST NOT)。インターフェース状態のソースリストが計算されるときにシステムリソースの制限に達した場合、操作を要求したアプリケーションにエラーを返さなければなりません(MUST)。

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.

インターフェース状態を導出するための上記のルールは、IPMulticastListen 呼び出しがソケットごとの状態レコードを追加、削除、または変更することによってソケット状態を変更するたびに(再)評価されます。ソケット状態の変更は必ずしもインターフェース状態の変更をもたらすわけではないことに注意してください。