2.2.1.7 DN_ADD_PLAYER (Peer-to-Peer Mode Only)
The DN_ADD_PLAYER packet is sent from the host and instructs peers to add a specified peer to the game session.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 field that contains the packet type.
-
Value
Meaning
DN_MSG_INTERNAL_ADD_PLAYER
0x000000D0
Instructs peers to add the specified peer to the game session.
dpnid (4 bytes): A 32-bit field that contains the identifier of the peer to add. For more information, see section 2.2.7.
dpnidOwner (4 bytes): A 32-bit field that contains the identifier of the game session owner. For more information, see section 2.2.7.
dwFlags (4 bytes): A 32-bit field that contains player flags.
-
Value
Meaning
NAMETABLE_ENTRY_FLAG_LOCAL
0x00000001
name table entry is the local player.
NAMETABLE_ENTRY_FLAG_HOST
0x00000002
Name table entry is the host.
NAMETABLE_ENTRY_FLAG_ALL_PLAYERS_GROUP
0x00000004
Name table entry is the All Players Group.
NAMETABLE_ENTRY_FLAG_GROUP
0x00000010
Name table entry is a group.
NAMETABLE_ENTRY_FLAG_GROUP_AUTODESTRUCT
0x00000040
Name table entry supports group autodestruct.
NAMETABLE_ENTRY_FLAG_PEER
0x00000100
Name table entry is a peer.
NAMETABLE_ENTRY_FLAG_CLIENT
0x00000200
Name table entry is a client.
NAMETABLE_ENTRY_FLAG_SERVER
0x00000400
Name table entry is a server.
NAMETABLE_ENTRY_FLAG_CONNECTING
0x00001000
Name table entry is connecting.
NAMETABLE_ENTRY_FLAG_AVAILABLE
0x00002000
Name table entry is to make member available for use.
NAMETABLE_ENTRY_FLAG_DISCONNECTING
0x00004000
Name table entry to indicate disconnecting.
NAMETABLE_ENTRY_FLAG_INDICATED
0x00010000
Name table entry to indicate connection to an application.
NAMETABLE_ENTRY_FLAG_CREATED
0x00020000
Name table entry to indicate that the application was given the created player.
NAMETABLE_ENTRY_FLAG_NEED_TO_DESTROY
0x00040000
Name table entry to indicate that the game session owner needs to destroy a player.
NAMETABLE_ENTRY_FLAG_IN_USE
0x00080000
Name table entry to indicate that the player is in use.
dwVersion (4 bytes): A 32-bit field that specifies the current name table version number.
dwVersionNotUsed (4 bytes): Not used.
dwDNETClientVersion (4 bytes): A 32-bit field that contains the DirectPlay version of the client being added to the game session.
-
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
0x00000007
DirectX 9.0
0x00000008
DirectX 9.0
dwNameOffset (4 bytes): A 32-bit field that contains the offset from the end of dwPacketType to the peer name. If this field is 0, the packet does not include the peer name.
dwNameSize (4 bytes): A 32-bit field that specifies the size, in bytes, of the name. If dwNameOffset is 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 contains the offset from the end of dwPacketType to peer data. If this field is 0, the packet does not include peer data.
dwDataSize (4 bytes): A 32-bit field that specifies the size, in bytes, of the peer data. If dwDataOffset is 0, dwDataSize SHOULD also be 0. If dwDataOffset is not 0, dwDataSize SHOULD also not be 0.
dwURLOffset (4 bytes): A 32-bit field that contains the offset from the end of dwPacketType to the peer URL.
dwURLSize (4 bytes): A 32-bit field that specifies the size, in bytes, of the connecting peer's URL address.
url (variable): A variable-length field that contains an array of characters that specify the client URL.
data (variable): A variable-length field that specifies a byte array of characters that contain user data.
name (variable): A variable-length field that specifies an array of wide characters that contain the peer name including the NULL termination character.