rubidium@5720: /* $Id$ */ rubidium@5720: celestar@6447: /** celestar@6447: * @file config.h Configuration options of the network stuff celestar@6447: */ celestar@6447: rubidium@5720: #ifndef NETWORK_CORE_CONFIG_H rubidium@5720: #define NETWORK_CORE_CONFIG_H rubidium@5720: rubidium@5720: #ifdef ENABLE_NETWORK rubidium@5720: rubidium@5720: /** DNS hostname of the masterserver */ rubidium@5803: #define NETWORK_MASTER_SERVER_HOST "master.openttd.org" rubidium@5720: /** Message sent to the masterserver to 'identify' this client as OpenTTD */ rubidium@5720: #define NETWORK_MASTER_SERVER_WELCOME_MESSAGE "OpenTTDRegister" rubidium@5720: rubidium@5720: enum { rubidium@5720: NETWORK_MASTER_SERVER_PORT = 3978, ///< The default port of the master server (UDP) rubidium@5720: NETWORK_DEFAULT_PORT = 3979, ///< The default port of the game server (TCP & UDP) truelight@6210: NETWORK_DEFAULT_DEBUGLOG_PORT = 3982, ///< The default port debug-log is sent too (TCP) rubidium@5720: rubidium@5720: SEND_MTU = 1460, ///< Number of bytes we can pack in a single packet rubidium@5720: rubidium@5720: NETWORK_GAME_INFO_VERSION = 4, ///< What version of game-info do we use? rubidium@5720: NETWORK_COMPANY_INFO_VERSION = 4, ///< What version of company info is this? rubidium@5720: NETWORK_MASTER_SERVER_VERSION = 1, ///< What version of master-server-protocol do we use? rubidium@5720: rubidium@5720: NETWORK_NAME_LENGTH = 80, ///< The maximum length of the server name and map name, in bytes including '\0' rubidium@5720: NETWORK_HOSTNAME_LENGTH = 80, ///< The maximum length of the host name, in bytes including '\0' rubidium@9722: NETWORK_UNIQUE_ID_LENGTH = 33, ///< The maximum length of the unique id of the clients, in bytes including '\0' rubidium@5720: NETWORK_REVISION_LENGTH = 15, ///< The maximum length of the revision, in bytes including '\0' rubidium@9723: NETWORK_PASSWORD_LENGTH = 33, ///< The maximum length of the password, in bytes including '\0' (must be >= NETWORK_UNIQUE_ID_LENGTH) rubidium@5720: NETWORK_PLAYERS_LENGTH = 200, ///< The maximum length for the list of players that controls a company, in bytes including '\0' rubidium@5720: NETWORK_CLIENT_NAME_LENGTH = 25, ///< The maximum length of a player, in bytes including '\0' rubidium@5720: NETWORK_RCONCOMMAND_LENGTH = 500, ///< The maximum length of a rconsole command, in bytes including '\0' rubidium@5720: rubidium@5720: NETWORK_GRF_NAME_LENGTH = 80, ///< Maximum length of the name of a GRF rubidium@5720: /** rubidium@5720: * Maximum number of GRFs that can be sent. rubidium@5720: * This value is related to number of handles (files) OpenTTD can open. rubidium@5720: * This is currently 64 and about 10 are currently used when OpenTTD loads rubidium@5720: * without any NewGRFs. Therefore one can only load about 55 NewGRFs, so rubidium@5720: * this is not a limit, but rather a way to easily check whether the limit rubidium@5720: * imposed by the handle count is reached. Secondly it isn't possible to rubidium@5720: * send much more GRF IDs + MD5sums in the PACKET_UDP_SERVER_RESPONSE, due rubidium@5720: * to the limited size of UDP packets. rubidium@5720: */ rubidium@5720: NETWORK_MAX_GRF_COUNT = 55, rubidium@5720: rubidium@9826: NETWORK_NUM_LANGUAGES = 36, ///< Number of known languages (to the network protocol) + 1 for 'any'. rubidium@6061: /** rubidium@6061: * The number of landscapes in OpenTTD. rubidium@6061: * This number must be equal to NUM_LANDSCAPE, but as this number is used rubidium@6061: * within the network code and that the network code is shared with the rubidium@6061: * masterserver/updater, it has to be declared in here too. In network.cpp rubidium@6061: * there is a compile assertion to check that this NUM_LANDSCAPE is equal rubidium@6061: * to NETWORK_NUM_LANDSCAPES. rubidium@6061: */ rubidium@6061: NETWORK_NUM_LANDSCAPES = 4, rubidium@5720: }; rubidium@5720: rubidium@5720: #endif /* ENABLE_NETWORK */ rubidium@5720: rubidium@5720: #endif /* NETWORK_CORE_CONFIG_H */