OpenTTD Source  1.11.2
config.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6  */
7 
12 #ifndef NETWORK_CORE_CONFIG_H
13 #define NETWORK_CORE_CONFIG_H
14 
16 static const char * const NETWORK_MASTER_SERVER_HOST = "master.openttd.org";
18 static const char * const NETWORK_CONTENT_SERVER_HOST = "content.openttd.org";
20 static const char * const NETWORK_CONTENT_MIRROR_HOST = "binaries.openttd.org";
22 static const char * const NETWORK_CONTENT_MIRROR_URL = "/bananas";
24 static const char * const NETWORK_MASTER_SERVER_WELCOME_MESSAGE = "OpenTTDRegister";
25 
26 static const uint16 NETWORK_MASTER_SERVER_PORT = 3978;
27 static const uint16 NETWORK_CONTENT_SERVER_PORT = 3978;
28 static const uint16 NETWORK_CONTENT_MIRROR_PORT = 80;
29 static const uint16 NETWORK_DEFAULT_PORT = 3979;
30 static const uint16 NETWORK_ADMIN_PORT = 3977;
31 static const uint16 NETWORK_DEFAULT_DEBUGLOG_PORT = 3982;
32 
33 static const uint16 SEND_MTU = 1460;
34 
35 static const byte NETWORK_GAME_ADMIN_VERSION = 1;
36 static const byte NETWORK_GAME_INFO_VERSION = 4;
37 static const byte NETWORK_COMPANY_INFO_VERSION = 6;
38 static const byte NETWORK_MASTER_SERVER_VERSION = 2;
39 
40 static const uint NETWORK_NAME_LENGTH = 80;
41 static const uint NETWORK_COMPANY_NAME_LENGTH = 128;
42 static const uint NETWORK_HOSTNAME_LENGTH = 80;
43 static const uint NETWORK_SERVER_ID_LENGTH = 33;
44 static const uint NETWORK_REVISION_LENGTH = 33;
45 static const uint NETWORK_PASSWORD_LENGTH = 33;
46 static const uint NETWORK_CLIENTS_LENGTH = 200;
47 static const uint NETWORK_CLIENT_NAME_LENGTH = 25;
48 static const uint NETWORK_RCONCOMMAND_LENGTH = 500;
49 static const uint NETWORK_GAMESCRIPT_JSON_LENGTH = SEND_MTU - 3;
50 static const uint NETWORK_CHAT_LENGTH = 900;
51 
52 static const uint NETWORK_GRF_NAME_LENGTH = 80;
53 
58 static const uint NETWORK_MAX_GRF_COUNT = 62;
59 
60 static const uint NETWORK_NUM_LANGUAGES = 36;
61 
70 static const uint NETWORK_NUM_LANDSCAPES = 4;
71 
72 #endif /* NETWORK_CORE_CONFIG_H */
NETWORK_DEFAULT_PORT
static const uint16 NETWORK_DEFAULT_PORT
The default port of the game server (TCP & UDP)
Definition: config.h:29
NETWORK_CONTENT_MIRROR_PORT
static const uint16 NETWORK_CONTENT_MIRROR_PORT
The default port of the content mirror (TCP)
Definition: config.h:28
NETWORK_NAME_LENGTH
static const uint NETWORK_NAME_LENGTH
The maximum length of the server name and map name, in bytes including '\0'.
Definition: config.h:40
NETWORK_NUM_LANDSCAPES
static const uint NETWORK_NUM_LANDSCAPES
The number of landscapes in OpenTTD.
Definition: config.h:70
NETWORK_CONTENT_SERVER_HOST
static const char *const NETWORK_CONTENT_SERVER_HOST
DNS hostname of the content server.
Definition: config.h:18
NETWORK_NUM_LANGUAGES
static const uint NETWORK_NUM_LANGUAGES
Number of known languages (to the network protocol) + 1 for 'any'.
Definition: config.h:60
NETWORK_CHAT_LENGTH
static const uint NETWORK_CHAT_LENGTH
The maximum length of a chat message, in bytes including '\0'.
Definition: config.h:50
NETWORK_CLIENT_NAME_LENGTH
static const uint NETWORK_CLIENT_NAME_LENGTH
The maximum length of a client's name, in bytes including '\0'.
Definition: config.h:47
NETWORK_GAME_ADMIN_VERSION
static const byte NETWORK_GAME_ADMIN_VERSION
What version of the admin network do we use?
Definition: config.h:35
NETWORK_MAX_GRF_COUNT
static const uint NETWORK_MAX_GRF_COUNT
Maximum number of GRFs that can be sent.
Definition: config.h:58
NETWORK_CLIENTS_LENGTH
static const uint NETWORK_CLIENTS_LENGTH
The maximum length for the list of clients that controls a company, in bytes including '\0'.
Definition: config.h:46
SEND_MTU
static const uint16 SEND_MTU
Number of bytes we can pack in a single packet.
Definition: config.h:33
NETWORK_CONTENT_MIRROR_URL
static const char *const NETWORK_CONTENT_MIRROR_URL
URL of the HTTP mirror system.
Definition: config.h:22
NETWORK_SERVER_ID_LENGTH
static const uint NETWORK_SERVER_ID_LENGTH
The maximum length of the network id of the servers, in bytes including '\0'.
Definition: config.h:43
NETWORK_COMPANY_INFO_VERSION
static const byte NETWORK_COMPANY_INFO_VERSION
What version of company info is this?
Definition: config.h:37
NETWORK_REVISION_LENGTH
static const uint NETWORK_REVISION_LENGTH
The maximum length of the revision, in bytes including '\0'.
Definition: config.h:44
NETWORK_ADMIN_PORT
static const uint16 NETWORK_ADMIN_PORT
The default port for admin network.
Definition: config.h:30
NETWORK_PASSWORD_LENGTH
static const uint NETWORK_PASSWORD_LENGTH
The maximum length of the password, in bytes including '\0' (must be >= NETWORK_SERVER_ID_LENGTH)
Definition: config.h:45
NETWORK_CONTENT_SERVER_PORT
static const uint16 NETWORK_CONTENT_SERVER_PORT
The default port of the content server (TCP)
Definition: config.h:27
NETWORK_MASTER_SERVER_PORT
static const uint16 NETWORK_MASTER_SERVER_PORT
The default port of the master server (UDP)
Definition: config.h:26
NETWORK_MASTER_SERVER_VERSION
static const byte NETWORK_MASTER_SERVER_VERSION
What version of master-server-protocol do we use?
Definition: config.h:38
NETWORK_RCONCOMMAND_LENGTH
static const uint NETWORK_RCONCOMMAND_LENGTH
The maximum length of a rconsole command, in bytes including '\0'.
Definition: config.h:48
NETWORK_MASTER_SERVER_HOST
static const char *const NETWORK_MASTER_SERVER_HOST
DNS hostname of the masterserver.
Definition: config.h:16
NETWORK_GRF_NAME_LENGTH
static const uint NETWORK_GRF_NAME_LENGTH
Maximum length of the name of a GRF.
Definition: config.h:52
NETWORK_DEFAULT_DEBUGLOG_PORT
static const uint16 NETWORK_DEFAULT_DEBUGLOG_PORT
The default port debug-log is sent to (TCP)
Definition: config.h:31
NETWORK_CONTENT_MIRROR_HOST
static const char *const NETWORK_CONTENT_MIRROR_HOST
DNS hostname of the HTTP-content mirror server.
Definition: config.h:20
NETWORK_HOSTNAME_LENGTH
static const uint NETWORK_HOSTNAME_LENGTH
The maximum length of the host name, in bytes including '\0'.
Definition: config.h:42
NETWORK_GAME_INFO_VERSION
static const byte NETWORK_GAME_INFO_VERSION
What version of game-info do we use?
Definition: config.h:36
NETWORK_GAMESCRIPT_JSON_LENGTH
static const uint NETWORK_GAMESCRIPT_JSON_LENGTH
The maximum length of a gamescript json string, in bytes including '\0'. Must not be longer than SEND...
Definition: config.h:49
NETWORK_MASTER_SERVER_WELCOME_MESSAGE
static const char *const NETWORK_MASTER_SERVER_WELCOME_MESSAGE
Message sent to the masterserver to 'identify' this client as OpenTTD.
Definition: config.h:24
NETWORK_COMPANY_NAME_LENGTH
static const uint NETWORK_COMPANY_NAME_LENGTH
The maximum length of the company name, in bytes including '\0'.
Definition: config.h:41