Defines | Functions

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.

Functions

 assert_compile ((int) CRR_MANUAL==(int) ADMIN_CRR_MANUAL)

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 47 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 128 of file tcp_admin.cpp.