3.3.5.6 Receiving a FanoutOpen Command

If a FanoutOpen command is received with a SessionId field identifying a session for which there is no state, the recipient MUST send a ConnectClose as specified in section 3.1.4.2 with a ReasonId of TooManyUnknownSessionCmds (0x0f).

Upon receipt of a FanoutOpen command the receiving session state MUST be set to ‘opening’. The recipient MAY send an OpenResponse command<19>. The ReasonId MUST be determined based on the fields in the Open command as follows:

  • If the NumFanoutDeviceEntries field contains a value of 0 the fanout session MUST set the ResponseId to OK (0x00), and session state MUST be removed.

  • If the locally configured value for Multi-dropSupported is false, and the FanoutOpen destination addresses specify a FanoutDeviceEntry RelayURL consisting of an empty string (0x00), or matching one of the locally configured LocalDeviceURLs, then the fanout session MUST be rejected by setting the ResponseId to NoFanoutEntries (0x08), and session state MUST be removed.

  • If the locally configured value for SingleHopSupported is false, and the FanoutOpen destination addresses specify a FanoutDeviceEntry RelayURL containing a non-empty RelayURL which is not the same as one of the locally configured LocalDeviceURLs, then the fanout session MUST be rejected by setting the ResponseId to FanoutNotSupported (0x0c), and session state MUST be removed.

  • If the ResourceURL is "grooveWanDPP" the fanout session MUST be rejected by setting the ResponseId to NoResource (0x04), and session state MUST be removed.

  • The receiving device MUST validate the IdentityURL, DeviceURL, and RelayURL for each FanoutDeviceEntry found in the FanoutDeviceEntries list. If the validation of the IdentityURL, DeviceURL, and RelayURL fails, then the fanout session entry is not recognized by the receiver as a valid destination resource handler and the ResponseId MUST be set to Unknown (0x05), and session state MUST be removed.

  • Otherwise, the ResponseId MUST be set to OkStopSending (0x0b), and session state MUST be set to ‘suspended’.

For each valid fanout session entry, an entry MUST be added to the session FanoutAddressingList collection. The ResourceHandlerAvailability for each addressed resource in the FanoutAddressingList is determined as follows:

  • For those FanoutAddressingList entries which identify a local relay server multi-drop target, the ResourceHandlerAvailability for the addressed resource MUST be set to ‘notReady’. The higher-layer can notify of changes as specified in section 3.3.4.1.2.

  • For those FanoutAddressingList entries which identify a remote relay server single-hop target, the ResourceHandlerAvailability for the addressed resource MUST be set to ‘notReady’, and subsequent processing as specified in section 3.3.5.6.1 MUST be performed.

Upon sending the OpenResponse for a session, the receiving session MessageReceiver state MUST be set to ‘waiting’.