tcp_admin.cpp File Reference

Basic functions to receive and send TCP packets to and from the admin network. More...

#include "../../stdafx.h"
#include "../network_internal.h"
#include "tcp_admin.h"
#include "../../debug.h"

Go to the source code of this file.

Defines

#define ADMIN_COMMAND(type)   case type: return this->NetworkPacketReceive_ ## type ## _command(p); break;
 Defines a simple (switch) case for each network packet.
#define DEFINE_UNAVAILABLE_ADMIN_RECEIVE_COMMAND(type)
 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.

Detailed Description

Basic functions to receive and send TCP packets to and from the admin network.

Definition in file tcp_admin.cpp.


Define Documentation

#define ADMIN_COMMAND ( type   )     case type: return this->NetworkPacketReceive_ ## type ## _command(p); break;

Defines a simple (switch) case for each network packet.

Parameters:
type the packet type to create the case for.

Definition at line 41 of file tcp_admin.cpp.

Referenced by NetworkAdminSocketHandler::HandlePacket().

#define DEFINE_UNAVAILABLE_ADMIN_RECEIVE_COMMAND ( type   ) 
Value:
NetworkRecvStatus NetworkAdminSocketHandler::NetworkPacketReceive_## type ##_command(Packet *p) \
{ \
  DEBUG(net, 0, "[tcp/admin] received illegal packet type %d from admin %s (%s)", \
      type, this->admin_name, this->admin_version); \
  return NETWORK_RECV_STATUS_MALFORMED_PACKET; \
}

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.

Parameters:
type the packet type to create the stub for.

Definition at line 122 of file tcp_admin.cpp.


Generated on Fri Mar 18 23:17:45 2011 for OpenTTD by  doxygen 1.6.1