Freeciv-3.3
|
#include "shared.h"
#include "diptreaty.h"
#include "effects.h"
#include "events.h"
#include "improvement.h"
#include "player.h"
#include "requirements.h"
#include "spaceship.h"
#include "team.h"
#include "tile.h"
#include "traderoutes.h"
#include "unittype.h"
#include "worklist.h"
#include "packets_gen.h"
Go to the source code of this file.
Data Structures | |
struct | packet_handlers |
Macros | |
#define | web_send_packet(packetname, pconn, ...) |
#define | web_lsend_packet(packetname, ...) |
#define | REQEST_PLAYER_INITIATED (0) |
#define | get_packet_from_connection(pc, ptype) get_packet_from_connection_raw(pc, ptype) |
#define | SEND_PACKET_START(packet_type) |
#define | SEND_PACKET_END(packet_type) |
#define | SEND_PACKET_DISCARD() return 0 |
#define | RECEIVE_PACKET_START(packet_type, result) |
#define | RECEIVE_PACKET_END(result) |
#define | RECEIVE_PACKET_FIELD_ERROR(field, ...) |
#define | PACKET_STRVEC_INSERT(dest, src) dest = src |
#define | PACKET_STRVEC_EXTRACT(dest, src) |
Enumerations | |
enum | unit_info_use { UNIT_INFO_IDENTITY , UNIT_INFO_CITY_SUPPORTED , UNIT_INFO_CITY_PRESENT } |
#define PACKET_STRVEC_EXTRACT | ( | dest, | |
src | |||
) |
#define RECEIVE_PACKET_END | ( | result | ) |
#define RECEIVE_PACKET_START | ( | packet_type, | |
result | |||
) |
#define SEND_PACKET_END | ( | packet_type | ) |
#define SEND_PACKET_START | ( | packet_type | ) |
#define web_lsend_packet | ( | packetname, | |
... | |||
) |
#define web_send_packet | ( | packetname, | |
pconn, | |||
... | |||
) |
void generic_handle_player_attribute_chunk | ( | struct player * | pplayer, |
const struct packet_player_attribute_chunk * | chunk | ||
) |
Updates pplayer->attribute_block according to the given packet.
Definition at line 690 of file packets.c.
Referenced by handle_player_attribute_chunk(), and handle_player_attribute_chunk().
void * get_packet_from_connection_raw | ( | struct connection * | pc, |
enum packet_type * | ptype | ||
) |
bool packet_check | ( | struct data_in * | din, |
struct connection * | pc | ||
) |
void packet_destroy | ( | void * | packet, |
enum packet_type | type | ||
) |
Definition at line 103994 of file packets_gen.c.
Referenced by incoming_client_packets(), input_from_server(), and input_from_server_till_request_got_processed().
void packet_handlers_fill_capability | ( | struct packet_handlers * | phandlers, |
const char * | capability | ||
) |
Definition at line 103989 of file packets_gen.c.
Referenced by packet_handlers_get().
void packet_handlers_fill_initial | ( | struct packet_handlers * | phandlers | ) |
Definition at line 103576 of file packets_gen.c.
Referenced by packet_handlers_initial().
const struct packet_handlers * packet_handlers_get | ( | const char * | capability | ) |
Returns the packet handlers variant for 'capability'.
Definition at line 840 of file packets.c.
Referenced by conn_set_capability().
const struct packet_handlers * packet_handlers_initial | ( | void | ) |
Returns the packet handlers variant with no special capability.
Definition at line 823 of file packets.c.
Referenced by init_packet_hashes(), and packet_handlers_get().
bool packet_has_game_info_flag | ( | enum packet_type | type | ) |
Definition at line 574 of file packets_gen.c.
Referenced by conn_reset_delta_state().
void packet_header_init | ( | struct packet_header * | packet_header | ) |
Set the packet header field lengths used for the login protocol, before the capability of the connection could be checked.
NB: These values cannot be changed for backward compatibility reasons.
Definition at line 617 of file packets.c.
Referenced by connection_common_init().
const char * packet_name | ( | enum packet_type | type | ) |
Definition at line 47 of file packets_gen.c.
Referenced by client_packet_input(), get_packet_from_connection_raw(), send_packet_data(), and server_packet_input().
Call when there is no longer a requirement for protocol processing. All connections must have been closed.
Definition at line 900 of file packets.c.
Referenced by at_exit(), and close_connections_and_socket().
void post_receive_packet_server_join_reply | ( | struct connection * | pconn, |
const struct packet_server_join_reply * | packet | ||
) |
Modify if needed the packet header field lengths.
Definition at line 652 of file packets.c.
Referenced by receive_packet_server_join_reply_100().
void post_send_packet_server_join_reply | ( | struct connection * | pconn, |
const struct packet_server_join_reply * | packet | ||
) |
Modify if needed the packet header field lengths.
Definition at line 640 of file packets.c.
Referenced by send_packet_server_join_reply_100().
void pre_send_packet_player_attribute_chunk | ( | struct connection * | pc, |
struct packet_player_attribute_chunk * | packet | ||
) |
Test and log for sending player attribute_block
Definition at line 793 of file packets.c.
Referenced by send_packet_player_attribute_chunk_100().
void remove_packet_from_buffer | ( | struct socket_packet_buffer * | buffer | ) |
Split the attribute block into chunks and send them over pconn.
Definition at line 746 of file packets.c.
Referenced by attribute_flush(), handle_player_attribute_block(), and send_all_info().
int send_packet_data | ( | struct connection * | pc, |
unsigned char * | data, | ||
int | len, | ||
enum packet_type | packet_type | ||
) |
It returns the request id of the outgoing packet (or 0 if is_server()).