4 #define RS_MAGIC_LEN (6)
5 #define RS_PROTO_VER_LEN (2)
6 #define RS_MAX_PACKET_LEN (1048)
7 #define RS_LOGIN_LEN (32)
8 #define RS_PARAMS_LEN (979)
10 #define RS_ALIVE_PACKET (0)
11 #define RS_CONNECT_PACKET (1)
12 #define RS_DISCONNECT_PACKET (2)
18 struct RS_PACKET_HEADER
20 int8_t magic[RS_MAGIC_LEN];
21 int8_t protoVer[RS_PROTO_VER_LEN];
25 int8_t login[RS_LOGIN_LEN];
27 } __attribute__((__packed__)); // 48 bytes, 6 blocks
31 int8_t magic[RS_MAGIC_LEN];
32 int8_t params[RS_PARAMS_LEN];
34 } __attribute__((__packed__)); // 992 bytes, 124 blocks