OpenTTD
config.h
Go to the documentation of this file.
1 /* $Id: config.h 27729 2017-01-14 13:12:49Z frosch $ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * 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.
6  * 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.
7  * 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/>.
8  */
9 
14 #ifndef NETWORK_CORE_CONFIG_H
15 #define NETWORK_CORE_CONFIG_H
16 
18 static const char * const NETWORK_MASTER_SERVER_HOST = "master.openttd.org";
20 static const char * const NETWORK_CONTENT_SERVER_HOST = "content.openttd.org";
22 static const char * const NETWORK_CONTENT_MIRROR_HOST = "binaries.openttd.org";
24 static const char * const NETWORK_CONTENT_MIRROR_URL = "/bananas";
26 static const char * const NETWORK_MASTER_SERVER_WELCOME_MESSAGE = "OpenTTDRegister";
27 
28 static const uint16 NETWORK_MASTER_SERVER_PORT = 3978;
29 static const uint16 NETWORK_CONTENT_SERVER_PORT = 3978;
30 static const uint16 NETWORK_CONTENT_MIRROR_PORT = 80;
31 static const uint16 NETWORK_DEFAULT_PORT = 3979;
32 static const uint16 NETWORK_ADMIN_PORT = 3977;
33 static const uint16 NETWORK_DEFAULT_DEBUGLOG_PORT = 3982;
34 
35 static const uint16 SEND_MTU = 1460;
36 
37 static const byte NETWORK_GAME_ADMIN_VERSION = 1;
38 static const byte NETWORK_GAME_INFO_VERSION = 4;
39 static const byte NETWORK_COMPANY_INFO_VERSION = 6;
40 static const byte NETWORK_MASTER_SERVER_VERSION = 2;
41 
42 static const uint NETWORK_NAME_LENGTH = 80;
43 static const uint NETWORK_COMPANY_NAME_LENGTH = 128;
44 static const uint NETWORK_HOSTNAME_LENGTH = 80;
45 static const uint NETWORK_SERVER_ID_LENGTH = 33;
46 static const uint NETWORK_REVISION_LENGTH = 15;
47 static const uint NETWORK_PASSWORD_LENGTH = 33;
48 static const uint NETWORK_CLIENTS_LENGTH = 200;
49 static const uint NETWORK_CLIENT_NAME_LENGTH = 25;
50 static const uint NETWORK_RCONCOMMAND_LENGTH = 500;
51 static const uint NETWORK_GAMESCRIPT_JSON_LENGTH = SEND_MTU - 3;
52 static const uint NETWORK_CHAT_LENGTH = 900;
53 
54 static const uint NETWORK_GRF_NAME_LENGTH = 80;
55 
60 static const uint NETWORK_MAX_GRF_COUNT = 62;
61 
62 static const uint NETWORK_NUM_LANGUAGES = 36;
63 
72 static const uint NETWORK_NUM_LANDSCAPES = 4;
73 
74 #endif /* NETWORK_CORE_CONFIG_H */
static const uint NETWORK_CLIENT_NAME_LENGTH
The maximum length of a client&#39;s name, in bytes including &#39;\0&#39;.
Definition: config.h:49
static const uint NETWORK_CLIENTS_LENGTH
The maximum length for the list of clients that controls a company, in bytes including &#39;\0&#39;...
Definition: config.h:48
static const byte NETWORK_GAME_ADMIN_VERSION
What version of the admin network do we use?
Definition: config.h:37
static const uint NETWORK_GRF_NAME_LENGTH
Maximum length of the name of a GRF.
Definition: config.h:54
static const byte NETWORK_MASTER_SERVER_VERSION
What version of master-server-protocol do we use?
Definition: config.h:40
static const uint NETWORK_RCONCOMMAND_LENGTH
The maximum length of a rconsole command, in bytes including &#39;\0&#39;.
Definition: config.h:50
static const char *const NETWORK_CONTENT_SERVER_HOST
DNS hostname of the content server.
Definition: config.h:20
static const char *const NETWORK_MASTER_SERVER_HOST
DNS hostname of the masterserver.
Definition: config.h:18
static const uint16 NETWORK_DEFAULT_DEBUGLOG_PORT
The default port debug-log is sent to (TCP)
Definition: config.h:33
static const char *const NETWORK_CONTENT_MIRROR_HOST
DNS hostname of the HTTP-content mirror server.
Definition: config.h:22
static const byte NETWORK_GAME_INFO_VERSION
What version of game-info do we use?
Definition: config.h:38
static const uint NETWORK_CHAT_LENGTH
The maximum length of a chat message, in bytes including &#39;\0&#39;.
Definition: config.h:52
static const char *const NETWORK_MASTER_SERVER_WELCOME_MESSAGE
Message sent to the masterserver to &#39;identify&#39; this client as OpenTTD.
Definition: config.h:26
static const uint NETWORK_HOSTNAME_LENGTH
The maximum length of the host name, in bytes including &#39;\0&#39;.
Definition: config.h:44
static const uint NETWORK_GAMESCRIPT_JSON_LENGTH
The maximum length of a gamescript json string, in bytes including &#39;\0&#39;. Must not be longer than SEND...
Definition: config.h:51
static const uint16 NETWORK_DEFAULT_PORT
The default port of the game server (TCP & UDP)
Definition: config.h:31
static const char *const NETWORK_CONTENT_MIRROR_URL
URL of the HTTP mirror system.
Definition: config.h:24
static const uint NETWORK_COMPANY_NAME_LENGTH
The maximum length of the company name, in bytes including &#39;\0&#39;.
Definition: config.h:43
static const uint16 NETWORK_CONTENT_MIRROR_PORT
The default port of the content mirror (TCP)
Definition: config.h:30
static const uint NETWORK_SERVER_ID_LENGTH
The maximum length of the network id of the servers, in bytes including &#39;\0&#39;.
Definition: config.h:45
static const uint16 SEND_MTU
Number of bytes we can pack in a single packet.
Definition: config.h:35
static const uint NETWORK_NUM_LANGUAGES
Number of known languages (to the network protocol) + 1 for &#39;any&#39;.
Definition: config.h:62
static const uint16 NETWORK_ADMIN_PORT
The default port for admin network.
Definition: config.h:32
static const uint NETWORK_NAME_LENGTH
The maximum length of the server name and map name, in bytes including &#39;\0&#39;.
Definition: config.h:42
static const uint NETWORK_PASSWORD_LENGTH
The maximum length of the password, in bytes including &#39;\0&#39; (must be >= NETWORK_SERVER_ID_LENGTH) ...
Definition: config.h:47
static const uint16 NETWORK_CONTENT_SERVER_PORT
The default port of the content server (TCP)
Definition: config.h:29
static const uint NETWORK_NUM_LANDSCAPES
The number of landscapes in OpenTTD.
Definition: config.h:72
static const byte NETWORK_COMPANY_INFO_VERSION
What version of company info is this?
Definition: config.h:39
static const uint NETWORK_REVISION_LENGTH
The maximum length of the revision, in bytes including &#39;\0&#39;.
Definition: config.h:46
static const uint16 NETWORK_MASTER_SERVER_PORT
The default port of the master server (UDP)
Definition: config.h:28
static const uint NETWORK_MAX_GRF_COUNT
Maximum number of GRFs that can be sent.
Definition: config.h:60