2.2.3 DPLAYI_SUPERPACKEDPLAYER

The DPLAYI_SUPERPACKEDPLAYER structure is used to transmit player or group-related data.


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

Size

Flags

ID

PlayerInfoMask

VersionOrSystemPlayerID

ShortName (variable)

...

LongName (variable)

...

PlayerDataLength (variable)

...

PlayerData (variable)

...

ServiceProviderDataLength (variable)

...

ServiceProviderData (variable)

...

PlayerCount (variable)

...

PlayerIDs (variable)

...

ParentID (optional)

ShortcutIDCount (variable)

...

ShortcutIDs (variable)

...

Size (4 bytes): The size of the fixed player header, in bytes. This includes the Size field, as well as the Flags, ID, and PlayerInfoMask fields. MUST be 0x00000010 (16).

Flags (4 bytes): Player flags. Player Flags MUST be 0 or more of the following values.


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

S

P

N

S

P

G

P

L

X

SP (1 bit): The player is the system player.

NS (1 bit): The player is the name server (host). It MUST be combined with SP.

PG (1 bit): The player belongs to a group. This flag MUST be set for system players, for other players that have been added to a group using DPSP_MSG_ADDPLAYERTOGROUP (section 2.2.12), or for groups that have been added to a group using DPSP_MSG_ADDSHORTCUTTOGROUP (section 2.2.13).

PL (1 bit): The player is on the sending machine. This flag does not have meaning on other machines and MUST be ignored on receipt.

X (28 bits): All bits that have this label SHOULD be set to zero when sent and MUST be ignored on receipt.

ID (4 bytes): MUST contain the player ID of the player that is described in this structure.

PlayerInfoMask (4 bytes): A bit field that indicates which optional fields are present. The PlayerInfoMask field MUST be a bitmask that is composed of the following fields.


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

S

N

L

N

S

L

P

D

P

C

P

I

S

C

X

SN (1 bit): MUST be set if the ShortName field is present in the structure.

LN (1 bit): MUST be set if the LongName field is present in the structure.

SL (2 bits): MUST be set if the ServiceProviderDataLength field is present in the structure. SL MUST be set to one of the following values.

Value

Meaning

0x01

If the ServiceProviderDataLength field occupies 1 byte.

0x02

If the ServiceProviderDataLength field occupies 2 bytes.

0x03

If the ServiceProviderDataLength field occupies 4 bytes.

PD (2 bits): MUST be set if the PlayerDataLength field is present in the structure. PD MUST be set to one of the following values.

Value

Meaning

0x01

If the PlayerDataLength field occupies 1 byte.

0x02

If the PlayerDataLength field occupies 2 bytes.

0x03

If the PlayerDataLength field occupies 4 bytes.

PC (2 bits): MUST be set if the PlayerCount field is present in the structure. PC MUST be set to one of the following values.

Value

Meaning

0x01

If the PlayerCount field occupies 1 byte.

0x02

If the PlayerCount field occupies 2 bytes.

0x03

If the PlayerCount field occupies 4 bytes.

PI (1 bit): MUST be set if the ParentID field is present in the structure.

SC (2 bits): MUST be set if the ShortcutCount field is present in the structure. SC MUST be set to one of the following values.

Value

Meaning

0x01

If the ShortcutCount field occupies 1 byte.

0x02

If the ShortcutCount field occupies 2 bytes.

0x03

If the ShortcutCount field occupies 4 bytes.

X (21 bits): All bits with this label SHOULD be set to zero when sent and MUST be ignored on receipt.

VersionOrSystemPlayerID (4 bytes): If the DPLAYI_PLAYER_SYSPLAYER flag is set in the Flags field, this field MUST contain the protocol version for the machine hosting the protocol. If the DPLAYI_PLAYER_SYSPLAYER flag is not set, this field MUST contain the ID of the system player for this game. When the protocol version is used for a system player, it will be one of the following values.

Version/Value

Meaning

DX6VERSION

9

First version documented.

DX61VERSION

10

New Hosts send DPSP_MSG_IAMNAMESERVER as first message when they become the new host.

DX61AVERSION

11

No Change.

DX71VERSION

12

The version in which DirectPlay Voice was introduced. Does not affect any of the core logic.

DX8VERSION

13

Added DPSP_MSG_CREATEPLAYERVERIFY message.

DX9VERSION

14

No Change.

ShortName (variable): If the SN bit in the PlayerInfoMask field is set, the ShortName field MUST contain a null-terminated Unicode string that contains the short name of the player.

LongName (variable): If the LN bit in the PlayerInfoMask field is set, the LongName field MUST contain a null-terminated Unicode string that contains the long name of the player.

PlayerDataLength (variable): The PD bits in PlayerInfoMask indicate the size of this optional field. When present, this field MUST contain the size, in octets, of the PlayerData field.

PlayerData (variable): If PlayerDataSize is nonzero, this MUST be set to per-game player data.

ServiceProviderDataLength (variable): The SL bits in PlayerInfoMask indicate the size of this optional field. When present, this field MUST contain the size, in octets, of the ServiceProviderData field.<3>

ServiceProviderData (variable): If ServiceProviderDataSize is nonzero, this MUST be set to the data that is used by the DirectPlay Service Provider.

If provided, the Windows Winsock DirectPlay Service Provider stores the following data in the ServiceProviderData field.


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

Stream Socket Address (16 bytes)

...

...

Datagram Socket Address (16 bytes)

...

...

Stream Socket Address (16 bytes): A SOCKADDR_IN structure that contains the addressing information to be used when contacting this player over TCP. If the PL flag is set in the Flags field, the Address field of this SOCKADDR_IN must be set to 0.0.0.0.

Datagram Socket Address (16 bytes): A SOCKADDR_IN structure that contains the addressing information to be used when contacting this player over UDP. If the PL flag is set in the Flags field, the Address field of this SOCKADDR_IN must be set to 0.0.0.0.

PlayerCount (variable): The PC bits in PlayerInfoMask indicate the size of this optional field. When present, this field MUST contain the number of entries in the PlayerIDs field.

PlayerIDs (variable): If the PlayerCount field is present and nonzero, this MUST be set to a list of player IDs that are contained in the group. The length of this field is equivalent to the value of the PlayerCount field multiplied by four.

ParentID (4 bytes): If the PI field is set in the PlayerInfoMask, this field MUST be set to the ID of the parent for this group.

ShortcutIDCount (variable): The SC bits in PlayerInfoMask indicate the size of this optional field. When present, this field MUST contain the number of shortcut IDs in the ShortcutIDs field.

ShortcutIDs (variable): If the ShortcutIDCount field is nonzero, this MUST be set to a list of shortcut IDs. The length of this field is equivalent to the value of ShortcutIDCount multiplied by four.