summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorduck <me@duck.me.uk>2020-06-27 16:21:17 +0000
committerGitHub <noreply@github.com>2020-06-27 18:21:17 +0200
commit1bc7047af724f9d6282f7cc79289ecdffe084d1c (patch)
tree9146423f086d8534dcb4219dc37f807891dd361b /docs
parent75a2ae2f48a88a7496f135b020aeb5cf1c2924bb (diff)
downloadopenttd-1bc7047af724f9d6282f7cc79289ecdffe084d1c.tar.xz
Doc: Acknowledge integer type mismatch in certain admin packets using AdminUpdateType (#8238)
Diffstat (limited to 'docs')
-rw-r--r--docs/admin_network.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/admin_network.md b/docs/admin_network.md
index ff5ea7c27..4703df322 100644
--- a/docs/admin_network.md
+++ b/docs/admin_network.md
@@ -86,6 +86,9 @@ Last updated: 2011-01-20
Note: not every update type supports every frequency. If in doubt, you can
verify against the data received in `ADMIN_PACKET_SERVER_PROTOCOL`.
+ Please note the potential gotcha in the "Certain packet information" section below
+ when using the `ADMIN_UPDATE_FREQUENCY` packet.
+
The server will not confirm your registered update. However, asking for an
invalid `AdminUpdateType` or a not supported `AdminUpdateFrequency` you will be
disconnected from the server with `NETWORK_ERROR_ILLEGAL_PACKET`.
@@ -143,6 +146,9 @@ Last updated: 2011-01-20
- ADMIN_UPDATE_COMPANY_STATS
- ADMIN_UPDATE_CMD_NAMES
+ Please note the potential gotcha in the "Certain packet information" section below
+ when using the `ADMIN_POLL` packet.
+
`ADMIN_UPDATE_CLIENT_INFO` and `ADMIN_UPDATE_COMPANY_INFO` accept an additional
parameter. This parameter is used to specify a certain client or company.
Setting this parameter to `UINT32_MAX (0xFFFFFFFF)` will tell the server you
@@ -213,6 +219,14 @@ Last updated: 2011-01-20
## 7.0) Certain packet information
+ `ADMIN_PACKET_ADMIN_UPDATE_FREQUENCY` and `ADMIN_PACKET_ADMIN_POLL`
+
+ Potential gotcha: the AdminUpdateType integer type used is a
+ uint16 for `UPDATE_FREQUENCY`, and a uint8 for `POLL`.
+ This is due to boring legacy reasons.
+ It is safe to cast between the two when sending
+ (i.e cast from a uint8 to a uint16).
+
All `ADMIN_PACKET_SERVER_*` packets have an enum value greater 100.
`ADMIN_PACKET_SERVER_WELCOME`