Crossfire Server, Trunk  R21024
sockproto.h
Go to the documentation of this file.
1 /* image.c */
2 int is_valid_faceset(int fsn);
3 void set_face_mode_cmd(char *buf, int len, socket_struct *ns);
4 void send_face_cmd(char *buff, int len, socket_struct *ns);
5 void esrv_send_face(socket_struct *ns, uint16_t face_num, int nocache);
7 void send_image_sums(socket_struct *ns, char *params);
8 /* info.c */
9 void print_ext_msg(socket_struct *ns, int color, uint8_t type, uint8_t subtype, const char *message);
10 void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message);
11 void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format, ...);
12 void ext_info_map(int color, const mapstruct *map, uint8_t type, uint8_t subtype, const char *str1);
13 void ext_info_map_except(int color, const mapstruct *map, const object *op, uint8_t type, uint8_t subtype, const char *str1);
14 void ext_info_map_except2(int color, const mapstruct *map, const object *op1, const object *op2, int type, int subtype, const char *str1);
15 void rangetostring(const object *pl, char *obuf, size_t len);
16 void set_title(const object *pl, char *buf, size_t len);
17 void magic_mapping_mark(object *pl, char *map_mark, int strength);
18 void draw_magic_map(object *pl);
19 /* init.c */
20 void init_connection(socket_struct *ns, const char *from_ip);
22 void init_server(void);
23 void free_all_newserver(void);
26 /* item.c */
27 void esrv_draw_look(object *pl);
28 void esrv_send_inventory(object *pl, object *op);
29 void esrv_update_item(int flags, object *pl, object *op);
30 void esrv_send_item(object *pl, object *op);
31 void esrv_del_item(player *pl, object *ob);
32 void examine_cmd(char *buf, int len, player *pl);
33 void apply_cmd(char *buf, int len, player *pl);
34 void lock_item_cmd(uint8_t *data, int len, player *pl);
35 void mark_item_cmd(uint8_t *data, int len, player *pl);
36 void look_at(object *op, int dx, int dy);
37 void look_at_cmd(char *buf, int len, player *pl);
38 void esrv_move_object(object *pl, tag_t to, tag_t tag, long nrof);
39 void inscribe_scroll_cmd(char *buf, int len, player *pl);
40 /* loop.c */
41 void request_info_cmd(char *buf, int len, socket_struct *ns);
43 void watchdog(void);
44 void do_server(void);
45 void update_players(void);
46 /* lowlevel.c */
47 void SockList_Init(SockList *sl);
48 void SockList_Term(SockList *sl);
49 void SockList_Reset(SockList *sl);
51 void SockList_AddChar(SockList *sl, char c);
52 void SockList_AddShort(SockList *sl, uint16_t data);
53 void SockList_AddInt(SockList *sl, uint32_t data);
54 void SockList_AddInt64(SockList *sl, uint64_t data);
55 size_t SockList_Avail(const SockList *sl);
56 void SockList_AddString(SockList *sl, const char *data);
57 void SockList_AddData(SockList *sl, const void *data, size_t len);
58 void SockList_AddLen8Data(SockList *sl, const void *data, size_t len);
59 void SockList_AddLen16Data(SockList *sl, const void *data, size_t len);
60 void SockList_AddPrintf(SockList *sl, const char *format, ...);
63 int GetInt_String(const unsigned char *data);
64 short GetShort_String(const unsigned char *data);
65 int SockList_ReadPacket(int fd, SockList *sl, int len);
67 void write_cs_stats(void);
68 /* metaserver.c */
69 void metaserver_init(void);
70 void metaserver_update(void);
71 int metaserver2_init(void);
72 void *metaserver2_thread(void *junk);
73 /* request.c */
74 void set_up_cmd(char *buf, int len, socket_struct *ns);
75 void add_me_cmd(char *buf, int len, socket_struct *ns);
76 void toggle_extended_infos_cmd(char *buf, int len, socket_struct *ns);
77 void toggle_extended_text_cmd(char *buf, int len, socket_struct *ns);
78 void ask_smooth_cmd(char *buf, int len, socket_struct *ns);
79 void new_player_cmd(uint8_t *buf, int len, player *pl);
80 void reply_cmd(char *buf, int len, player *pl);
81 void version_cmd(char *buf, int len, socket_struct *ns);
82 void set_sound_cmd(char *buf, int len, socket_struct *ns);
84 void move_cmd(char *buf, int len, player *pl);
85 void send_query(socket_struct *ns, uint8_t flags, const char *text);
87 void esrv_new_player(player *pl, uint32_t weight);
88 void esrv_send_animation(socket_struct *ns, short anim_num);
89 void draw_client_map2(object *pl);
90 void draw_client_map(object *pl);
91 void esrv_map_scroll(socket_struct *ns, int dx, int dy);
92 void send_plugin_custom_message(object *pl, char *buf);
93 void send_exp_table(socket_struct *ns, char *params);
94 void send_skill_info(socket_struct *ns, char *params);
95 void send_spell_paths(socket_struct *ns, char *params);
96 void send_race_list(socket_struct *ns, char *params);
97 void send_race_info(socket_struct *ns, char *params);
98 void send_class_list(socket_struct *ns, char *params);
99 void send_class_info(socket_struct *ns, char *params);
101 void esrv_remove_spell(player *pl, object *spell);
102 void esrv_send_pickup(player *pl);
103 void esrv_add_spells(player *pl, object *spell);
104 void send_tick(player *pl);
105 void send_file(socket_struct *ns, const char *file);
106 void account_login_cmd(char *buf, int len, socket_struct *ns);
107 void account_new_cmd(char *buf, int len, socket_struct *ns);
108 void account_add_player_cmd(char *buf, int len, socket_struct *ns);
109 void account_play_cmd(char *buf, int len, socket_struct *ns);
111 void create_player_cmd(char *buf, int len, socket_struct *ns);
112 void account_password(char *buf, int len, socket_struct *ns);
113 /* requestinfo.c */
115 void send_map_info(socket_struct *ns);
116 /* sounds.c */
117 void play_sound_player_only(player *pl, int8_t sound_type, object *emitter, int dir, const char *action);
118 void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action);
119 void send_background_music(player *pl, const char *music);
120 void player_update_bg_music(object *player);
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)
Definition: main.c:315
void SockList_AddPrintf(SockList *sl, const char *format,...)
Definition: lowlevel.c:194
Definition: player.h:92
void do_server(void)
Definition: loop.c:528
void SockList_Reset(SockList *sl)
Definition: lowlevel.c:66
void esrv_send_face(socket_struct *ns, uint16_t face_num, int nocache)
Definition: image.c:70
void * metaserver2_thread(void *junk)
Definition: metaserver.c:505
void SockList_Init(SockList *sl)
Definition: lowlevel.c:48
void esrv_send_item(object *pl, object *op)
Definition: main.c:339
void set_face_mode_cmd(char *buf, int len, socket_struct *ns)
void account_login_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:2050
unsigned char uint8_t
Definition: win32.h:161
void request_info_cmd(char *buf, int len, socket_struct *ns)
Definition: loop.c:132
void SockList_ResetRead(SockList *sl)
Definition: lowlevel.c:75
int GetInt_String(const unsigned char *data)
Definition: lowlevel.c:246
void mark_item_cmd(uint8_t *data, int len, player *pl)
Definition: item.c:723
void look_at_cmd(char *buf, int len, player *pl)
Definition: item.c:819
void version_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:581
void metaserver_update(void)
Definition: metaserver.c:49
void esrv_send_animation(socket_struct *ns, short anim_num)
Definition: request.c:883
void print_ext_msg(socket_struct *ns, int color, uint8_t type, uint8_t subtype, const char *message)
Definition: info.c:49
void esrv_update_item(int flags, object *pl, object *op)
Definition: main.c:342
void magic_mapping_mark(object *pl, char *map_mark, int strength)
Definition: info.c:393
void send_map_info(socket_struct *ns)
Definition: requestinfo.c:404
void send_image_sums(socket_struct *ns, char *params)
Definition: image.c:139
void init_server(void)
Definition: init.c:262
void SockList_AddShort(SockList *sl, uint16_t data)
Definition: lowlevel.c:108
void SockList_AddLen16Data(SockList *sl, const void *data, size_t len)
Definition: lowlevel.c:183
void esrv_send_inventory(object *pl, object *op)
Definition: item.c:307
void update_players(void)
Definition: loop.c:666
void send_account_players(socket_struct *ns)
Definition: request.c:1874
void new_player_cmd(uint8_t *buf, int len, player *pl)
Definition: request.c:447
void SockList_AddInt(SockList *sl, uint32_t data)
Definition: lowlevel.c:119
void draw_magic_map(object *pl)
Definition: info.c:440
void inscribe_scroll_cmd(char *buf, int len, player *pl)
Definition: item.c:908
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
Definition: main.c:310
void send_skill_info(socket_struct *ns, char *params)
Definition: requestinfo.c:67
void esrv_add_spells(player *pl, object *spell)
Definition: request.c:1751
void send_class_list(socket_struct *ns, char *params)
Definition: requestinfo.c:359
void free_newsocket(socket_struct *ns)
Definition: init.c:413
void free_all_newserver(void)
Definition: init.c:395
void esrv_del_item(player *pl, object *ob)
Definition: main.c:355
void map_newmap_cmd(socket_struct *ns)
Definition: request.c:615
void esrv_new_player(player *pl, uint32_t weight)
Definition: request.c:856
void draw_client_map2(object *pl)
Definition: request.c:1261
void send_plugin_custom_message(object *pl, char *buf)
Definition: request.c:1548
void SockList_AddData(SockList *sl, const void *data, size_t len)
Definition: lowlevel.c:159
int is_valid_faceset(int fsn)
Definition: image.c:563
void send_query(socket_struct *ns, uint8_t flags, const char *text)
Definition: request.c:674
void send_exp_table(socket_struct *ns, char *params)
Definition: requestinfo.c:121
void send_background_music(player *pl, const char *music)
Definition: sounds.c:132
short GetShort_String(const unsigned char *data)
Definition: lowlevel.c:250
void SockList_Term(SockList *sl)
Definition: lowlevel.c:58
void account_password(char *buf, int len, socket_struct *ns)
Definition: request.c:2879
void init_listening_socket(socket_struct *ns)
Definition: init.c:171
void ext_info_map_except(int color, const mapstruct *map, const object *op, uint8_t type, uint8_t subtype, const char *str1)
Definition: info.c:185
void SockList_AddString(SockList *sl, const char *data)
Definition: lowlevel.c:149
void look_at(object *op, int dx, int dy)
Definition: item.c:754
void account_new_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:2176
size_t SockList_Avail(const SockList *sl)
Definition: lowlevel.c:238
void send_race_info(socket_struct *ns, char *params)
Definition: requestinfo.c:313
uint32_t tag_t
Definition: object.h:12
unsigned __int64 uint64_t
Definition: win32.h:167
void send_image_info(socket_struct *ns)
Definition: image.c:112
void esrv_map_scroll(socket_struct *ns, int dx, int dy)
Definition: request.c:1510
void send_class_info(socket_struct *ns, char *params)
Definition: requestinfo.c:380
unsigned short uint16_t
Definition: win32.h:163
void set_sound_cmd(char *buf, int len, socket_struct *ns)
void SockList_AddChar(SockList *sl, char c)
Definition: lowlevel.c:98
void set_up_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:93
static const flag_definition flags[]
void draw_client_map(object *pl)
Definition: request.c:1449
unsigned int uint32_t
Definition: win32.h:162
void toggle_extended_infos_cmd(char *buf, int len, socket_struct *ns)
void esrv_draw_look(object *pl)
Definition: item.c:187
void play_sound_player_only(player *pl, int8_t sound_type, object *emitter, int dir, const char *action)
Definition: sounds.c:51
void init_connection(socket_struct *ns, const char *from_ip)
Definition: init.c:83
signed char int8_t
Definition: win32.h:158
void send_tick(player *pl)
Definition: request.c:1810
void send_spell_paths(socket_struct *ns, char *params)
Definition: requestinfo.c:97
void lock_item_cmd(uint8_t *data, int len, player *pl)
Definition: item.c:671
void write_cs_stats(void)
bool handle_client(socket_struct *ns, player *pl)
Definition: loop.c:234
void ask_smooth_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:423
void SockList_AddLen8Data(SockList *sl, const void *data, size_t len)
Definition: lowlevel.c:171
void esrv_remove_spell(player *pl, object *spell)
Definition: request.c:1614
void send_file(socket_struct *ns, const char *file)
Definition: requestinfo.c:443
void toggle_extended_text_cmd(char *buf, int len, socket_struct *ns)
void examine_cmd(char *buf, int len, player *pl)
Definition: item.c:612
void ext_info_map_except2(int color, const mapstruct *map, const object *op1, const object *op2, int type, int subtype, const char *str1)
Definition: info.c:211
void apply_cmd(char *buf, int len, player *pl)
Definition: item.c:631
void account_add_player_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:2284
void esrv_send_pickup(player *pl)
Definition: request.c:1637
void watchdog(void)
void final_free_player(player *pl)
Definition: init.c:444
void player_update_bg_music(object *player)
void add_me_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:347
void set_title(const object *pl, char *buf, size_t len)
Definition: info.c:300
void send_race_list(socket_struct *ns, char *params)
Definition: requestinfo.c:292
void reply_cmd(char *buf, int len, player *pl)
Definition: request.c:509
void send_new_char_info(socket_struct *ns)
Definition: requestinfo.c:484
void metaserver_init(void)
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
Definition: sounds.c:101
void SockList_AddStringBuffer(SockList *sl, StringBuffer *sb)
Definition: lowlevel.c:217
int metaserver2_init(void)
Definition: metaserver.c:163
void rangetostring(const object *pl, char *obuf, size_t len)
Definition: info.c:230
void esrv_update_spells(player *pl)
Definition: main.c:358
void SockList_AddInt64(SockList *sl, uint64_t data)
Definition: lowlevel.c:132
Definition: map.h:325
void SockList_NullTerminate(SockList *sl)
Definition: lowlevel.c:229
void ext_info_map(int color, const mapstruct *map, uint8_t type, uint8_t subtype, const char *str1)
Definition: main.c:325
void esrv_update_stats(player *pl)
Definition: request.c:725
int SockList_ReadPacket(int fd, SockList *sl, int len)
Definition: lowlevel.c:267
void send_face_cmd(char *buff, int len, socket_struct *ns)
Definition: image.c:43
void move_cmd(char *buf, int len, player *pl)
Definition: request.c:636
void create_player_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:2500
void Send_With_Handling(socket_struct *ns, SockList *sl)
Definition: lowlevel.c:434
void esrv_move_object(object *pl, tag_t to, tag_t tag, long nrof)
Definition: item.c:843
void account_play_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:2413