The CAKE Message Layout (v2)

All CAKE messages share a common header. Part of the header contains a message type that determines the format of the rest of the message.

CAKE Standard Message Header
Field name Short name Basic field type
CAKE protocol version
Always 2
version count
Message type type count
The only defined types are:
0 - New session
1 - Session continuation
2 - Pre-session information exchange
Remainder of message Determined by the message type field.

The 'type' field

This field determines what kind of message this is. It is analogous to the 'protocol' field in an IPv4 header. Currently, there are only 3 defined types, and it's not likely there will be more.