3.1.5 Message Processing Events and Sequencing Rules

MSDTC Connection Manager: OleTx Multiplexing Protocol (CMP) messages are received from the underlying transports protocol as specified in [MS-CMPO] section 3.3.4.4. The buffers that are provided by the transports protocol MUST be formatted Boxcars as specified in section 2.1.1.

The relative position of each message in the boxcar MUST be used to order the messages; messages that occur at a smaller offset from the boxcar header in the Boxcar MUST be considered to come before messages that occur later in the boxcar. Boxcars MUST be ordered by the time of their receipt by a CMP implementation; all of the messages in a boxcar that is received earlier than another boxcar are considered to come before all of the messages in the later boxcar. The dwConnectionId field of the message MUST be used to logically group messages; messages MUST be in the same group if their dwConnectionId fields are equal. (The messages MAY be physically ordered by their dwConnectionId fields in the Boxcar.)

A CMP implementation MUST NOT process a message until it has processed all messages in the same group that come before it. (Message order MUST be preserved within a CMP connection.) A CMP implementation MAY process messages in any order that does not violate the preceding restriction.

All CMP messages are extensions of the MESSAGE_PACKET structure as specified in section 2.2.2. A CMP message is identified by looking at the value of the MsgTag field; the interpretation of the message depends on the value of that field. If the value of the MsgTag field is outside of the expected range (as specified in section 2.2.2), then all remaining unprocessed messages in the Boxcar MUST be ignored, regardless of which connection they are intended for.