@package Messages
Created on Oct 7, 2016
@author: Dmitrii Dugaev
This module describes all possible message types, which can be transmitted by the routing protocol.
All the message types are assigned with a unique type ID and a corresponding header, which contains
additional service information about the packet. The header is called "DSR-header" for now, since it is attached to
a packet between the L2 and L3 headers, as it is done in original DSR routing protocol.
But this is the last similarity with the DSR - our protocol doesn't have to do anything with the concept of
Dynamic Source Routing, and is based on its own concept of packet routing - based on the convergence of reactive
routing and the Reinforcement Learning method - to enable route selection based on current network conditions.
This routing protocol is close to a so-called concept of "Opportunistic Routing" where the nodes have more freedom
to select a next hop, not being completely relied on a current fixed route table state.
CURRENT MESSAGE TYPES:
------------------------------------------------------------------------------------------------------------------------
| TYPE | MESSAGE | LENGTH (BYTES) | DESCRIPTION |
------------------------------------------------------------------------------------------------------------------------
| 0 | Unicast Data Packet | 4 | Unicast data packet from the user (network) interface |
| | | | |
| 1 | Broadcast Data Packet | 4 | Broadcast data packet from the user (network) interface|
| | | | |
| 2 | RREQ4 | 12 | Route Request service message for IPv4 destination |
| | | | |
| 3 | RREQ6 | 36 | Route Request service message for IPv6 destination |
| | | | |
| 4 | RREP4 | 12 | Route Reply service message for IPv4 destination |
| | | | |
| 5 | RREP6 | 36 | Route Reply service message for IPv6 destination |
| | | | |
| 6 | HELLO | from 4 to 56 | Hello service message |
| | | | |
| 7 | ACK | 8 | ACK service message for reliable transmission |
| | | | |
| 8 | REWARD | 8 | Reward service message |
| | | | |
| 9 | Reliable Data Packet | 4 | Unicast data packet which is transmitted using ARQ |
------------------------------------------------------------------------------------------------------------------------
The messages (headers) are described as CType classes with pre-defined fields, depending on a message type.
A detailed description of the fields and its functionality can be found in the documentation.