Difference between revisions of "Directory Game Server Protocol"
(content from cypher's page) |
(major overhaul (someone want to add the bit about subgame using the ping packets every 4min or something? i forgot the specifics)) |
||
Line 1: | Line 1: | ||
− | + | == Introduction == | |
+ | [[Zone|Game Server's]] such as [[subgame2]] and [[ASSS]] register their prescence on [[Directory server|Directory Servers]]. This page describes the portion of the '''directory server protocol''' that game servers use. | ||
− | + | This system relies on the UDP protocol, port 4991. Max length of the packet is only limited to the directory server software itself (so it varies from each application). However, the specific lengths of fields are pretty much final, the zone description should be the only length that varies. | |
− | + | == Protocol == | |
− | + | <pre> | |
− | + | g2d | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | register game server | |
+ | offset size comment | ||
+ | 0 4 ip (leave this set to 0?) | ||
+ | 4 2 port | ||
+ | 6 2 player count | ||
+ | 8 2 saving scores? (boolean) | ||
+ | 12 4 version (set this to 134) | ||
+ | 14 32 zone name (null terminated) | ||
+ | 46 16 password (null terminated) | ||
+ | 62 32 reserved (suggested to set this to 0) | ||
+ | 92 ? description (must be null terminated) | ||
+ | </pre> | ||
− | + | == 32 byte reserved field (speculation) == | |
− | + | [[User:CypherJF|CypherJF]] has confirmed garbage in this field does not affect the directory server writen by [[PriitK]]. | |
− | + | However as of [[Catid|Catids]] Distributed Directory Server build 4, these 32 bytes must be zeroed. Catid has also stated that this field should be zeroed in a converstation with [[User:CypherJF|CypherJF]]. | |
− | |||
− | + | It is possible this field was intended for future protocol expansion by VIE. | |
− | |||
− | + | == Notes on PriitK's dirserv == | |
− | + | Descriptions are recorded to the stats file with a max length of 490 bytes. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | == Notes on Catid's dirserv == | |
− | + | The following are restrictions were found in Catid's directory server by CypherJF. | |
− | + | === Validating the packet === | |
− | + | * The length of the packet must be greater than 95/0×5F bytes. Basically this means the description can be blank but must be null terminated. | |
− | len(name) > 0 | + | * The first 4 bytes (the IP field) must be zeroed. |
− | + | * The name, password and description must be null terminated. | |
− | + | * The "save scores" field must be either 0 or 1. | |
− | Any character between ‘ ‘ and ‘~’ | + | |
− | No trailing spaces | + | === Validating the zone name === |
+ | * len(name) > 0. | ||
+ | * No leading spaces. | ||
+ | * No more than 1 space in a row. | ||
+ | * Any character between ‘ ‘ and ‘~’. | ||
+ | * No trailing spaces. | ||
+ | |||
+ | == See also == | ||
+ | * [http://cypherjf.sscentral.com/articles/game-server-to-directory-server/ CypherJF's original document] | ||
+ | * [http://web.archive.org/web/*/http://www4.ncsu.edu/~rniyenga/subspace/old/dprotocol.html Hammuravi's page] | ||
+ | * ASSS Project: src/directory.c | ||
+ | * [[Directory Client Protocol]] | ||
+ | |||
+ | [[Category: Protocol]] |
Revision as of 13:09, 28 September 2006
Contents
Introduction
Game Server's such as subgame2 and ASSS register their prescence on Directory Servers. This page describes the portion of the directory server protocol that game servers use.
This system relies on the UDP protocol, port 4991. Max length of the packet is only limited to the directory server software itself (so it varies from each application). However, the specific lengths of fields are pretty much final, the zone description should be the only length that varies.
Protocol
g2d register game server offset size comment 0 4 ip (leave this set to 0?) 4 2 port 6 2 player count 8 2 saving scores? (boolean) 12 4 version (set this to 134) 14 32 zone name (null terminated) 46 16 password (null terminated) 62 32 reserved (suggested to set this to 0) 92 ? description (must be null terminated)
32 byte reserved field (speculation)
CypherJF has confirmed garbage in this field does not affect the directory server writen by PriitK.
However as of Catids Distributed Directory Server build 4, these 32 bytes must be zeroed. Catid has also stated that this field should be zeroed in a converstation with CypherJF.
It is possible this field was intended for future protocol expansion by VIE.
Notes on PriitK's dirserv
Descriptions are recorded to the stats file with a max length of 490 bytes.
Notes on Catid's dirserv
The following are restrictions were found in Catid's directory server by CypherJF.
Validating the packet
- The length of the packet must be greater than 95/0×5F bytes. Basically this means the description can be blank but must be null terminated.
- The first 4 bytes (the IP field) must be zeroed.
- The name, password and description must be null terminated.
- The "save scores" field must be either 0 or 1.
Validating the zone name
- len(name) > 0.
- No leading spaces.
- No more than 1 space in a row.
- Any character between ‘ ‘ and ‘~’.
- No trailing spaces.
See also
- CypherJF's original document
- Hammuravi's page
- ASSS Project: src/directory.c
- Directory Client Protocol