2.2.7 TRANS_COMMAND_CONNECT
The TRANS_COMMAND_CONNECT packet is used to request a connection. The response is a TRANS_COMMAND CONNECT_ACCEPT packet.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
bCommand |
bExtOpCode |
bMsgID |
bRspId |
||||||||||||||||||||||||||||
|
dwCurrentProtocolVersion |
|||||||||||||||||||||||||||||||
|
dwSessID |
|||||||||||||||||||||||||||||||
|
tTimestamp |
|||||||||||||||||||||||||||||||
bCommand (1 byte): An 8-bit integer that provides the command code for the message. This field MUST be set to one of the following values.
-
Value
Meaning
0x80
Indicates that this message utilizes a command frame (CFRAME).
0x88
Indicates that this message utilizes a CFRAME (0x80) and POLL (0x08) values, which specify that the sender requests immediate acknowledgment (ACK) from the receiver upon receipt of the message.
-
If any other value is specified for the bCommand field, the packet MUST be ignored.
bExtOpCode (1 byte): An 8-bit integer that provides the extended operation code for the message. This field MUST be set to 0x01 to denote that this message requests a connection.
bMsgID (1 byte): An 8-bit integer message identifier used to correlate the responses. The initial value SHOULD be 0 and SHOULD be incremented each time the connect packet is retried. The recipient MUST echo the value in the bRspId field when responding with a TRANS_COMMAND_CONNECT_ACCEPT message.
bRspId (1 byte): An 8-bit integer that MUST be set to 0 when sending and MUST be ignored on receipt.
dwCurrentProtocolVersion (4 bytes): The version number of the requestor's DirectPlay protocol, in little-endian byte order, where the upper 16 bits are considered a major version number and the lower 16 bits are considered a minor version number. The major version number MUST NOT be set to any value other than 0x0001. The minor version number SHOULD<5> be set to 0x0000 to indicate support for the base features, but MAY be set to a value between 0x00010000 and 0x00010004, inclusive.
The recipient SHOULD be prepared to support older message formats used by earlier minor versions. The recipient MUST ignore this packet if it does not support older message formats.
The recipient SHOULD be prepared to receive minor version numbers higher than what it implements and supplies in its own TRANS_COMMAND_CONNECT or TRANS_COMMAND CONNECT_ACCEPT message, but both sides MUST only use message formats compatible with the lower of their two version numbers.
Note While a receiver can indicate support for coalescence (version level of 0x00010005 or higher) and a sender can choose to use this feature when it is available by the receiver, the DirectPlay DXDiag Usage Protocol utilizes the coalescence feature on any TRANS_USERDATA messages except TRANS_USERDATA_SEND_MESSAGE (section 2.2.31). In addition, the signing feature (version level 0x00010006) will not be utilized by the DirectPlay DXDiag Usage Protocol even when the receiver indicates support for the signing feature.
-
Value
Meaning
0x00010000 — 0x00010004
Any protocol version number between 1.0 and 1.4 implements the base features.
0x00010005
Protocol version number 1.5 implements the base features, and adds support for coalescence.
Note The coalescence feature is not used by the base implementation of the DirectPlay DXDiag Usage Protocol.
0x00010006
Protocol version number 1.6 implements the base features, supports coalescence, and adds support for signing.
Note The signing feature is not used by the base implementation of the DirectPlay DXDiag Usage Protocol.
dwSessID (4 bytes): A 32-bit integer session identifier that is used to correlate the responses. The value is dependent upon the implementation and SHOULD be a random number that is not predictable. The value of dwSessID MUST NOT be 0 unless dwCurrentProtocolVersion indicates a minor version less than 0x0005; otherwise, the packet MUST be ignored. The value for dwSessID MUST remain the same when retrying the TRANS_COMMAND_CONNECT packet. The recipient MUST echo the value in dwSessID when responding; otherwise, the packet MUST be ignored.
tTimestamp (4 bytes): A 32-bit integer that provides the sender's computer system tick count. The value of the tTimestamp field SHOULD be ignored, but MAY be used to estimate the differences in local tick counts between a sender and receiver.