2.2.4 EnumQuery

The EnumQuery packet is used to enumerate hosting servers [MC-DPLHP]. The server replies with an EnumResponse to the client, where one EnumResponse message is sent for each game session that is running on the server. As a result, the client can receive multiple EnumResponse messages if more than one game session is running. The manner in which multiple available game sessions are handled, such as presenting a list to the user for selection, is left to the implementation.

Note When a serial or modem link is used, the _MESSAGE_HEADER (section 2.2.2) header replaces the first 32 bits of the EnumQuery payload (the LeadByte, CommandByte, and EnumPayload 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

LeadByte

CommandByte

EnumPayload

QueryType

ApplicationGUID (16 bytes, optional)

...

...

...

ApplicationPayload (variable)

...

LeadByte (1 byte): This field is 8 bits in length. It MUST be 0x00.

Note The first byte MUST be 0 for the message to be a valid EnumQuery message. When a message is received and the first byte is nonzero, the entire message MUST be passed through for processing as described in [MC-DPL8R].

CommandByte (1 byte): This field is 8 bits in length. It MUST be 0x02.

EnumPayload (2 bytes): This field is 16 bits in length. The EnumPayload is a value selected by the sender of the EnumQuery message that MUST be echoed in the EnumResponse message. It SHOULD be used to match EnumResponse messages to their corresponding EnumQuery.

QueryType (1 byte): This field is 8 bits in length. The value MUST be set to one of the following.

Value

Meaning

0x01

Indicates that this query contains an ApplicationGUID field. Only DirectPlay 8 server applications that are identified by the ApplicationGUID SHOULD respond to this EnumQuery. For more information about the GUID type, see [MS-DTYP] section 2.3.4.

Applications SHOULD NOT respond to any EnumQuery messages where the QueryType field is 0x01 and the ApplicationGUID field does not match the server application GUID.

Note For the DirectPlay DXDiag Usage Protocol, the value of QueryType SHOULD be set to "0x01".

0x02

Indicates that this EnumQuery message contains no ApplicationGUID field. All DirectPlay 8 server applications that receive this EnumQuery SHOULD respond to it.

ApplicationGUID (16 bytes): The Application GUID. This field MUST be set to 61EF80DA-691B-4247-9ADD-1C7BED2BC13E, which is the GUID for the DXDiag application.

ApplicationPayload (variable): The DirectPlay DXDiag Usage Protocol will never issue an application payload.