2.2.2 MESSAGE_PACKET

The MESSAGE_PACKET structure forms the basis for all messages. Each message sent using this protocol MUST be an extension of the MESSAGE_PACKET structure. All integer fields of this structure are in little-endian byte order.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

MsgTag

fIsMaster

dwConnectionId

dwUserMsgType

dwcbVarLenData

dwReserved1

MsgTag (4 bytes):  A 4-byte integer value that describes the message type and its interpretation. This value MUST be one of the following values.

Value

Meaning

MTAG_DISCONNECT

0x00000001

Indicates a request to disconnect the specified connection.

MTAG_DISCONNECTED

0x00000002

Indicates that the specified connection has been disconnected.

MTAG_CONNECTION_REQ_DENIED

0x00000003

Indicates that the connection request for the specified connection has been denied.

MTAG_PING

0x00000004

A successful MTAG_PING indicates that the session is active.

MTAG_CONNECTION_REQ

0x00000005

Indicates that a new connection is being requested.

MTAG_USER_MESSAGE

0x00000FFF

Indicates that a user (level-three protocol) message will be delivered on the specified connection.

If the value is not one of the preceding values, then the remainder of the Boxcar MUST be discarded. The details of each message type are given in the following sections.

fIsMaster (4 bytes):  A 4-byte value indicating the direction of the message in the conversation. This value MUST be one of the following values.

Value

Meaning

0x00000000

Message is sent by the party that accepted the connection.

0x00000001

Message is sent by the party that initiated the connection, or message is not associated with a connection because either the connection is down or the connection request has been denied.

dwConnectionId (4 bytes):  A 4-byte integer value that contains the unique identifier for the associated connection. The value of the identifier depends on the value of the MsgTag field, as follows.

MsgTag field value

dwConnectionId field

MTAG_DISCONNECT

0x00000001

MUST contain the ID of the connection being disconnected.

MTAG_DISCONNECTED

0x00000002

MUST contain the ID of the connection that was just disconnected.

MTAG_CONNECTION_REQ_DENIED

0x00000003

MUST contain the ID of the connection that was rejected.

MTAG_PING

0x00000004

MUST be set to 0x00000000

MTAG_CONNECTION_REQ

0x00000005

MUST contain the ID of the connection being requested.

MTAG_USER_MESSAGE

0x00000FFF

MUST contain the ID of the connection that the message relates to.

dwUserMsgType (4 bytes):  A 4-byte integer value that contains additional details about the message, depending on the value of the MsgTag field, as follows.

MsgTag field value

dwUserMsgType field

MTAG_DISCONNECT

0x00000001

MUST contain the connection type of the connection being disconnected.

MTAG_DISCONNECTED

0x00000002

MUST be set to 0x00000000.

MTAG_CONNECTION_REQ_DENIED

0x00000003

MUST be set to 0x00000000.

MTAG_PING

0x00000004

MUST be set to 0x00000000.

MTAG_CONNECTION_REQ

0x00000005

MUST contain the connection type of the connection being requested.

MTAG_USER_MESSAGE

0x00000FFF

MUST contain the type of user message to be delivered.

dwcbVarLenData (4 bytes): Unsigned 4-byte integer value that contains the size, in bytes, of the variable-length data buffer. This value MUST NOT be greater than 81880. This number is the maximum size of a Boxcar, as specified in section 2.1.1.2, minus the size of a BOX_CAR_HEADER (section 2.2.1) and the MESSAGE_PACKET (section 2.2.2) itself, which is logically the largest single message that is possible to be transmitted in this protocol.

dwReserved1 (4 bytes): Reserved. This value can be set to any value, and MUST be ignored on receipt.<1>