2.2.1.1 CONNECT

The CONNECT packet is used to request a connection. If accepted, the response is a CONNECTED (section 2.2.1.2) packet or a CONNECTED_SIGNED (section 2.2.1.3) packet, depending on whether packet signing is enabled.


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

bCommand

bExtOpCode

bMsgID

bRspId

dwCurrentProtocolVersion

dwSessID

tTimestamp

bCommand (1 byte): A command-code bitmask that contains values that are combined by using the bitwise OR operation from the following table. The PACKET_COMMAND_CFRAME flag MUST be set, and the PACKET_COMMAND_POLL flag SHOULD be set. All other bits MUST be set to zero, and the packet MUST be ignored if they are not.

Value

Meaning

0x80

PACKET_COMMAND_CFRAME (command frame (CFRAME))

0x08

PACKET_COMMAND_POLL (acknowledge immediately)

bExtOpCode (1 byte): Extended operation code. It MUST be set to the following value:

Value

Meaning

0x01

FRAME_EXOPCODE_CONNECT

bMsgID (1 byte): A message identifier used to correlate responses. The initial value SHOULD be set to zero and SHOULD be incremented each time the connect packet is retried. The recipient MUST echo the value in bRspId when responding.

bRspId (1 byte): Not used in connect packets. This MUST be set to zero when sent and ignored on receipt.

dwCurrentProtocolVersion (4 bytes): The version number of the sender's DirectPlay 8 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 be set to 0x0001; otherwise, the packet MUST be ignored. The minor version number SHOULD<1> be set to 0x0006 to indicate support for all features, including coalescence and signing.

The recipient SHOULD be prepared to support older message formats used by earlier minor versions but MUST ignore this packet if it does not. To ensure security, the packet MUST be ignored if the recipient is using signing but the minor version number is less than 0x0006.

The recipient SHOULD be prepared to receive minor version numbers higher than what it implements and supplies in its own CONNECTED or CONNECTED_SIGNED message, but both sides MUST only use message formats compatible with the lower of their two version numbers.

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.

0x00010006

Protocol version number 1.6 implements the base features, supports coalescence, and adds support for signing.

dwSessID (4 bytes): The session identifier used to correlate responses. The value is dependent upon the implementation and SHOULD be a random, nonpredictable number. This MUST NOT be set to zero unless dwCurrentProtocolVersion indicates a minor version less than 0x0005. This MUST remain the same value when retrying the CONNECT packet. The recipient MUST echo the value in dwSessID when responding.

tTimestamp (4 bytes): The requestor's computer system tick count, in millisecond units and specified in little-endian byte order.