|
RLRP routing
v.0.1.0
|
Classes | |
| class | AckHeader |
| ACK header. More... | |
| class | AckMessage |
| Acknowledgement (ACK) service message. More... | |
| class | BroadcastHeader |
| Broadcast header. More... | |
| class | BroadcastPacket |
| Broadcast data packet. More... | |
| class | HelloHeader |
| Hello message header. More... | |
| class | HelloMessage |
| Hello service message. More... | |
| class | ReliableDataHeader |
| Reliable Unicast Data Header. More... | |
| class | ReliableDataPacket |
| Unicast data packet, transmitted using ARQ module. More... | |
| class | RewardHeader |
| Reward header. More... | |
| class | RewardMessage |
| Reward service message. More... | |
| class | Rrep4Header |
| RREP4 header. More... | |
| class | Rrep6Header |
| RREP6 header. More... | |
| class | RrepMessage |
| Route Reply service message. More... | |
| class | Rreq4Header |
| RREQ4 header. More... | |
| class | Rreq6Header |
| RREQ6 header. More... | |
| class | RreqMessage |
| Route Request service message. More... | |
| class | UnicastHeader |
| Unicast header. More... | |
| class | UnicastPacket |
| Unicast data packet. More... | |
Functions | |
| def | pack_message (message) |
| Pack the Message object to dsr header. More... | |
| def | unpack_message (binary_header) |
| Unpack the Message object from the dsr header' bytearray value. More... | |
@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.
| def Messages.pack_message | ( | message | ) |
Pack the Message object to dsr header.
Return the byte array.
| message | Message object from Messages module. |

| def Messages.unpack_message | ( | binary_header | ) |
Unpack the Message object from the dsr header' bytearray value.
Return the message object from Messages module.
| binary_header | Binary header (bytearray) with the packed message. |
