Master Server Query Protocol: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (fixed header levels)
Line 1: Line 1:
Send the following UDP query to a master server to get a list of Source host servers.
Send the following UDP query to a master server to get a list of Source host servers.


=Format=
==Format==
{|
{|
! Type || Field || Value
! Type || Field || Value
Line 14: Line 14:
|}
|}


 
===Region Codes===
==Region Codes==
The region of the world that you wish to find servers in.
The region of the world that you wish to find servers in.
{|
{|
Line 40: Line 39:
<!--What's for none? = world-->
<!--What's for none? = world-->


 
===IP:Port===
==IP:Port==
Steam sends "0.0.0.0:0".
Steam sends "0.0.0.0:0".


Line 47: Line 45:


Changing it doesn't appear to affect the results in anyway.
Changing it doesn't appear to affect the results in anyway.
(Should be the first ip address we are interested in)


==Filter==
(Should be the first IP address we are interested in.)
 
===Filter===
Allows you to restrict the results to servers running a certain game, map, etc.
Allows you to restrict the results to servers running a certain game, map, etc.


Line 72: Line 71:
::Servers that are spectator proxies
::Servers that are spectator proxies


 
==Master Servers==
=Master Servers=
Current master servers are <code>69.28.151.178:27011</code>, <code>207.173.177.11:27011</code>, <code>69.28.151.162:27011</code>.
Current master servers are <code>69.28.151.178:27011</code>, <code>207.173.177.11:27011</code>, <code>69.28.151.162:27011</code>.


If you can, get your application to check the file <code>Steam\config\masterservers.vdf</code> to get the latest list of master servers.
If you can, get your application to check the file <code>Steam\config\masterservers.vdf</code> to get the latest list of master servers.


 
==Reply Format==
=Reply Format=
The reply always starts with <code>FF FF FF FF 66 0A</code>.
The reply always starts with <code>FF FF FF FF 66 0A</code>.


Line 99: Line 96:
Some of the servers may be unreachable, so query each server directly to find out. Note also that this list is not exhaustive, so if you're looking for a particular type of server make sure that you specify a filter with the query, rather than filtering client side.
Some of the servers may be unreachable, so query each server directly to find out. Note also that this list is not exhaustive, so if you're looking for a particular type of server make sure that you specify a filter with the query, rather than filtering client side.


 
==See Also==
=See Also=
* [[Source Server Queries]]
* [[Source Server Queries]]
[[Category:Programming]][[Category:Technical]]
[[Category:Programming]][[Category:Technical]]

Revision as of 14:21, 27 October 2005

Send the following UDP query to a master server to get a list of Source host servers.

Format

Type Field Value
Byte Message Type 0x31 - the character "1"
Byte Region Code See below
String Zero IP:Port 0.0.0.0:0
String Zero Filter See below

Region Codes

The region of the world that you wish to find servers in.

Byte Description
0x00 US East coast
0x01 US West coast
0x02 South America
0x03 Europe
0x04 Asia
0x05 Australia
0x06 Middle East
0x07 Africa
0xFF Rest of the world

IP:Port

Steam sends "0.0.0.0:0".

Does anyone know what this is supposed to be the address of?

Changing it doesn't appear to affect the results in anyway.

(Should be the first IP address we are interested in.)

Filter

Allows you to restrict the results to servers running a certain game, map, etc.

Send an empty string (0x00) to recieve a list of all types of servers.

Insert \ in between filter parameters

  • \type\d
Servers running dedicated
  • \secure\1
Servers using anti-cheat technology (VAC)
  • \gamedir\[mod]
Servers running the specified modification (ex. cstrike)
  • \map\[map]
Servers running the specified map (ex. cs_italy)
  • \linux\1
Servers running on a Linux platform
  • \empty\1
Servers that are not empty
  • \full\1
Servers that are not full
  • \proxy\1
Servers that are spectator proxies

Master Servers

Current master servers are 69.28.151.178:27011, 207.173.177.11:27011, 69.28.151.162:27011.

If you can, get your application to check the file Steam\config\masterservers.vdf to get the latest list of master servers.

Reply Format

The reply always starts with FF FF FF FF 66 0A.

The format is then a series of these server address blocks:

Type Data
Byte First octet of IP address
Byte Second octet of IP address
Byte Third octect of IP address
Byte Fourth octet of IP address
Short Port number - usually 27015 (0x69 0x67)

Some of the servers may be unreachable, so query each server directly to find out. Note also that this list is not exhaustive, so if you're looking for a particular type of server make sure that you specify a filter with the query, rather than filtering client side.

See Also