whitefield-framework / whitefield

Whitefield provides a simulation environment for wireless sensor networks by combining RF simulation provided by NS3 and network stack provided by popular IoT OSes such as Contiki/RIOT/OpenThread.
GNU General Public License v2.0
82 stars 24 forks source link

Support for randomized IIDs in AirLine/Stackline #69

Open nyrahul opened 6 years ago

nyrahul commented 6 years ago

Currently the design is that every node has its own node_id. The IID used at the link layer corresponds to this node_id .. Thus in Airline when a packet is received we derive the node_id from the MAC address's dest_addr.

Reasons for supporting any IIDs in Airline/stackline?

  1. In case of OpenThread, the nodes might use combinations of short/long address modes and randomized IIDs.
  2. There are possibilities of implementations using randomized IIDs even in contiki/riot.
  3. Anyways the design decision to tie node_id and IID was not a good one and hence should be changed.

How to implement?

  1. Stackline can register there extended and short address to the Airline. Openthread already has a mechanism to register these addresses. In context of contiki/riot, the shim layer can take care of this.
  2. Airline on receiving packets can match against these addresses. Note addresses can be more than one.
  3. Also in some cases (for e.g. openthread), the MAC header framing is done in Openthread internally. So Airline will receive an mbuf with 802154 header. Thus Airline needs to support only LLC layer and below in such case.