PvPGN Tracking Protocol
This document covers how to successfully use the PvPGN tracker system with a custom unofficial Battle.net v1 server.
PvPGN is a custom C++ Battle.net v1 server that's widely used. Its tracker system is pretty trivial. The tracking system uses UDP on port 6114. To advertise a server on the tracking website, all an individual needs to do is send a UDP datagram packet to port 6114 at any of the tracking hosts.
PvPGN officially suggests submitting to the following trackers:
tracker.pvpgn.org
track.muleslow.net
Structure
The structure of the datagram packet to send is as follows:
(UINT16) Packet Version
(UINT16) Server Port
(UINT32) Flags
(UINT8) [32] Software
(UINT8) [16] Version
(UINT8) [32] Platform
(UINT8) [64] Server Description
(UINT8) [64] Server Location
(UINT8) [96] Server URL
(UINT8) [64] Contact Name
(UINT8) [64] Contact Email
(UINT32) Active Users
(UINT32) Active Channels
(UINT32) Active Games
(UINT32) Uptime
(UINT32) Total Games
(UINT32) Total Logins
Note: All integer values should be in network byte order (big-endian).
All fields marked UINT8
are strings padded with nulls on the end (they behave as character arrays). They are not null-terminated strings but could be read as such. This rule means that the total datagram length is 464 bytes regardless of its content.
Encoding
The character arrays/strings in the datagram are not encoded and are interpreted as ANSI (not UTF-8). Unicode characters may be sent but may not appear correctly when printed on the tracker site.
Fields
Packet Version:
- This document covers version
0x0002
. No other versions have been seen.
Server Port:
- The port that your Battle.net server is listening on (should be 6112).
Flags:
- Currently the flags field is ignored, however officially these flags are recognized:
0x00000001: TF_SHUTDOWN 0x00000002: TF_PRIVATE
TF_SHUTDOWN
should be sent when the server is shutting down.TF_PRIVATE
should be sent if the server is private and should not be listed.
Software:
- The name of your server software, such as
PvPGN
.
Version:
- The version of your server, such as
1.8.5
.
Platform:
- The platform that your server is running from, such as
Windows
orLinux
.
Server Description:
- A short description of your server.
-
In addition, you can suffix what products/games your server supports using this field. To do so, add a space and use string concatenation to combine any of the following:
General Flags Tag Chat CHAT All Blizzard Games ALL Open Battle.net (D2DV/D2XP) OPE Closed Battle.net (D2DV) CLO Full Ladder LDR
Games Tag Warcraft II BNE WC2, W2 Warcraft III Reign of Chaos WC3, W3 Warcraft III The Frozen Throne WCX Diablo D1 Diablo Shareware DHR Diablo II D2 Diablo II Lord of Destruction LOD Starcraft SC Starcraft Broodwar SBW Starcraft Shareware SSHR, SHR Starcraft Spawn SPW As an example, a description with the above tags could look like the following:
Warcraft only!! W2W3WCX
Server Location:
- The location of your server geographically, such as
United States
. - A country flag will be given based on the geographical location of your server's IP address.
- You can also override the automatic country flag with one of your choosing. To do this, prefix a colon followed by the 2-letter country code and a space. For example,
:US United States
would show the U.S. country flag along with the locationUnited States
.
Server URL:
- The website you wish to advertise with your server.
- A bug used to exist where prefixing
https://
to this would cause the tracker to printhttp://https://
for this field. The bug has since been patched.
Contact Name:
- The username of the individual running the server.
Contact Email:
- The email address for the individual running the server.
Active Users:
- The number of users currently logged in.
Active Channels:
- The number of channels with an active user count (non-empty channels).
Active Games:
- The number of games currently in progress or being advertised.
Uptime:
- Your server's uptime in seconds. A value of
300
is equivalent to 5 minutes of uptime.
Total Games:
- The total number of games that your server has advertised to users since it's been up.
Total Logins:
- The total number of logins that your server has processed since it's been up.
What's Next
This protocol was invented over a decade ago in 2006, and has been lightly maintained with minor patches to the site, but the underlying datagram has remained the same.
There is an ongoing project to address some issues of the current version of this protocol. The pvpgn-tracker project maintained by BNETDocs and backed by PvPGN developers is set to replace the tracking sites that are in use today. Though this project is not production stable yet, it is the plan for the next version of the tracking protocol and its website.
A live version of the project can be found at pvpgn-tracker.bnetdocs.org and will accept solicitations from current PvPGN software. Be forewarned that it is in flux and subject to change at anytime. Check back to see when it becomes stable and ready for everyone.
Comments
Currently this document details version 2 of this protocol. I would like to have an improvement in the next iteration of this protocol, so that general flags and supported games/products that are currently part of the server's description, become its own UINT32 field instead.
Each bit in the field could represent one of the products/games that PvPGN (or other custom servers) support. It would also alleviate the need for an "ALL" flag, since that would be re-invented to be just flipping all bits to 1.
Below is a mock of what I'd interpret the UINT32 bitmask to look like, were it to be implemented how I vision it.
- 0x00000001 Diablo (DRTL)
- 0x00000002 Diablo Shareware (DSHR)
- 0x00000004 Diablo II (D2DV)
- 0x00000008 Diablo II LoD (D2XP)
- 0x00000010 Starcraft (STAR)
- 0x00000020 Starcraft Broodwar (SEXP)
- 0x00000040 Starcraft Japan (JSTR)
- 0x00000080 Starcraft Shareware (SSHR)
- 0x00000100 Warcraft II (W2BN)
- 0x00000200 Warcraft III Demo (W3DM)
- 0x00000400 Warcraft III RoC (WAR3)
- 0x00000800 Warcraft III TFT (W3XP)
- 0x00001000 Chat Gateway (CHAT)
- 0x00002000 Full Ladder
- 0x00004000 Open Realm (D2DV/D2XP)
- 0x00008000 Closed Realm (D2DV/D2XP)
- 0x0000FFFF All (everything's supported)
Also note that this current set of bits fits nicely into a UINT16, but a 16-bit unsigned integer would not allow for future flags to be added in the same version of this packet, therefore a 32-bit unsigned integer may prove beneficial in the next iteration.