Freeciv-3.2
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
dataio_raw.h File Reference
#include "bitvector.h"
#include "support.h"

Go to the source code of this file.

Data Structures

struct  data_in
 
struct  raw_data_out
 
struct  plocation
 

Macros

#define dio_get_estring_raw   dio_get_string_raw
 
#define dio_put_estring_raw   dio_put_string_raw
 
#define DIO_BV_GET(pdin, location, bv)    dio_get_memory_raw((pdin), (bv).vec, sizeof((bv).vec))
 
#define DIO_GET(f, d, l, ...)   dio_get_##f##_raw(d, ## __VA_ARGS__)
 
#define DIO_BV_PUT(pdout, location, bv)    dio_put_memory_raw((pdout), (bv).vec, sizeof((bv).vec))
 
#define DIO_PUT(f, d, l, ...)   dio_put_##f##_raw(d, ## __VA_ARGS__)
 

Typedefs

typedef char *(* DIO_PUT_CONV_FUN) (const char *src, size_t *length)
 
typedef bool(* DIO_GET_CONV_FUN) (char *dst, size_t ndst, const char *src, size_t nsrc)
 

Enumerations

enum  data_type {
  DIOT_UINT8 , DIOT_UINT16 , DIOT_UINT32 , DIOT_SINT8 ,
  DIOT_SINT16 , DIOT_SINT32 , DIOT_LAST
}
 
enum  plocation_kind { PADR_FIELD , PADR_ELEMENT }
 

Functions

struct plocationplocation_field_new (char *name)
 
struct plocationplocation_elem_new (int number)
 
const charplocation_name (const struct plocation *loc)
 
void dio_set_put_conv_callback (DIO_PUT_CONV_FUN fun)
 
void dio_set_get_conv_callback (DIO_GET_CONV_FUN fun)
 
bool dataio_get_conv_callback (char *dst, size_t ndst, const char *src, size_t nsrc)
 
void dio_output_init (struct raw_data_out *dout, void *destination, size_t dest_size)
 
void dio_output_rewind (struct raw_data_out *dout)
 
size_t dio_output_used (struct raw_data_out *dout)
 
void dio_input_init (struct data_in *dout, const void *src, size_t src_size)
 
void dio_input_rewind (struct data_in *din)
 
size_t dio_input_remaining (struct data_in *din)
 
bool dio_input_skip (struct data_in *din, size_t size)
 
size_t data_type_size (enum data_type type)
 
bool dio_get_type_raw (struct data_in *din, enum data_type type, int *dest) fc__attribute((nonnull(3)))
 
bool dio_get_uint8_raw (struct data_in *din, int *dest) fc__attribute((nonnull(2)))
 
bool dio_get_uint16_raw (struct data_in *din, int *dest) fc__attribute((nonnull(2)))
 
bool dio_get_uint32_raw (struct data_in *din, int *dest) fc__attribute((nonnull(2)))
 
bool dio_get_sint8_raw (struct data_in *din, int *dest) fc__attribute((nonnull(2)))
 
bool dio_get_sint16_raw (struct data_in *din, int *dest) fc__attribute((nonnull(2)))
 
bool dio_get_sint32_raw (struct data_in *din, int *dest) fc__attribute((nonnull(2)))
 
bool dio_get_bool8_raw (struct data_in *din, bool *dest) fc__attribute((nonnull(2)))
 
bool dio_get_bool32_raw (struct data_in *din, bool *dest) fc__attribute((nonnull(2)))
 
bool dio_get_ufloat_raw (struct data_in *din, float *dest, int float_factor) fc__attribute((nonnull(2)))
 
bool dio_get_sfloat_raw (struct data_in *din, float *dest, int float_factor) fc__attribute((nonnull(2)))
 
bool dio_get_memory_raw (struct data_in *din, void *dest, size_t dest_size) fc__attribute((nonnull(2)))
 
bool dio_get_string_raw (struct data_in *din, char *dest, size_t max_dest_size) fc__attribute((nonnull(2)))
 
bool dio_get_cm_parameter_raw (struct data_in *din, struct cm_parameter *param) fc__attribute((nonnull(2)))
 
bool dio_get_worklist_raw (struct data_in *din, struct worklist *pwl) fc__attribute((nonnull(2)))
 
bool dio_get_unit_order_raw (struct data_in *din, struct unit_order *order) fc__attribute((nonnull(2)))
 
bool dio_get_requirement_raw (struct data_in *din, struct requirement *preq) fc__attribute((nonnull(2)))
 
bool dio_get_action_probability_raw (struct data_in *din, struct act_prob *aprob) fc__attribute((nonnull(2)))
 
bool dio_get_uint8_vec8_raw (struct data_in *din, int **values, int stop_value) fc__attribute((nonnull(2)))
 
bool dio_get_uint16_vec8_raw (struct data_in *din, int **values, int stop_value) fc__attribute((nonnull(2)))
 
int dio_put_type_raw (struct raw_data_out *dout, enum data_type type, int value)
 
int dio_put_uint8_raw (struct raw_data_out *dout, int value)
 
int dio_put_uint16_raw (struct raw_data_out *dout, int value)
 
int dio_put_uint32_raw (struct raw_data_out *dout, int value)
 
int dio_put_sint8_raw (struct raw_data_out *dout, int value)
 
int dio_put_sint16_raw (struct raw_data_out *dout, int value)
 
int dio_put_sint32_raw (struct raw_data_out *dout, int value)
 
int dio_put_bool8_raw (struct raw_data_out *dout, bool value)
 
int dio_put_bool32_raw (struct raw_data_out *dout, bool value)
 
int dio_put_ufloat_raw (struct raw_data_out *dout, float value, int float_factor)
 
int dio_put_sfloat_raw (struct raw_data_out *dout, float value, int float_factor)
 
int dio_put_memory_raw (struct raw_data_out *dout, const void *value, size_t size)
 
int dio_put_string_raw (struct raw_data_out *dout, const char *value)
 
int dio_put_cm_parameter_raw (struct raw_data_out *dout, const struct cm_parameter *param)
 
int dio_put_worklist_raw (struct raw_data_out *dout, const struct worklist *pwl)
 
int dio_put_unit_order_raw (struct raw_data_out *dout, const struct unit_order *order)
 
int dio_put_requirement_raw (struct raw_data_out *dout, const struct requirement *preq)
 
int dio_put_action_probability_raw (struct raw_data_out *dout, const struct act_prob *aprob)
 
int dio_put_uint8_vec8_raw (struct raw_data_out *dout, int *values, int stop_value)
 
int dio_put_uint16_vec8_raw (struct raw_data_out *dout, int *values, int stop_value)
 

Macro Definition Documentation

◆ DIO_BV_GET

#define DIO_BV_GET (   pdin,
  location,
  bv 
)     dio_get_memory_raw((pdin), (bv).vec, sizeof((bv).vec))

Definition at line 168 of file dataio_raw.h.

◆ DIO_BV_PUT

#define DIO_BV_PUT (   pdout,
  location,
  bv 
)     dio_put_memory_raw((pdout), (bv).vec, sizeof((bv).vec))

Definition at line 208 of file dataio_raw.h.

◆ DIO_GET

#define DIO_GET (   f,
  d,
  l,
  ... 
)    dio_get_##f##_raw(d, ## __VA_ARGS__)

Definition at line 171 of file dataio_raw.h.

◆ dio_get_estring_raw

#define dio_get_estring_raw   dio_get_string_raw

Definition at line 162 of file dataio_raw.h.

◆ DIO_PUT

#define DIO_PUT (   f,
  d,
  l,
  ... 
)    dio_put_##f##_raw(d, ## __VA_ARGS__)

Definition at line 211 of file dataio_raw.h.

◆ dio_put_estring_raw

#define dio_put_estring_raw   dio_put_string_raw

Definition at line 163 of file dataio_raw.h.

Typedef Documentation

◆ DIO_GET_CONV_FUN

typedef bool(* DIO_GET_CONV_FUN) (char *dst, size_t ndst, const char *src, size_t nsrc)

Definition at line 94 of file dataio_raw.h.

◆ DIO_PUT_CONV_FUN

typedef char *(* DIO_PUT_CONV_FUN) (const char *src, size_t *length)

Definition at line 91 of file dataio_raw.h.

Enumeration Type Documentation

◆ data_type

Enumerator
DIOT_UINT8 
DIOT_UINT16 
DIOT_UINT32 
DIOT_SINT8 
DIOT_SINT16 
DIOT_SINT32 
DIOT_LAST 

Definition at line 43 of file dataio_raw.h.

◆ plocation_kind

Enumerator
PADR_FIELD 
PADR_ELEMENT 

Definition at line 55 of file dataio_raw.h.

Function Documentation

◆ data_type_size()

size_t data_type_size ( enum data_type  type)

Return the size of the data_type in bytes.

Definition at line 229 of file dataio_raw.c.

Referenced by get_packet_from_connection_raw().

◆ dataio_get_conv_callback()

bool dataio_get_conv_callback ( char dst,
size_t  ndst,
const char src,
size_t  nsrc 
)

Call the get_conv callback.

Definition at line 139 of file dataio_raw.c.

◆ dio_get_action_probability_raw()

bool dio_get_action_probability_raw ( struct data_in din,
struct act_prob aprob 
)

De-serialize an action probability.

Definition at line 1018 of file dataio_raw.c.

◆ dio_get_bool32_raw()

bool dio_get_bool32_raw ( struct data_in din,
bool dest 
)

Take boolean value from 32 bits.

Definition at line 707 of file dataio_raw.c.

◆ dio_get_bool8_raw()

bool dio_get_bool8_raw ( struct data_in din,
bool dest 
)

Take boolean value from 8 bits.

Definition at line 687 of file dataio_raw.c.

Referenced by cma_get_parameter(), dio_get_cm_parameter_raw(), and dio_get_requirement_raw().

◆ dio_get_cm_parameter_raw()

bool dio_get_cm_parameter_raw ( struct data_in din,
struct cm_parameter param 
)

Get city manager parameters.

Definition at line 868 of file dataio_raw.c.

◆ dio_get_memory_raw()

bool dio_get_memory_raw ( struct data_in din,
void dest,
size_t  dest_size 
)

Take memory block directly.

Definition at line 816 of file dataio_raw.c.

Referenced by attribute_get(), and unserialize_hash().

◆ dio_get_requirement_raw()

bool dio_get_requirement_raw ( struct data_in din,
struct requirement preq 
)

De-serialize a requirement.

Definition at line 1052 of file dataio_raw.c.

◆ dio_get_sfloat_raw()

bool dio_get_sfloat_raw ( struct data_in din,
float dest,
int  float_factor 
)

Get a signed float number, which have been multiplied by 'float_factor' and encoded into a sint32 by dio_put_sfloat().

Definition at line 744 of file dataio_raw.c.

◆ dio_get_sint16_raw()

bool dio_get_sint16_raw ( struct data_in din,
int dest 
)

Take value from 16 bits.

Definition at line 777 of file dataio_raw.c.

Referenced by cma_get_parameter(), dio_get_cm_parameter_raw(), dio_get_type_raw(), dio_get_unit_order_raw(), and unserialize_hash().

◆ dio_get_sint32_raw()

bool dio_get_sint32_raw ( struct data_in din,
int dest 
)

Take value from 32 bits.

Definition at line 795 of file dataio_raw.c.

Referenced by dio_get_requirement_raw(), dio_get_sfloat_raw(), dio_get_type_raw(), and dio_get_unit_order_raw().

◆ dio_get_sint8_raw()

bool dio_get_sint8_raw ( struct data_in din,
int dest 
)

Take value from 8 bits.

Definition at line 759 of file dataio_raw.c.

Referenced by dio_get_type_raw(), and dio_get_unit_order_raw().

◆ dio_get_string_raw()

bool dio_get_string_raw ( struct data_in din,
char dest,
size_t  max_dest_size 
)

Take string. Conversion callback is used.

Definition at line 831 of file dataio_raw.c.

Referenced by get_lan_server_list().

◆ dio_get_type_raw()

bool dio_get_type_raw ( struct data_in din,
enum data_type  type,
int dest 
)

Receive value using 'size' bits to dest.

Definition at line 661 of file dataio_raw.c.

Referenced by get_packet_from_connection_raw(), and packet_check().

◆ dio_get_ufloat_raw()

bool dio_get_ufloat_raw ( struct data_in din,
float dest,
int  float_factor 
)

Get an unsigned float number, which have been multiplied by 'float_factor' and encoded into an uint32 by dio_put_ufloat_raw().

Definition at line 728 of file dataio_raw.c.

◆ dio_get_uint16_raw()

bool dio_get_uint16_raw ( struct data_in din,
int dest 
)

Receive uint16 value to dest.

Definition at line 619 of file dataio_raw.c.

Referenced by dio_get_cm_parameter_raw(), dio_get_sint16_raw(), dio_get_type_raw(), dio_get_uint16_vec8_raw(), and remove_packet_from_buffer().

◆ dio_get_uint16_vec8_raw()

bool dio_get_uint16_vec8_raw ( struct data_in din,
int **  values,
int  stop_value 
)

Receive vector of uint16 values.

Definition at line 993 of file dataio_raw.c.

◆ dio_get_uint32_raw()

bool dio_get_uint32_raw ( struct data_in din,
int dest 
)

◆ dio_get_uint8_raw()

bool dio_get_uint8_raw ( struct data_in din,
int dest 
)

◆ dio_get_uint8_vec8_raw()

bool dio_get_uint8_vec8_raw ( struct data_in din,
int **  values,
int  stop_value 
)

Take vector of 8 bit values and insert stop_value after them. stop_value does not need to fit in 8 bits.

Definition at line 968 of file dataio_raw.c.

◆ dio_get_unit_order_raw()

bool dio_get_unit_order_raw ( struct data_in din,
struct unit_order order 
)

Take unit_order struct and put it in the provided orders.

Definition at line 906 of file dataio_raw.c.

◆ dio_get_worklist_raw()

bool dio_get_worklist_raw ( struct data_in din,
struct worklist pwl 
)

Take worklist item count and then kind and number for each item, and put them to provided worklist.

Definition at line 932 of file dataio_raw.c.

◆ dio_input_init()

void dio_input_init ( struct data_in din,
const void src,
size_t  src_size 
)

Initializes the input to the given input buffer and the given number of valid input bytes.

Definition at line 202 of file dataio_raw.c.

Referenced by attribute_get(), cma_get_parameter(), get_lan_server_list(), get_lanserver_announcement(), get_packet_from_connection_raw(), remove_packet_from_buffer(), serialize_hash(), and unserialize_hash().

◆ dio_input_remaining()

size_t dio_input_remaining ( struct data_in din)

Return the number of unread bytes.

Definition at line 221 of file dataio_raw.c.

Referenced by dio_get_string_raw(), enough_data(), get_packet_from_connection_raw(), packet_check(), and unserialize_hash().

◆ dio_input_rewind()

void dio_input_rewind ( struct data_in din)

Rewinds the stream so that the get-functions start from the beginning.

Definition at line 213 of file dataio_raw.c.

Referenced by packet_check().

◆ dio_input_skip()

bool dio_input_skip ( struct data_in din,
size_t  size 
)

Skips 'n' bytes.

Definition at line 252 of file dataio_raw.c.

◆ dio_output_init()

void dio_output_init ( struct raw_data_out dout,
void destination,
size_t  dest_size 
)

Initializes the output to the given output buffer and the given buffer size.

Definition at line 171 of file dataio_raw.c.

Referenced by attribute_set(), begin_lanserver_scan(), cma_set_parameter(), send_lanserver_response(), serialize_hash(), server_packet_input(), and unserialize_hash().

◆ dio_output_rewind()

void dio_output_rewind ( struct raw_data_out dout)

Rewinds the stream so that the put-functions start from the beginning.

Definition at line 193 of file dataio_raw.c.

Referenced by server_packet_input().

◆ dio_output_used()

size_t dio_output_used ( struct raw_data_out dout)

Return the maximum number of bytes used.

Definition at line 184 of file dataio_raw.c.

Referenced by begin_lanserver_scan(), cma_set_parameter(), send_lanserver_response(), serialize_hash(), and server_packet_input().

◆ dio_put_action_probability_raw()

int dio_put_action_probability_raw ( struct raw_data_out dout,
const struct act_prob aprob 
)

Serialize an action probability.

Definition at line 1038 of file dataio_raw.c.

◆ dio_put_bool32_raw()

int dio_put_bool32_raw ( struct raw_data_out dout,
bool  value 
)

Insert value 0 or 1 using 32 bits.

Definition at line 398 of file dataio_raw.c.

Referenced by server_packet_input().

◆ dio_put_bool8_raw()

int dio_put_bool8_raw ( struct raw_data_out dout,
bool  value 
)

Insert value 0 or 1 using 8 bits.

Definition at line 386 of file dataio_raw.c.

Referenced by cma_set_parameter(), dio_put_cm_parameter_raw(), and dio_put_requirement_raw().

◆ dio_put_cm_parameter_raw()

int dio_put_cm_parameter_raw ( struct raw_data_out dout,
const struct cm_parameter param 
)

Insert cm_parameter struct.

Definition at line 533 of file dataio_raw.c.

◆ dio_put_memory_raw()

int dio_put_memory_raw ( struct raw_data_out dout,
const void value,
size_t  size 
)

Insert block directly from memory.

Definition at line 499 of file dataio_raw.c.

Referenced by attribute_set(), dio_put_string_raw(), and serialize_hash().

◆ dio_put_requirement_raw()

int dio_put_requirement_raw ( struct raw_data_out dout,
const struct requirement preq 
)

Serialize a requirement.

Definition at line 1078 of file dataio_raw.c.

◆ dio_put_sfloat_raw()

int dio_put_sfloat_raw ( struct raw_data_out dout,
float  value,
int  float_factor 
)

Insert a float number, which is multiplied by 'float_factor' before being encoded into a sint32.

Definition at line 429 of file dataio_raw.c.

◆ dio_put_sint16_raw()

int dio_put_sint16_raw ( struct raw_data_out dout,
int  value 
)

Insert value using 16 bits. May overflow.

Definition at line 366 of file dataio_raw.c.

Referenced by cma_set_parameter(), dio_put_cm_parameter_raw(), dio_put_type_raw(), dio_put_unit_order_raw(), and serialize_hash().

◆ dio_put_sint32_raw()

int dio_put_sint32_raw ( struct raw_data_out dout,
int  value 
)

Insert value using 32 bits. May overflow.

Definition at line 374 of file dataio_raw.c.

Referenced by dio_put_requirement_raw(), dio_put_sfloat_raw(), dio_put_type_raw(), and dio_put_unit_order_raw().

◆ dio_put_sint8_raw()

int dio_put_sint8_raw ( struct raw_data_out dout,
int  value 
)

Insert value using 8 bits. May overflow.

Definition at line 358 of file dataio_raw.c.

Referenced by dio_put_type_raw(), and dio_put_unit_order_raw().

◆ dio_put_string_raw()

int dio_put_string_raw ( struct raw_data_out dout,
const char value 
)

Insert NULL-terminated string. Conversion callback is used if set.

Definition at line 512 of file dataio_raw.c.

Referenced by send_lanserver_response(), and server_packet_input().

◆ dio_put_type_raw()

int dio_put_type_raw ( struct raw_data_out dout,
enum data_type  type,
int  value 
)

Insert value using 'size' bits. May overflow.

Definition at line 331 of file dataio_raw.c.

◆ dio_put_ufloat_raw()

int dio_put_ufloat_raw ( struct raw_data_out dout,
float  value,
int  float_factor 
)

Insert a float number, which is multiplied by 'float_factor' before being encoded into an uint32.

Definition at line 412 of file dataio_raw.c.

◆ dio_put_uint16_raw()

int dio_put_uint16_raw ( struct raw_data_out dout,
int  value 
)

Insert value using 16 bits. May overflow.

Definition at line 287 of file dataio_raw.c.

Referenced by dio_put_cm_parameter_raw(), dio_put_sint16_raw(), dio_put_type_raw(), dio_put_uint16_vec8_raw(), and server_packet_input().

◆ dio_put_uint16_vec8_raw()

int dio_put_uint16_vec8_raw ( struct raw_data_out dout,
int values,
int  stop_value 
)

Insert number of values before stop_value using 8 bits. Then insert values using 16 bits for each. stop_value is not required to fit in 16 bits. Actual values may overflow.

Definition at line 474 of file dataio_raw.c.

◆ dio_put_uint32_raw()

int dio_put_uint32_raw ( struct raw_data_out dout,
int  value 
)

Insert value using 32 bits. May overflow.

Definition at line 309 of file dataio_raw.c.

Referenced by attribute_set(), dio_put_bool32_raw(), dio_put_sint32_raw(), dio_put_type_raw(), dio_put_ufloat_raw(), serialize_hash(), and unserialize_hash().

◆ dio_put_uint8_raw()

int dio_put_uint8_raw ( struct raw_data_out dout,
int  value 
)

◆ dio_put_uint8_vec8_raw()

int dio_put_uint8_vec8_raw ( struct raw_data_out dout,
int values,
int  stop_value 
)

Insert number of values before stop_value using 8 bits. Then insert values using 8 bits for each. stop_value is not required to fit in 8 bits. Actual values may overflow.

Definition at line 447 of file dataio_raw.c.

◆ dio_put_unit_order_raw()

int dio_put_unit_order_raw ( struct raw_data_out dout,
const struct unit_order order 
)

Insert the given unit_order struct/

Definition at line 560 of file dataio_raw.c.

◆ dio_put_worklist_raw()

int dio_put_worklist_raw ( struct raw_data_out dout,
const struct worklist pwl 
)

Insert number of worklist items as 8 bit value and then insert 8 bit kind and 8 bit number for each worklist item.

Definition at line 579 of file dataio_raw.c.

◆ dio_set_get_conv_callback()

void dio_set_get_conv_callback ( DIO_GET_CONV_FUN  fun)

Sets string conversion callback to use when getting text.

Definition at line 131 of file dataio_raw.c.

Referenced by charsets_init().

◆ dio_set_put_conv_callback()

void dio_set_put_conv_callback ( DIO_PUT_CONV_FUN  fun)

Sets string conversion callback to be used when putting text.

Definition at line 102 of file dataio_raw.c.

Referenced by charsets_init().

◆ plocation_elem_new()

struct plocation * plocation_elem_new ( int  number)

Create a new address of the location of an array element inside a packet.

Definition at line 1114 of file dataio_raw.c.

Referenced by receive_packet_calendar_info_100(), receive_packet_city_info_100(), receive_packet_city_nationalities_100(), receive_packet_city_rally_point_100(), receive_packet_city_update_counters_100(), receive_packet_conn_ping_info_100(), receive_packet_edit_city_100(), receive_packet_edit_player_100(), receive_packet_endgame_player_100(), receive_packet_endgame_report_100(), receive_packet_game_info_100(), receive_packet_nation_availability_100(), receive_packet_player_info_100(), receive_packet_player_multiplier_100(), receive_packet_ruleset_action_auto_100(), receive_packet_ruleset_action_enabler_100(), receive_packet_ruleset_building_100(), receive_packet_ruleset_choices_100(), receive_packet_ruleset_city_100(), receive_packet_ruleset_clause_100(), receive_packet_ruleset_disaster_100(), receive_packet_ruleset_effect_100(), receive_packet_ruleset_extra_100(), receive_packet_ruleset_game_100(), receive_packet_ruleset_goods_100(), receive_packet_ruleset_government_100(), receive_packet_ruleset_multiplier_100(), receive_packet_ruleset_music_100(), receive_packet_ruleset_nation_100(), receive_packet_ruleset_nation_groups_100(), receive_packet_ruleset_nation_sets_100(), receive_packet_ruleset_resource_100(), receive_packet_ruleset_road_100(), receive_packet_ruleset_specialist_100(), receive_packet_ruleset_tech_100(), receive_packet_ruleset_terrain_100(), receive_packet_ruleset_unit_100(), receive_packet_server_setting_bitwise_100(), receive_packet_server_setting_control_100(), receive_packet_server_setting_enum_100(), receive_packet_unit_actions_100(), receive_packet_unit_info_100(), receive_packet_unit_orders_100(), receive_packet_web_city_info_addition_100(), send_packet_calendar_info_100(), send_packet_city_info_100(), send_packet_city_nationalities_100(), send_packet_city_rally_point_100(), send_packet_city_update_counters_100(), send_packet_conn_ping_info_100(), send_packet_edit_city_100(), send_packet_edit_player_100(), send_packet_endgame_player_100(), send_packet_endgame_report_100(), send_packet_game_info_100(), send_packet_nation_availability_100(), send_packet_player_info_100(), send_packet_player_multiplier_100(), send_packet_ruleset_action_auto_100(), send_packet_ruleset_action_enabler_100(), send_packet_ruleset_building_100(), send_packet_ruleset_choices_100(), send_packet_ruleset_city_100(), send_packet_ruleset_clause_100(), send_packet_ruleset_disaster_100(), send_packet_ruleset_effect_100(), send_packet_ruleset_extra_100(), send_packet_ruleset_game_100(), send_packet_ruleset_goods_100(), send_packet_ruleset_government_100(), send_packet_ruleset_multiplier_100(), send_packet_ruleset_music_100(), send_packet_ruleset_nation_100(), send_packet_ruleset_nation_groups_100(), send_packet_ruleset_nation_sets_100(), send_packet_ruleset_resource_100(), send_packet_ruleset_road_100(), send_packet_ruleset_specialist_100(), send_packet_ruleset_tech_100(), send_packet_ruleset_terrain_100(), send_packet_ruleset_unit_100(), send_packet_server_setting_bitwise_100(), send_packet_server_setting_control_100(), send_packet_server_setting_enum_100(), send_packet_unit_actions_100(), send_packet_unit_info_100(), send_packet_unit_orders_100(), and send_packet_web_city_info_addition_100().

◆ plocation_field_new()

struct plocation * plocation_field_new ( char name)

Create a new address of the location of a field inside a packet.

Definition at line 1100 of file dataio_raw.c.

Referenced by receive_packet_achievement_info_100(), receive_packet_authentication_reply_100(), receive_packet_authentication_req_100(), receive_packet_calendar_info_100(), receive_packet_chat_msg_100(), receive_packet_chat_msg_req_100(), receive_packet_city_buy_100(), receive_packet_city_change_100(), receive_packet_city_change_specialist_100(), receive_packet_city_info_100(), receive_packet_city_make_specialist_100(), receive_packet_city_make_worker_100(), receive_packet_city_name_suggestion_info_100(), receive_packet_city_name_suggestion_req_100(), receive_packet_city_nationalities_100(), receive_packet_city_options_req_100(), receive_packet_city_rally_point_100(), receive_packet_city_refresh_100(), receive_packet_city_remove_100(), receive_packet_city_rename_100(), receive_packet_city_sabotage_list_100(), receive_packet_city_sell_100(), receive_packet_city_short_info_100(), receive_packet_city_update_counters_100(), receive_packet_city_worklist_100(), receive_packet_client_info_100(), receive_packet_conn_info_100(), receive_packet_conn_ping_info_100(), receive_packet_connect_msg_100(), receive_packet_diplomacy_accept_treaty_100(), receive_packet_diplomacy_accept_treaty_req_100(), receive_packet_diplomacy_cancel_meeting_100(), receive_packet_diplomacy_cancel_meeting_req_100(), receive_packet_diplomacy_cancel_pact_100(), receive_packet_diplomacy_create_clause_100(), receive_packet_diplomacy_create_clause_req_100(), receive_packet_diplomacy_init_meeting_100(), receive_packet_diplomacy_init_meeting_req_100(), receive_packet_diplomacy_remove_clause_100(), receive_packet_diplomacy_remove_clause_req_100(), receive_packet_early_chat_msg_100(), receive_packet_edit_city_100(), receive_packet_edit_city_create_100(), receive_packet_edit_city_remove_100(), receive_packet_edit_fogofwar_state_100(), receive_packet_edit_game_100(), receive_packet_edit_mode_100(), receive_packet_edit_object_created_100(), receive_packet_edit_player_100(), receive_packet_edit_player_create_100(), receive_packet_edit_player_remove_100(), receive_packet_edit_player_vision_100(), receive_packet_edit_scenario_desc_100(), receive_packet_edit_startpos_100(), receive_packet_edit_startpos_full_100(), receive_packet_edit_tile_100(), receive_packet_edit_tile_extra_100(), receive_packet_edit_tile_terrain_100(), receive_packet_edit_toggle_fogofwar_100(), receive_packet_edit_unit_100(), receive_packet_edit_unit_create_100(), receive_packet_edit_unit_remove_100(), receive_packet_edit_unit_remove_by_id_100(), receive_packet_endgame_player_100(), receive_packet_endgame_report_100(), receive_packet_game_info_100(), receive_packet_game_load_100(), receive_packet_investigate_finished_100(), receive_packet_investigate_started_100(), receive_packet_map_info_100(), receive_packet_nation_availability_100(), receive_packet_nation_select_req_100(), receive_packet_new_year_100(), receive_packet_nuke_tile_info_100(), receive_packet_page_msg_100(), receive_packet_page_msg_part_100(), receive_packet_play_music_100(), receive_packet_player_attribute_chunk_100(), receive_packet_player_change_government_100(), receive_packet_player_diplstate_100(), receive_packet_player_info_100(), receive_packet_player_multiplier_100(), receive_packet_player_phase_done_100(), receive_packet_player_place_infra_100(), receive_packet_player_rates_100(), receive_packet_player_ready_100(), receive_packet_player_remove_100(), receive_packet_player_research_100(), receive_packet_player_tech_goal_100(), receive_packet_popup_image_100(), receive_packet_report_req_100(), receive_packet_research_info_100(), receive_packet_ruleset_achievement_100(), receive_packet_ruleset_action_100(), receive_packet_ruleset_action_auto_100(), receive_packet_ruleset_action_enabler_100(), receive_packet_ruleset_base_100(), receive_packet_ruleset_building_100(), receive_packet_ruleset_choices_100(), receive_packet_ruleset_city_100(), receive_packet_ruleset_clause_100(), receive_packet_ruleset_control_100(), receive_packet_ruleset_counter_100(), receive_packet_ruleset_description_part_100(), receive_packet_ruleset_disaster_100(), receive_packet_ruleset_effect_100(), receive_packet_ruleset_extra_100(), receive_packet_ruleset_extra_flag_100(), receive_packet_ruleset_game_100(), receive_packet_ruleset_goods_100(), receive_packet_ruleset_government_100(), receive_packet_ruleset_government_ruler_title_100(), receive_packet_ruleset_impr_flag_100(), receive_packet_ruleset_multiplier_100(), receive_packet_ruleset_music_100(), receive_packet_ruleset_nation_100(), receive_packet_ruleset_nation_groups_100(), receive_packet_ruleset_nation_sets_100(), receive_packet_ruleset_resource_100(), receive_packet_ruleset_road_100(), receive_packet_ruleset_select_100(), receive_packet_ruleset_specialist_100(), receive_packet_ruleset_style_100(), receive_packet_ruleset_summary_100(), receive_packet_ruleset_tech_100(), receive_packet_ruleset_tech_class_100(), receive_packet_ruleset_tech_flag_100(), receive_packet_ruleset_terrain_100(), receive_packet_ruleset_terrain_control_100(), receive_packet_ruleset_terrain_flag_100(), receive_packet_ruleset_trade_100(), receive_packet_ruleset_unit_100(), receive_packet_ruleset_unit_bonus_100(), receive_packet_ruleset_unit_class_100(), receive_packet_ruleset_unit_class_flag_100(), receive_packet_ruleset_unit_flag_100(), receive_packet_save_scenario_100(), receive_packet_scenario_description_100(), receive_packet_scenario_info_100(), receive_packet_server_info_100(), receive_packet_server_join_reply_100(), receive_packet_server_join_req_100(), receive_packet_server_setting_bitwise_100(), receive_packet_server_setting_bool_100(), receive_packet_server_setting_const_100(), receive_packet_server_setting_control_100(), receive_packet_server_setting_enum_100(), receive_packet_server_setting_int_100(), receive_packet_server_setting_str_100(), receive_packet_set_topology_100(), receive_packet_single_want_hack_reply_100(), receive_packet_single_want_hack_req_100(), receive_packet_spaceship_info_100(), receive_packet_spaceship_place_100(), receive_packet_start_phase_100(), receive_packet_sync_serial_100(), receive_packet_sync_serial_reply_100(), receive_packet_team_name_info_100(), receive_packet_tile_info_100(), receive_packet_timeout_info_100(), receive_packet_trade_route_info_100(), receive_packet_unit_action_answer_100(), receive_packet_unit_action_query_100(), receive_packet_unit_actions_100(), receive_packet_unit_change_activity_100(), receive_packet_unit_combat_info_100(), receive_packet_unit_do_action_100(), receive_packet_unit_get_actions_100(), receive_packet_unit_info_100(), receive_packet_unit_orders_100(), receive_packet_unit_remove_100(), receive_packet_unit_server_side_agent_set_100(), receive_packet_unit_short_info_100(), receive_packet_unit_sscs_set_100(), receive_packet_unit_type_upgrade_100(), receive_packet_unknown_research_100(), receive_packet_vote_new_100(), receive_packet_vote_remove_100(), receive_packet_vote_resolve_100(), receive_packet_vote_submit_100(), receive_packet_vote_update_100(), receive_packet_web_city_info_addition_100(), receive_packet_web_cma_clear_100(), receive_packet_web_cma_set_100(), receive_packet_web_player_info_addition_100(), receive_packet_web_ruleset_unit_addition_100(), receive_packet_worker_task_100(), send_packet_achievement_info_100(), send_packet_authentication_reply_100(), send_packet_authentication_req_100(), send_packet_calendar_info_100(), send_packet_chat_msg_100(), send_packet_chat_msg_req_100(), send_packet_city_buy_100(), send_packet_city_change_100(), send_packet_city_change_specialist_100(), send_packet_city_info_100(), send_packet_city_make_specialist_100(), send_packet_city_make_worker_100(), send_packet_city_name_suggestion_info_100(), send_packet_city_name_suggestion_req_100(), send_packet_city_nationalities_100(), send_packet_city_options_req_100(), send_packet_city_rally_point_100(), send_packet_city_refresh_100(), send_packet_city_remove_100(), send_packet_city_rename_100(), send_packet_city_sabotage_list_100(), send_packet_city_sell_100(), send_packet_city_short_info_100(), send_packet_city_update_counters_100(), send_packet_city_worklist_100(), send_packet_client_info_100(), send_packet_conn_info_100(), send_packet_conn_ping_info_100(), send_packet_connect_msg_100(), send_packet_diplomacy_accept_treaty_100(), send_packet_diplomacy_accept_treaty_req_100(), send_packet_diplomacy_cancel_meeting_100(), send_packet_diplomacy_cancel_meeting_req_100(), send_packet_diplomacy_cancel_pact_100(), send_packet_diplomacy_create_clause_100(), send_packet_diplomacy_create_clause_req_100(), send_packet_diplomacy_init_meeting_100(), send_packet_diplomacy_init_meeting_req_100(), send_packet_diplomacy_remove_clause_100(), send_packet_diplomacy_remove_clause_req_100(), send_packet_early_chat_msg_100(), send_packet_edit_city_100(), send_packet_edit_city_create_100(), send_packet_edit_city_remove_100(), send_packet_edit_fogofwar_state_100(), send_packet_edit_game_100(), send_packet_edit_mode_100(), send_packet_edit_object_created_100(), send_packet_edit_player_100(), send_packet_edit_player_create_100(), send_packet_edit_player_remove_100(), send_packet_edit_player_vision_100(), send_packet_edit_scenario_desc_100(), send_packet_edit_startpos_100(), send_packet_edit_startpos_full_100(), send_packet_edit_tile_100(), send_packet_edit_tile_extra_100(), send_packet_edit_tile_terrain_100(), send_packet_edit_toggle_fogofwar_100(), send_packet_edit_unit_100(), send_packet_edit_unit_create_100(), send_packet_edit_unit_remove_100(), send_packet_edit_unit_remove_by_id_100(), send_packet_endgame_player_100(), send_packet_endgame_report_100(), send_packet_game_info_100(), send_packet_game_load_100(), send_packet_investigate_finished_100(), send_packet_investigate_started_100(), send_packet_map_info_100(), send_packet_nation_availability_100(), send_packet_nation_select_req_100(), send_packet_new_year_100(), send_packet_nuke_tile_info_100(), send_packet_page_msg_100(), send_packet_page_msg_part_100(), send_packet_play_music_100(), send_packet_player_attribute_chunk_100(), send_packet_player_change_government_100(), send_packet_player_diplstate_100(), send_packet_player_info_100(), send_packet_player_multiplier_100(), send_packet_player_phase_done_100(), send_packet_player_place_infra_100(), send_packet_player_rates_100(), send_packet_player_ready_100(), send_packet_player_remove_100(), send_packet_player_research_100(), send_packet_player_tech_goal_100(), send_packet_popup_image_100(), send_packet_report_req_100(), send_packet_research_info_100(), send_packet_ruleset_achievement_100(), send_packet_ruleset_action_100(), send_packet_ruleset_action_auto_100(), send_packet_ruleset_action_enabler_100(), send_packet_ruleset_base_100(), send_packet_ruleset_building_100(), send_packet_ruleset_choices_100(), send_packet_ruleset_city_100(), send_packet_ruleset_clause_100(), send_packet_ruleset_control_100(), send_packet_ruleset_counter_100(), send_packet_ruleset_description_part_100(), send_packet_ruleset_disaster_100(), send_packet_ruleset_effect_100(), send_packet_ruleset_extra_100(), send_packet_ruleset_extra_flag_100(), send_packet_ruleset_game_100(), send_packet_ruleset_goods_100(), send_packet_ruleset_government_100(), send_packet_ruleset_government_ruler_title_100(), send_packet_ruleset_impr_flag_100(), send_packet_ruleset_multiplier_100(), send_packet_ruleset_music_100(), send_packet_ruleset_nation_100(), send_packet_ruleset_nation_groups_100(), send_packet_ruleset_nation_sets_100(), send_packet_ruleset_resource_100(), send_packet_ruleset_road_100(), send_packet_ruleset_select_100(), send_packet_ruleset_specialist_100(), send_packet_ruleset_style_100(), send_packet_ruleset_summary_100(), send_packet_ruleset_tech_100(), send_packet_ruleset_tech_class_100(), send_packet_ruleset_tech_flag_100(), send_packet_ruleset_terrain_100(), send_packet_ruleset_terrain_control_100(), send_packet_ruleset_terrain_flag_100(), send_packet_ruleset_trade_100(), send_packet_ruleset_unit_100(), send_packet_ruleset_unit_bonus_100(), send_packet_ruleset_unit_class_100(), send_packet_ruleset_unit_class_flag_100(), send_packet_ruleset_unit_flag_100(), send_packet_save_scenario_100(), send_packet_scenario_description_100(), send_packet_scenario_info_100(), send_packet_server_info_100(), send_packet_server_join_reply_100(), send_packet_server_join_req_100(), send_packet_server_setting_bitwise_100(), send_packet_server_setting_bool_100(), send_packet_server_setting_const_100(), send_packet_server_setting_control_100(), send_packet_server_setting_enum_100(), send_packet_server_setting_int_100(), send_packet_server_setting_str_100(), send_packet_set_topology_100(), send_packet_single_want_hack_reply_100(), send_packet_single_want_hack_req_100(), send_packet_spaceship_info_100(), send_packet_spaceship_place_100(), send_packet_start_phase_100(), send_packet_sync_serial_100(), send_packet_sync_serial_reply_100(), send_packet_team_name_info_100(), send_packet_tile_info_100(), send_packet_timeout_info_100(), send_packet_trade_route_info_100(), send_packet_unit_action_answer_100(), send_packet_unit_action_query_100(), send_packet_unit_actions_100(), send_packet_unit_change_activity_100(), send_packet_unit_combat_info_100(), send_packet_unit_do_action_100(), send_packet_unit_get_actions_100(), send_packet_unit_info_100(), send_packet_unit_orders_100(), send_packet_unit_remove_100(), send_packet_unit_server_side_agent_set_100(), send_packet_unit_short_info_100(), send_packet_unit_sscs_set_100(), send_packet_unit_type_upgrade_100(), send_packet_unknown_research_100(), send_packet_vote_new_100(), send_packet_vote_remove_100(), send_packet_vote_resolve_100(), send_packet_vote_submit_100(), send_packet_vote_update_100(), send_packet_web_city_info_addition_100(), send_packet_web_cma_clear_100(), send_packet_web_cma_set_100(), send_packet_web_player_info_addition_100(), send_packet_web_ruleset_unit_addition_100(), and send_packet_worker_task_100().

◆ plocation_name()

const char * plocation_name ( const struct plocation loc)

Give textual description of the location. This might return address of a static buffer next call reuses, so don't expect result to be valid over another call to this.

Definition at line 1130 of file dataio_raw.c.