2.2.11 TRANS_USERDATA_ADD_PLAYER

The TRANS_USERDATA_ADD_PLAYER packet instructs clients to add a specified client to the game session. This packet begins with a TRANS_USERDATA_HEADER.


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

dpnid

dpnidOwner

dwFlags

dwVersion

dwVersionNotUsed

dwDNETClientVersion

dwNameOffset

dwNameSize

dwDataOffset

dwDataSize

dwURLOffset

dwURLSize

url (variable)

...

data (variable)

...

name (variable)

...

dwPacketType (4 bytes): A 32-bit integer that indicates the packet type. This field MUST be set to 0x000000D0 to denote that this message instructs clients to add the specified client to the game session.

dpnid (4 bytes): A 32-bit integer that specifies the identifier of the client to add.

dpnidOwner (4 bytes): A 32-bit integer that specifies the identifier of the game session owner.

dwFlags (4 bytes): A 32-bit integer that contains the player flags. Entries are OR'd together.<7>

Value

Meaning

0x00000001

Player is the local player.

0x00000002

Player is the host.

0x00000100

Player is a client from a peer-to-peer game session.

0x00001000

Player is connecting.

0x00002000

Player is to make the member available for use.

0x00004000

Player to indicate disconnecting.

0x00010000

Player to indicate connection to an application.

0x00020000

Player to indicate that the application was given the created player.

0x00040000

Player to indicate that the game session owner needs to destroy a player.

0x00080000

Player to indicate that the player is in use.

dwVersion (4 bytes): A 32-bit integer that provides the current name table version number.

dwVersionNotUsed (4 bytes): This field MUST be set to 0 when sending and ignored on receipt.

dwDNETClientVersion (4 bytes): A 32-bit integer that provides the DirectPlay version of the client being added to the chat session. This field MUST be set to the appropriate DirectPlay version for the client.<8>

dwNameOffset (4 bytes): A 32-bit integer that provides the offset, in bytes, from the end of the dwPacketType field to the client name. If this field is 0, the packet does not include the client name.

dwNameSize (4 bytes): A 32-bit integer that provides the size, in bytes, of the name.

dwDataOffset (4 bytes): A 32-bit integer that provides the offset, in bytes, from the end of the dwPacketType field to the client data. If this field is 0, the packet does not include client data.

dwDataSize (4 bytes): A 32-bit integer that provides the size, in bytes, of the client data.

dwURLOffset (4 bytes): A 32-bit integer that provides the offset, in bytes, from the end of the dwPacketType field to the client URL. If this field is 0, the packet does not include the client URL.

dwURLSize (4 bytes): A 32-bit integer that provides the size, in bytes, of the connecting client's URL address.

url (variable): A variable length array of characters that contains the client URL, including the terminating null character. For more information about the structure of the URL, see DN_ADDRESSING_URL (section 2.2.34).

data (variable): A variable length array of characters that contains user data, including the terminating null character.

name (variable): A variable length array of Unicode characters that contains the client name, including the terminating null character.