libspades
Ace of Spades library
protocolGamma.h
1
10
11#ifndef LIBSPADES_PROTOCOLGAMMA_H
12#define LIBSPADES_PROTOCOLGAMMA_H
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17#include "protocol.h"
18
19#ifndef PACK_GCC
20#pragma pack(push, 1)
21#endif
22
23enum GammaPacketType {
24 GammaPacketTypeClientHello = 0, /* Client-->Server */
25 GammaPacketTypeServerHello = 1, /* Client-->Server */
26};
27
28/* core protocol packet structs */
29
34struct LIBSPADES_PACKED GammaPacketClientHello {
35 uint8_t packetID;
36 uint32_t supportedGammaVersions[VARIABLE_LENGTH];
39};
40
44struct LIBSPADES_PACKED GammaPacketServerHello {
45 uint8_t packetID;
46 uint32_t gammaVersion;
54};
55
57 uint8_t packetID;
58 uint32_t supportedGammaVersions[VARIABLE_LENGTH];
62};
63
67struct LIBSPADES_PACKED GammaPacketListSupportedExtensions {
68 uint8_t packetID;
69 uint8_t supportedExtensionsBitmask[VARIABLE_LENGTH];
71};
72
73struct LIBSPADES_PACKED GammaPacketWorldUpdate {
74 uint8_t packetID;
75};
76
77#ifndef PACK_GCC
78#pragma pack(pop)
79#endif
80
81#ifdef __cplusplus
82}
83#endif
84#endif
Sent by the client directly after DTLS connection to negotiate the version of the Gamma protocol to b...
Definition protocolGamma.h:34
uint8_t packetID
0 (Client-->Server)
Definition protocolGamma.h:35
uint32_t supportedGammaVersions[VARIABLE_LENGTH]
A list of all Gamma protocol versions the client supports and is willing to use, ordered from most pr...
Definition protocolGamma.h:36
Definition protocolGamma.h:67
uint8_t supportedExtensionsBitmask[VARIABLE_LENGTH]
A bitmask of all Gamma extensions the peer supports and is willing to use.
Definition protocolGamma.h:69
uint8_t packetID
2 (Client<->Server)
Definition protocolGamma.h:68
uint32_t supportedGammaVersions[VARIABLE_LENGTH]
A list of all CIMF compression algorithms the client supports and is willing to use,...
Definition protocolGamma.h:58
uint8_t packetID
2 (Client-->Server)
Definition protocolGamma.h:57
Sent in response to ClientHello to set the version of the Gamma protocol to use.
Definition protocolGamma.h:44
uint32_t gammaVersion
The version of the Gamma protocol which will be used by the connection.
Definition protocolGamma.h:46
uint8_t packetID
1 (Client<--Server)
Definition protocolGamma.h:45
Definition protocolGamma.h:73
uint8_t packetID
X (Client<--Server)
Definition protocolGamma.h:74