… | |
… | |
120 | +------+------+--------+------+ |
120 | +------+------+--------+------+ |
121 | | HMAC | TYPE | SRCDST | DATA | |
121 | | HMAC | TYPE | SRCDST | DATA | |
122 | +------+------+--------+------+ |
122 | +------+------+--------+------+ |
123 | |
123 | |
124 | The HMAC field is present in all packets, even if not used (e.g. in auth |
124 | The HMAC field is present in all packets, even if not used (e.g. in auth |
125 | request packets), in which case it is set to all zeroes. The checksum |
125 | request packets), in which case it is set to all zeroes. The MAC itself is |
126 | itself is calculated over the TYPE, SRCDST and DATA fields in all cases. |
126 | calculated over the TYPE, SRCDST and DATA fields in all cases. |
127 | |
127 | |
128 | The TYPE field is a single byte and determines the purpose of the packet |
128 | The TYPE field is a single byte and determines the purpose of the packet |
129 | (e.g. RESET, COMPRESSED/UNCOMPRESSED DATA, PING, AUTH REQUEST/RESPONSE, |
129 | (e.g. RESET, COMPRESSED/UNCOMPRESSED DATA, PING, AUTH REQUEST/RESPONSE, |
130 | CONNECT REQUEST/INFO etc.). |
130 | CONNECT REQUEST/INFO etc.). |
131 | |
131 | |