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:

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:

Server Port:

Flags:

Software:

Version:

Platform:

Server Description:

Server Location:

Server URL:

Contact Name:

Contact Email:

Active Users:

Active Channels:

Active Games:

Uptime:

Total Games:

Total Logins:

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.

| Edited: Caaaaarrrrlll

Comments

Caaaaarrrrlll

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.