File: protocol.h

package info (click to toggle)
freespace2 3.7.0%2Brepack-2
  • links: PTS, VCS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd
  • size: 22,848 kB
  • ctags: 41,897
  • sloc: cpp: 369,931; makefile: 1,060; xml: 129; sh: 112
file content (89 lines) | stat: -rw-r--r-- 1,921 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Protocol.h
// Protocol Definitions for FS2Open PXO
// Derek Meek
// 2-14-2003

// ############## ATTENTION ##########
// Licensed under the Academic Free License version 2.0
// View License at http://www.opensource.org/licenses/afl-2.0.php
// ###################################



#if !defined(__pxo_protocol_h_)
#define __pxo_protocol_h_


#include "globalincs/pstypes.h"
#include "globalincs/globals.h"


#define PXO_PROTO_VER "2.0"


// Packet IDs
#define PCKT_ID_FIRST				0x00

#define PCKT_SLIST_REQUEST			0x01
#define PCKT_SLIST_REPLY			0x02
#define PCKT_SLIST_HB				0x03
#define PCKT_LOGIN_AUTH				0x04
#define PCKT_LOGIN_REPLY			0x05
#define PCKT_MISSIONS_RQST			0x06
#define PCKT_MISSIONS_REPLY			0x07
#define PCKT_TABLES_RQST			0x08
#define PCKT_TABLES_REPLY			0x09
#define PCKT_PILOT_GET				0x0a
#define PCKT_PILOT_REPLY			0x0b
#define PCKT_PILOT_UPDATE			0x0c
#define PCKT_PILOT_UREPLY			0x0d
#define PCKT_PING					0x0e
#define PCKT_PONG					0x0f

#define PCKT_MISSION_CHECK			0x10
#define PCKT_MCHECK_REPLY			0x11
#define PCKT_BANLIST_RQST			0x12
#define PCKT_BANLIST_RPLY			0x13
#define PCKT_NETOWRK_WALL			0x14
#define PCKT_VALID_SID_RQST			0x15
#define PCKT_VALID_SID_REPLY		0x16
#define PCKT_CHAT_CHANNEL_UPD		0x17
#define PCKT_CHAT_CHAN_COUNT_RQST	0x18
#define PCKT_CHAT_CHAN_COUNT_REPLY	0x19
#define PCKT_SLIST_HB_2				0x1a
#define PCKT_SERVER_DISCONNECT		0x1b
#define PCKT_DUP_LOGIN_RQST			0x1c
#define PCKT_DUP_LOGIN_REPLY		0x1d
#define PCKT_SLIST_REQUEST_FILTER	0x1e
#define PCKT_SERVER_START			0x1f

#define PCKT_SERVER_UPDATE			0x20

#define PCKT_ID_LAST				0x21

#define PCKT_INVALID				0xff

#define VALID_PACKET_ID(p)			(((p) > PCKT_ID_FIRST) && ((p) < PCKT_ID_LAST))



struct crc_valid_status {
	char name[NAME_LENGTH];
	uint crc32;
	ubyte valid;
};

struct file_record
{
	char name[33];
	uint crc32;
};

struct fs2open_ship_typekill
{
	char name[NAME_LENGTH];
	ushort kills;
};


#endif