3.3.5.1.1 Channel Messages

When receiving a MILCTRLCMD_OPENCHANNEL message, the client MUST create state that will allow it to handle resource manipulation channel messages on the new channel. The new channel is identified by the channelHandle field of the MILCTRLCMD_OPENCHANNEL channel message. When a new channel is created, if the sourceChannelHandle field is not NULL, the new channel is related to the set to which the specified existing channel belongs. If the field is NULL, a new set of related channels is implicitly created. Related channels can have resources duplicated from one to the other.

When receiving a MILCTRLCMD_DATAONCHANNEL message, the client MUST interpret the data at the message payload offset as a channel message, and process that channel message. Channel messages are either resource lifetime messages or resource manipulation messages. Lifetime messages are used for the creation and destruction of resources, while resource manipulation messages update apply fields pay-loaded by the message to resource attributes.

All channel messages MUST be processed in the order in which they are received. All channel messages have the same header that contains the following fields:

messageSize: Size of the message.

controlCode: Value identifying the message type.

targetResource: Handle to a resource for which the message applies.

A protocol error notification must be sent to the server if any of the following criteria are met:

  • The target resource handle lookup fails.

  • The target resource type does not match the message resource type.

  • The message processing for the targeted resource generates a failure.