|
43 | 43 |
|
44 | 44 | /*** Messages. */ |
45 | 45 |
|
46 | | -#define PACKET_ID_PADDING 0 // Denotes padding |
47 | | -#define PACKET_ID_REQUEST 1 // Used to request unreceived packets |
48 | | -#define PACKET_ID_KILL 2 // Used to kill connection |
49 | | - |
50 | | -#define PACKET_ID_ONLINE 24 |
51 | | -#define PACKET_ID_OFFLINE 25 |
52 | | -#define PACKET_ID_NICKNAME 48 |
53 | | -#define PACKET_ID_STATUSMESSAGE 49 |
54 | | -#define PACKET_ID_USERSTATUS 50 |
55 | | -#define PACKET_ID_TYPING 51 |
56 | | -#define PACKET_ID_MESSAGE 64 |
57 | | -#define PACKET_ID_ACTION 65 // PACKET_ID_MESSAGE + MESSAGE_ACTION |
58 | | -#define PACKET_ID_MSI 69 // Used by AV to setup calls and etc |
59 | | -#define PACKET_ID_FILE_SENDREQUEST 80 |
60 | | -#define PACKET_ID_FILE_CONTROL 81 |
61 | | -#define PACKET_ID_FILE_DATA 82 |
62 | | -#define PACKET_ID_INVITE_GROUPCHAT 95 |
63 | | -#define PACKET_ID_INVITE_CONFERENCE 96 |
64 | | -#define PACKET_ID_ONLINE_PACKET 97 |
65 | | -#define PACKET_ID_DIRECT_CONFERENCE 98 |
66 | | -#define PACKET_ID_MESSAGE_CONFERENCE 99 |
67 | | -#define PACKET_ID_REJOIN_CONFERENCE 100 |
68 | | -#define PACKET_ID_LOSSY_CONFERENCE 199 |
| 46 | +typedef enum Packet_Id { |
| 47 | + PACKET_ID_PADDING = 0, // Denotes padding |
| 48 | + PACKET_ID_REQUEST = 1, // Used to request unreceived packets |
| 49 | + PACKET_ID_KILL = 2, // Used to kill connection |
| 50 | + |
| 51 | + PACKET_ID_ONLINE = 24, |
| 52 | + PACKET_ID_OFFLINE = 25, |
| 53 | + PACKET_ID_NICKNAME = 48, |
| 54 | + PACKET_ID_STATUSMESSAGE = 49, |
| 55 | + PACKET_ID_USERSTATUS = 50, |
| 56 | + PACKET_ID_TYPING = 51, |
| 57 | + PACKET_ID_MESSAGE = 64, |
| 58 | + PACKET_ID_ACTION = 65, // PACKET_ID_MESSAGE + MESSAGE_ACTION |
| 59 | + PACKET_ID_MSI = 69, // Used by AV to setup calls and etc |
| 60 | + PACKET_ID_FILE_SENDREQUEST = 80, |
| 61 | + PACKET_ID_FILE_CONTROL = 81, |
| 62 | + PACKET_ID_FILE_DATA = 82, |
| 63 | + PACKET_ID_INVITE_GROUPCHAT = 95, |
| 64 | + PACKET_ID_INVITE_CONFERENCE = 96, |
| 65 | + PACKET_ID_ONLINE_PACKET = 97, |
| 66 | + PACKET_ID_DIRECT_CONFERENCE = 98, |
| 67 | + PACKET_ID_MESSAGE_CONFERENCE = 99, |
| 68 | + PACKET_ID_REJOIN_CONFERENCE = 100, |
| 69 | + PACKET_ID_LOSSY_CONFERENCE = 199, |
| 70 | +} Packet_Id; |
69 | 71 |
|
70 | 72 | /** Maximum size of receiving and sending packet buffers. */ |
71 | 73 | #define CRYPTO_PACKET_BUFFER_SIZE 32768 // Must be a power of 2 |
|
0 commit comments