2007-01-02 17:34:03 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
#ifdef ENABLE_NETWORK
|
|
|
|
|
|
|
|
#include "../../stdafx.h"
|
|
|
|
#include "../../debug.h"
|
|
|
|
#include "../../macros.h"
|
2007-01-10 18:56:51 +00:00
|
|
|
#include "../../helpers.hpp"
|
2007-01-02 17:34:03 +00:00
|
|
|
#include "packet.h"
|
|
|
|
#include "udp.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file udp.c Basic functions to receive and send UDP packets.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Start listening on the given host and port.
|
|
|
|
* @param udp the place where the (references to the) UDP are stored
|
|
|
|
* @param host the host (ip) to listen on
|
|
|
|
* @param port the port to listen on
|
|
|
|
* @param broadcast whether to allow broadcast sending/receiving
|
|
|
|
* @return true if the listening succeeded
|
|
|
|
*/
|
2007-01-12 14:30:01 +00:00
|
|
|
bool NetworkUDPSocketHandler::Listen(const uint32 host, const uint16 port, const bool broadcast)
|
2007-01-02 17:34:03 +00:00
|
|
|
{
|
|
|
|
struct sockaddr_in sin;
|
|
|
|
|
|
|
|
/* Make sure socket is closed */
|
2007-01-12 14:30:01 +00:00
|
|
|
this->Close();
|
2007-01-02 17:34:03 +00:00
|
|
|
|
2007-01-12 20:19:49 +00:00
|
|
|
this->sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
|
|
|
if (!this->IsConnected()) {
|
2007-01-02 17:34:03 +00:00
|
|
|
DEBUG(net, 0, "[udp] failed to start UDP listener");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* set nonblocking mode for socket */
|
|
|
|
{
|
|
|
|
unsigned long blocking = 1;
|
|
|
|
#ifndef BEOS_NET_SERVER
|
2007-01-12 20:19:49 +00:00
|
|
|
ioctlsocket(this->sock, FIONBIO, &blocking);
|
2007-01-02 17:34:03 +00:00
|
|
|
#else
|
2007-01-12 20:19:49 +00:00
|
|
|
setsockopt(this->sock, SOL_SOCKET, SO_NONBLOCK, &blocking, NULL);
|
2007-01-02 17:34:03 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
sin.sin_family = AF_INET;
|
|
|
|
/* Listen on all IPs */
|
|
|
|
sin.sin_addr.s_addr = host;
|
|
|
|
sin.sin_port = htons(port);
|
|
|
|
|
2007-01-12 20:19:49 +00:00
|
|
|
if (bind(this->sock, (struct sockaddr*)&sin, sizeof(sin)) != 0) {
|
2007-01-02 17:34:03 +00:00
|
|
|
DEBUG(net, 0, "[udp] bind failed on %s:%i", inet_ntoa(*(struct in_addr *)&host), port);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (broadcast) {
|
|
|
|
/* Enable broadcast */
|
|
|
|
unsigned long val = 1;
|
|
|
|
#ifndef BEOS_NET_SERVER // will work around this, some day; maybe.
|
2007-01-12 20:19:49 +00:00
|
|
|
setsockopt(this->sock, SOL_SOCKET, SO_BROADCAST, (char *) &val , sizeof(val));
|
2007-01-02 17:34:03 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
DEBUG(net, 1, "[udp] listening on port %s:%d", inet_ntoa(*(struct in_addr *)&host), port);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2007-01-04 18:10:40 +00:00
|
|
|
/**
|
|
|
|
* Close the given UDP socket
|
|
|
|
* @param udp the socket to close
|
|
|
|
*/
|
2007-01-12 14:30:01 +00:00
|
|
|
void NetworkUDPSocketHandler::Close()
|
2007-01-04 18:10:40 +00:00
|
|
|
{
|
2007-01-12 20:19:49 +00:00
|
|
|
if (!this->IsConnected()) return;
|
2007-01-04 18:10:40 +00:00
|
|
|
|
2007-01-12 20:19:49 +00:00
|
|
|
closesocket(this->sock);
|
|
|
|
this->sock = INVALID_SOCKET;
|
2007-01-04 18:10:40 +00:00
|
|
|
}
|
|
|
|
|
2007-01-12 20:19:49 +00:00
|
|
|
NetworkRecvStatus NetworkUDPSocketHandler::CloseConnection()
|
|
|
|
{
|
|
|
|
this->has_quit = true;
|
|
|
|
return NETWORK_RECV_STATUS_OKAY;
|
|
|
|
}
|
2007-01-04 18:10:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Send a packet over UDP
|
|
|
|
* @param udp the socket to send over
|
|
|
|
* @param p the packet to send
|
|
|
|
* @param recv the receiver (target) of the packet
|
|
|
|
*/
|
2007-01-12 14:30:01 +00:00
|
|
|
void NetworkUDPSocketHandler::SendPacket(Packet *p, const struct sockaddr_in *recv)
|
2007-01-04 18:10:40 +00:00
|
|
|
{
|
|
|
|
int res;
|
|
|
|
|
|
|
|
NetworkSend_FillPacketSize(p);
|
|
|
|
|
|
|
|
/* Send the buffer */
|
2007-01-12 20:19:49 +00:00
|
|
|
res = sendto(this->sock, (const char*)p->buffer, p->size, 0, (struct sockaddr *)recv, sizeof(*recv));
|
2007-01-04 18:10:40 +00:00
|
|
|
|
|
|
|
/* Check for any errors, but ignore it otherwise */
|
|
|
|
if (res == -1) DEBUG(net, 1, "[udp] sendto failed with: %i", GET_LAST_ERROR());
|
|
|
|
}
|
|
|
|
|
2007-01-02 17:34:03 +00:00
|
|
|
/**
|
|
|
|
* Receive a packet at UDP level
|
|
|
|
* @param udp the socket to receive the packet on
|
|
|
|
*/
|
2007-01-12 14:30:01 +00:00
|
|
|
void NetworkUDPSocketHandler::ReceivePackets()
|
2007-01-02 17:34:03 +00:00
|
|
|
{
|
|
|
|
struct sockaddr_in client_addr;
|
|
|
|
socklen_t client_len;
|
|
|
|
int nbytes;
|
|
|
|
Packet p;
|
|
|
|
int packet_len;
|
|
|
|
|
2007-01-12 20:19:49 +00:00
|
|
|
if (!this->IsConnected()) return;
|
2007-01-12 14:30:01 +00:00
|
|
|
|
2007-01-02 17:34:03 +00:00
|
|
|
packet_len = sizeof(p.buffer);
|
|
|
|
client_len = sizeof(client_addr);
|
|
|
|
|
|
|
|
/* Try to receive anything */
|
2007-01-12 20:19:49 +00:00
|
|
|
nbytes = recvfrom(this->sock, (char*)p.buffer, packet_len, 0, (struct sockaddr *)&client_addr, &client_len);
|
2007-01-02 17:34:03 +00:00
|
|
|
|
2007-01-09 14:48:21 +00:00
|
|
|
/* We got some bytes for the base header of the packet. */
|
2007-01-02 17:34:03 +00:00
|
|
|
if (nbytes > 2) {
|
|
|
|
NetworkRecv_ReadPacketSize(&p);
|
|
|
|
|
2007-01-09 14:48:21 +00:00
|
|
|
/* If the size does not match the packet must be corrupted.
|
|
|
|
* Otherwise it will be marked as corrupted later on. */
|
|
|
|
if (nbytes != p.size) {
|
|
|
|
DEBUG(net, 1, "received a packet with mismatching size from %s:%d",
|
|
|
|
inet_ntoa(client_addr.sin_addr), ntohs(client_addr.sin_port));
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2007-01-02 17:34:03 +00:00
|
|
|
/* Put the position on the right place */
|
|
|
|
p.pos = 2;
|
|
|
|
p.next = NULL;
|
|
|
|
|
|
|
|
/* Handle the packet */
|
2007-01-12 14:30:01 +00:00
|
|
|
this->HandleUDPPacket(&p, &client_addr);
|
2007-01-02 17:34:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Serializes the GRFIdentifier (GRF ID and MD5 checksum) to the packet
|
2007-01-21 17:29:38 +00:00
|
|
|
* @param p the packet to write the data to
|
|
|
|
* @param grf the GRFIdentifier to serialize
|
2007-01-02 17:34:03 +00:00
|
|
|
*/
|
2007-01-21 17:29:38 +00:00
|
|
|
void NetworkUDPSocketHandler::Send_GRFIdentifier(Packet *p, const GRFIdentifier *grf)
|
2007-01-02 17:34:03 +00:00
|
|
|
{
|
|
|
|
uint j;
|
2007-01-21 17:29:38 +00:00
|
|
|
NetworkSend_uint32(p, grf->grfid);
|
|
|
|
for (j = 0; j < sizeof(grf->md5sum); j++) {
|
|
|
|
NetworkSend_uint8 (p, grf->md5sum[j]);
|
2007-01-02 17:34:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deserializes the GRFIdentifier (GRF ID and MD5 checksum) from the packet
|
2007-01-21 17:29:38 +00:00
|
|
|
* @param p the packet to read the data from
|
|
|
|
* @param grf the GRFIdentifier to deserialize
|
2007-01-02 17:34:03 +00:00
|
|
|
*/
|
2007-01-21 17:29:38 +00:00
|
|
|
void NetworkUDPSocketHandler::Recv_GRFIdentifier(Packet *p, GRFIdentifier *grf)
|
2007-01-02 17:34:03 +00:00
|
|
|
{
|
|
|
|
uint j;
|
2007-01-21 17:29:38 +00:00
|
|
|
grf->grfid = NetworkRecv_uint32(this, p);
|
|
|
|
for (j = 0; j < sizeof(grf->md5sum); j++) {
|
|
|
|
grf->md5sum[j] = NetworkRecv_uint8(this, p);
|
2007-01-02 17:34:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Serializes the NetworkGameInfo struct to the packet
|
|
|
|
* @param p the packet to write the data to
|
|
|
|
* @param info the NetworkGameInfo struct to serialize
|
|
|
|
*/
|
2007-01-12 14:30:01 +00:00
|
|
|
void NetworkUDPSocketHandler::Send_NetworkGameInfo(Packet *p, const NetworkGameInfo *info)
|
2007-01-02 17:34:03 +00:00
|
|
|
{
|
|
|
|
NetworkSend_uint8 (p, NETWORK_GAME_INFO_VERSION);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Please observe the order.
|
|
|
|
* The parts must be read in the same order as they are sent!
|
|
|
|
*/
|
|
|
|
|
2007-01-05 21:33:58 +00:00
|
|
|
/* Update the documentation in udp.h on changes
|
|
|
|
* to the NetworkGameInfo wire-protocol! */
|
2007-01-02 17:34:03 +00:00
|
|
|
|
|
|
|
/* NETWORK_GAME_INFO_VERSION = 4 */
|
|
|
|
{
|
|
|
|
/* Only send the GRF Identification (GRF_ID and MD5 checksum) of
|
|
|
|
* the GRFs that are needed, i.e. the ones that the server has
|
|
|
|
* selected in the NewGRF GUI and not the ones that are used due
|
|
|
|
* to the fact that they are in [newgrf-static] in openttd.cfg */
|
|
|
|
const GRFConfig *c;
|
|
|
|
uint count = 0;
|
|
|
|
|
|
|
|
/* Count number of GRFs to send information about */
|
|
|
|
for (c = info->grfconfig; c != NULL; c = c->next) {
|
|
|
|
if (!HASBIT(c->flags, GCF_STATIC)) count++;
|
|
|
|
}
|
|
|
|
NetworkSend_uint8 (p, count); // Send number of GRFs
|
|
|
|
|
|
|
|
/* Send actual GRF Identifications */
|
|
|
|
for (c = info->grfconfig; c != NULL; c = c->next) {
|
2007-01-12 14:30:01 +00:00
|
|
|
if (!HASBIT(c->flags, GCF_STATIC)) this->Send_GRFIdentifier(p, c);
|
2007-01-02 17:34:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* NETWORK_GAME_INFO_VERSION = 3 */
|
|
|
|
NetworkSend_uint32(p, info->game_date);
|
|
|
|
NetworkSend_uint32(p, info->start_date);
|
|
|
|
|
|
|
|
/* NETWORK_GAME_INFO_VERSION = 2 */
|
|
|
|
NetworkSend_uint8 (p, info->companies_max);
|
|
|
|
NetworkSend_uint8 (p, info->companies_on);
|
|
|
|
NetworkSend_uint8 (p, info->spectators_max);
|
|
|
|
|
|
|
|
/* NETWORK_GAME_INFO_VERSION = 1 */
|
|
|
|
NetworkSend_string(p, info->server_name);
|
|
|
|
NetworkSend_string(p, info->server_revision);
|
|
|
|
NetworkSend_uint8 (p, info->server_lang);
|
|
|
|
NetworkSend_uint8 (p, info->use_password);
|
|
|
|
NetworkSend_uint8 (p, info->clients_max);
|
|
|
|
NetworkSend_uint8 (p, info->clients_on);
|
|
|
|
NetworkSend_uint8 (p, info->spectators_on);
|
|
|
|
NetworkSend_string(p, info->map_name);
|
|
|
|
NetworkSend_uint16(p, info->map_width);
|
|
|
|
NetworkSend_uint16(p, info->map_height);
|
|
|
|
NetworkSend_uint8 (p, info->map_set);
|
|
|
|
NetworkSend_uint8 (p, info->dedicated);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deserializes the NetworkGameInfo struct from the packet
|
|
|
|
* @param p the packet to read the data from
|
|
|
|
* @param info the NetworkGameInfo to deserialize into
|
|
|
|
*/
|
2007-01-12 14:30:01 +00:00
|
|
|
void NetworkUDPSocketHandler::Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *info)
|
2007-01-02 17:34:03 +00:00
|
|
|
{
|
2007-01-12 20:19:49 +00:00
|
|
|
info->game_info_version = NetworkRecv_uint8(this, p);
|
2007-01-02 17:34:03 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Please observe the order.
|
|
|
|
* The parts must be read in the same order as they are sent!
|
|
|
|
*/
|
|
|
|
|
2007-01-05 21:33:58 +00:00
|
|
|
/* Update the documentation in udp.h on changes
|
|
|
|
* to the NetworkGameInfo wire-protocol! */
|
|
|
|
|
2007-01-02 17:34:03 +00:00
|
|
|
switch (info->game_info_version) {
|
|
|
|
case 4: {
|
2007-01-11 17:29:39 +00:00
|
|
|
GRFConfig **dst = &info->grfconfig;
|
2007-01-02 17:34:03 +00:00
|
|
|
uint i;
|
2007-01-12 20:19:49 +00:00
|
|
|
uint num_grfs = NetworkRecv_uint8(this, p);
|
2007-01-02 17:34:03 +00:00
|
|
|
|
|
|
|
for (i = 0; i < num_grfs; i++) {
|
2007-01-11 17:29:39 +00:00
|
|
|
GRFConfig *c = CallocT<GRFConfig>(1);
|
2007-01-12 14:30:01 +00:00
|
|
|
this->Recv_GRFIdentifier(p, c);
|
|
|
|
this->HandleIncomingNetworkGameInfoGRFConfig(c);
|
2007-01-02 17:34:03 +00:00
|
|
|
|
|
|
|
/* Append GRFConfig to the list */
|
|
|
|
*dst = c;
|
|
|
|
dst = &c->next;
|
|
|
|
}
|
|
|
|
} /* Fallthrough */
|
|
|
|
case 3:
|
2007-01-12 20:19:49 +00:00
|
|
|
info->game_date = NetworkRecv_uint32(this, p);
|
|
|
|
info->start_date = NetworkRecv_uint32(this, p);
|
2007-01-02 17:34:03 +00:00
|
|
|
/* Fallthrough */
|
|
|
|
case 2:
|
2007-01-12 20:19:49 +00:00
|
|
|
info->companies_max = NetworkRecv_uint8 (this, p);
|
|
|
|
info->companies_on = NetworkRecv_uint8 (this, p);
|
|
|
|
info->spectators_max = NetworkRecv_uint8 (this, p);
|
2007-01-02 17:34:03 +00:00
|
|
|
/* Fallthrough */
|
|
|
|
case 1:
|
2007-01-12 20:19:49 +00:00
|
|
|
NetworkRecv_string(this, p, info->server_name, sizeof(info->server_name));
|
|
|
|
NetworkRecv_string(this, p, info->server_revision, sizeof(info->server_revision));
|
|
|
|
info->server_lang = NetworkRecv_uint8 (this, p);
|
|
|
|
info->use_password = NetworkRecv_uint8 (this, p);
|
|
|
|
info->clients_max = NetworkRecv_uint8 (this, p);
|
|
|
|
info->clients_on = NetworkRecv_uint8 (this, p);
|
|
|
|
info->spectators_on = NetworkRecv_uint8 (this, p);
|
2007-01-02 17:34:03 +00:00
|
|
|
if (info->game_info_version < 3) { // 16 bits dates got scrapped and are read earlier
|
2007-01-12 20:19:49 +00:00
|
|
|
info->game_date = NetworkRecv_uint16(this, p) + DAYS_TILL_ORIGINAL_BASE_YEAR;
|
|
|
|
info->start_date = NetworkRecv_uint16(this, p) + DAYS_TILL_ORIGINAL_BASE_YEAR;
|
2007-01-02 17:34:03 +00:00
|
|
|
}
|
2007-01-12 20:19:49 +00:00
|
|
|
NetworkRecv_string(this, p, info->map_name, sizeof(info->map_name));
|
|
|
|
info->map_width = NetworkRecv_uint16(this, p);
|
|
|
|
info->map_height = NetworkRecv_uint16(this, p);
|
|
|
|
info->map_set = NetworkRecv_uint8 (this, p);
|
|
|
|
info->dedicated = (NetworkRecv_uint8(this, p) != 0);
|
2007-01-02 17:34:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-01-12 14:30:01 +00:00
|
|
|
/* Defines a simple (switch) case for each network packet */
|
|
|
|
#define UDP_COMMAND(type) case type: this->NetworkPacketReceive_ ## type ## _command(p, client_addr); break;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle an incoming packets by sending it to the correct function.
|
|
|
|
* @param p the received packet
|
|
|
|
* @param client_addr the sender of the packet
|
|
|
|
*/
|
|
|
|
void NetworkUDPSocketHandler::HandleUDPPacket(Packet *p, const struct sockaddr_in *client_addr)
|
|
|
|
{
|
|
|
|
PacketUDPType type;
|
|
|
|
|
2007-01-12 20:19:49 +00:00
|
|
|
/* New packet == new client, which has not quit yet */
|
|
|
|
this->has_quit = false;
|
2007-01-12 14:30:01 +00:00
|
|
|
|
2007-01-12 20:19:49 +00:00
|
|
|
type = (PacketUDPType)NetworkRecv_uint8(this, p);
|
2007-01-12 14:30:01 +00:00
|
|
|
|
2007-01-12 20:19:49 +00:00
|
|
|
switch (this->HasClientQuit() ? PACKET_UDP_END : type) {
|
2007-01-12 14:30:01 +00:00
|
|
|
UDP_COMMAND(PACKET_UDP_CLIENT_FIND_SERVER);
|
|
|
|
UDP_COMMAND(PACKET_UDP_SERVER_RESPONSE);
|
|
|
|
UDP_COMMAND(PACKET_UDP_CLIENT_DETAIL_INFO);
|
|
|
|
UDP_COMMAND(PACKET_UDP_SERVER_DETAIL_INFO);
|
|
|
|
UDP_COMMAND(PACKET_UDP_SERVER_REGISTER);
|
|
|
|
UDP_COMMAND(PACKET_UDP_MASTER_ACK_REGISTER);
|
|
|
|
UDP_COMMAND(PACKET_UDP_CLIENT_GET_LIST);
|
|
|
|
UDP_COMMAND(PACKET_UDP_MASTER_RESPONSE_LIST);
|
|
|
|
UDP_COMMAND(PACKET_UDP_SERVER_UNREGISTER);
|
|
|
|
UDP_COMMAND(PACKET_UDP_CLIENT_GET_NEWGRFS);
|
|
|
|
UDP_COMMAND(PACKET_UDP_SERVER_NEWGRFS);
|
|
|
|
|
|
|
|
default:
|
2007-01-12 20:19:49 +00:00
|
|
|
if (this->HasClientQuit()) {
|
2007-01-12 14:30:01 +00:00
|
|
|
DEBUG(net, 0, "[udp] received invalid packet type %d from %s:%d", type, inet_ntoa(client_addr->sin_addr), ntohs(client_addr->sin_port));
|
|
|
|
} else {
|
|
|
|
DEBUG(net, 0, "[udp] received illegal packet from %s:%d", inet_ntoa(client_addr->sin_addr), ntohs(client_addr->sin_port));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create stub implementations for all receive commands that only
|
|
|
|
* show a warning that the given command is not available for the
|
|
|
|
* socket where the packet came from.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(type) \
|
|
|
|
void NetworkUDPSocketHandler::NetworkPacketReceive_## type ##_command(\
|
|
|
|
Packet *p, const struct sockaddr_in *client_addr) { \
|
2007-01-12 20:19:49 +00:00
|
|
|
DEBUG(net, 0, "[udp] received packet type %d on wrong port from %s:%d", \
|
|
|
|
type, inet_ntoa(client_addr->sin_addr), ntohs(client_addr->sin_port)); \
|
2007-01-12 14:30:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_CLIENT_FIND_SERVER);
|
|
|
|
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_SERVER_RESPONSE);
|
|
|
|
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_CLIENT_DETAIL_INFO);
|
|
|
|
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_SERVER_DETAIL_INFO);
|
|
|
|
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_SERVER_REGISTER);
|
|
|
|
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_MASTER_ACK_REGISTER);
|
|
|
|
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_CLIENT_GET_LIST);
|
|
|
|
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_MASTER_RESPONSE_LIST);
|
|
|
|
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_SERVER_UNREGISTER);
|
|
|
|
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_CLIENT_GET_NEWGRFS);
|
|
|
|
DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND(PACKET_UDP_SERVER_NEWGRFS);
|
|
|
|
|
2007-01-02 17:34:03 +00:00
|
|
|
#endif /* ENABLE_NETWORK */
|