Skip to content

vNet Details

dario edited this page Apr 2, 2017 · 7 revisions

Introduction

vNet is the trasportation protocol used in Souliss, is used to bridge and route different communication media in several architectures. It can be itself transported over others transportation protocols (like IPv4) or directly over a Layer 2 protocol (like IEEE 802.15.4), when combined with another transportation protocol a bind between the vNet address and the address of the underlying transportation protocol is required (or data shall be transported as broadcast).

Frame Structure

Frames in the vNet network are composed of six byte of header and a variable payload for a frame length, max frame length depends on implementation.

Length (1 byte) Port (1 byte) Final Destination Address (2 byte) Original Destination Address (2 byte) Payload (Length - 6 bytes)

The header on the top together with the payload is what is parsed from the vNet layer, this is passed to the media driver that include additional information and encapsulate the vNet frame into the final communication frame.

The addresses are structures in six groups:

  • First five grouped for underlying physical communication media
  • Last group for multicast and broadcast communication media

The bind between address and physical communication media is generally unusual and makes vNet a protocol that is inbetween Layer 3 and Layer 2 of the ISO/OSI model. While parsing the frames, the address is used to identify the routing path, override with custom and runtime routing path is allowed.

vNet Drivers

The drivers are piece of code that handle the vNet communication over a specific physical communication media and relevant transceiver, adding a new one is just a matter of adding a driver and the relevant option to load the code at compile time. The vNet frame is encapsulated into an underlying frame.

vNet over UDP/IPv4

One of the underlying transportation protocol used for vNet is UDP/IPv4, the nodes always listed on UDP port 230 and the vNet frame is included into the UDP payload with an additional byte for the whole length as per below example

Length+1 (1 byte) Length (1 byte) Port (1 byte) Final Destination Address (2 byte) Original Destination Address (2 byte) Payload (Length - 6 bytes)
0x0C 0x0B 0x17 0x11, 0x00 0x12, 0x00 0x05, 0x6D, 0x02, 0xCB, 0x08

Nodes assumes that all peers are listening on port 230 and so source and destination IP port are the same (230), this doesn't apply in case of User Mode (source address between 0x0101 and 0x64FE) where a client-server approach is used and the reply is sent to the source IP port used in the previous request.

Clone this wiki locally