2.2.1.1 DN_INTERNAL_MESSAGE_PLAYER_CONNECT_INFO

This is the first message passed into a host/server to initiate the connect sequence.

Note DN_INTERNAL_MESSAGE_PLAYER_CONNECT_INFO_EX is an extended version of this packet for DirectPlay 9. If the value of the dwDNETVersion field is 7 or greater, the message is DN_INTERNAL_MESSAGE_PLAYER_CONNECT_INFO_EX; otherwise, if it is less than 7, the message is DN_INTERNAL_MESSAGE_PLAYER_CONNECT_INFO. The host/server has to recognize both messages, as clients/peers can send in either type of message depending on the client/peer version.


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

dwPacketType

dwFlags

dwDNETVersion

dwNameOffset

dwNameSize

dwDataOffset

dwDataSize

dwPasswordOffset

dwPasswordSize

dwConnectDataOffset

dwConnectDataSize

dwURLOffset

dwURLSize

guidInstance (16 bytes)

...

...

guidApplication (16 bytes)

...

...

url (variable)

...

connectData (variable)

...

Password (variable)

...

data (variable)

...

name (variable)

...

dwPacketType (4 bytes): A 32-bit field that contains the packet type.

Value

Meaning

DN_MSG_INTERNAL_PLAYER_CONNECT_INFO

0x000000C1

Sends client/peer connection information to the server/host.

dwFlags (4 bytes): A 32-bit field that specifies the connect flags.

Value

Meaning

DP_OBECT_TYPE_CLIENT

0x00000002

Connecting application is a client.

DN_OBJECT_TYPE_PEER

0x00000004

Connecting application is a peer.

dwDNETVersion (4 bytes): A 32-bit field that specifies the DirectPlay version.

Value

Meaning

0x00000001

DirectX 8.0

0x00000002

DirectX 8.1

0x00000003

PocketPC

0x00000004

Not used

0x00000005

Windows Server 2003 operating system

0x00000006

DirectX 8.2

dwNameOffset (4 bytes): A 32-bit field that provides the offset from the end of dwPacketType of the connecting application's name field. If dwNameOffset is 0, the packet does not include name data.

dwNameSize (4 bytes): A 32-bit field that specifies the size, in bytes, of the data in the name field. If dwNameOffset is set to 0, dwNameSize SHOULD also be 0. If dwNameOffset is not 0, dwNameSize SHOULD also not be 0.

dwDataOffset (4 bytes): A 32-bit field that specifies the offset from the end of dwPacketType of the data field. If dwNameOffset is 0, the packet does not include application data.

dwDataSize (4 bytes): A 32-bit field that specifies the size, in bytes, of the data field. If dwDataOffset is set to 0, dwDataSize SHOULD also be 0. If dwDataOffset is not 0, dwDataSize SHOULD also not be 0.

dwPasswordOffset (4 bytes): A 32-bit field that specifies the offset from the end of dwPacketType of the Password field.

dwPasswordSize (4 bytes): A 32-bit field that specifies the size, in bytes, of the Password field. If dwPasswordOffset is set to 0, dwPasswordSize SHOULD also be 0. If dwPasswordOffset is not 0, dwPasswordSize SHOULD also not be 0.

dwConnectDataOffset (4 bytes): A 32-bit field that specifies the offset from the end of dwPacketType of the connectData field. If dwConnectDataOffset is 0, the packet does not include connection data.

dwConnectDataSize (4 bytes): A 32-bit field that specifies the size, in bytes, of the connectData field. If dwConnectDataOffset is 0, dwConnectDataSize SHOULD also be 0. If dwConnectDataOffset is not 0, dwConnectDataSize SHOULD also not be 0.

dwURLOffset (4 bytes): A 32-bit field that specifies the offset from the end of dwPacketType to the url field. If dwURLOffset is 0, the packet does not include the client URL. This URL represents the address of the client/peer that is connecting to the game session.

dwURLSize (4 bytes): A 32-bit field that specifies the size, in bytes, of the url field. If dwURLOffset is 0, dwURLSize SHOULD also be 0. If dwURLOffset is not 0, dwURLSize SHOULD also not be 0.

guidInstance (16 bytes): A 128-bit field that contains the GUID that identifies the particular instance of the server/host application to which the client/peer is attempting to connect. Each instance of a DirectPlay server/host application generates a new unique GUID each time the application hosts a new game session. In order for the client/peer to connect, the value of guidInstance MUST match the value of the GUID instance defined on the server/host or the value MUST be all zeroes. If a different, nonzero GUID instance value is specified, the recipient MUST send a DN_CONNECT_FAILED message with the result code DPNERR_INVALIDINSTANCE (0x80158380) and terminate the [MC-DPL8R] connection. For information on how a client/peer retrieves the value of the GUID instance defined on the server/host, see the description of the ApplicationInstanceGUID field in the EnumResponse message defined in [MC-DPLHP] section 2.2.2.

guidApplication (16 bytes): A 128-bit field that specifies the application's assigned GUID. This is the unique identifier for the specific application, not per instance.

url (variable): A variable-length field that contains a 0-terminated byte character array that specifies the client URL. This field's position is determined by dwURLOffset and the size stated in dwURLSize. It is defined in DN_ADDRESSING_URL.

connectData (variable): A variable-length field that contains a byte array that provides the connection data. This field's position is determined by dwConnectDataOffset and the size stated in dwConnectDataSize.

Password (variable): A variable-length field that contains a 0-terminated wide character array that specifies the application password data. This field's position is determined by dwPasswordOffset and the size stated in dwPasswordSize. This data is passed in clear text to the protocol layer.

data (variable): A variable-length field that contains a byte array that specifies the application data. This field's position is determined by dwDataOffset and the size stated in dwDataSize.

name (variable): A variable-length field that contains a 0-terminated wide character array that specifies the client/peer name. This field's position is determined by dwNameOffset and the size stated in dwNameSize.