We will be releasing an update later this week or early next week with
an updated query protocol. To enable this change to be deployed quickly
we will be minimising the changes this time around.

I will be writing a more detailed document describing the various valid
Source server queries as a part of the SDK documentation, but in the
mean time here is a brief description of the changes that will be made.

A challenge value will now required for all query responses (A2S_INFO,
A2S_PLAYER, A2S_RULES) except for A2S_PING. The challenge value is a 4
byte value. You can either explicitly request a challenge value via a
new query A2S_SERVERQUERY_GETCHALLENGE (ascii "W") or implicitly get a
challenge value by sending a dummy challenge value of "-1" (0xFFFFFFFF)
to any query (that requires a challenge). The response to
A2S_SERVERQUERY_GETCHALLENGE (and an implicit challenge) will be
S2C_CHALLENGE (ascii 'A' ) followed by a 4 byte value that is the
challenge value. The challenge value should be appended to the end of
the existing query request packets.

Queries that use strings to specify the query type (i.e.
0xFFFFFFFF"players") will NO LONGER be supported. You MUST update to the
new A2S_* style queries. The byte values for each request type is:
#define A2S_INFO                                                'T' //
server info request - this must match the Goldsrc engine
#define A2S_PLAYER                                      'U'     //
request player list
#define A2S_RULES                                               'V'
// request rules list from server
#define A2S_SERVERQUERY_GETCHALLENGE            'W'     // Request
challenge # from another machine

These values are supported by the currently shipped Source engine if you
want to start on your changes now.


A challenge value is valid for 60 minutes or until the server flushes
your challenge from its LRU cache (which can handle 16K elements), so
you should attempt to cache a challenge value rather than continually
requesting it.

A challenge value is not required when querying servers within the same
B class address range as the server (i.e LAN style requests), you should
specify a challenge value of "-1" (0xFFFFFFFF) in these cases. Note that
you can still use a valid challenge value in these cases, its value will
be ignored however.

The initial rollout will support both old and new style queries (i.e
with and without challenges). We expect to disable the old protocol
within a couple WEEKS of the initial rollout. The cvar
"sv_enableoldqueries" will control the servers ability to answer old
style requests (when it is set to "1" it will reply to old style
queries).

To aid in development and testing you can disable ignoring challenges
from local B class clients by setting the cvar sv_allowlocalquery to 0
(i.e if sv_allowlocalquery is "0" then any query will follow the rules
set by the "sv_enableoldqueries" cvar).


This change will also be applied to HL1 based game servers once the
Source rollout is complete.

- Alfred


 On Mon, 21 Feb 2005, Alfred Reynolds wrote:

> We will be revising the Source server query format in the near future
> to remove some architectural problems with it. All the existing
> queries apart from PING will be altered by this change (i.e will
> require your tools to be updated). There will be a period where both
> systems coincide but we want to be aggressive in removing support for
the old protocol.
> This change may be ported to the HL1 engine also.
>
> We have been assessing various protocols (both from other vendors and
> from the public), this is your chance to request features or suggest
> other standards to consider. The current plan is to make the minimal
> set of changes to remove the problems we found (making it easier for
> tools to update) but as we are breaking the protocol we are open to
> larger changes.
>
> You can make feature requests or suggestions to this list (hlds_apps)
> or to me directly.

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to