## 4 Functional Description of D-MSR Algorithms in Different Protocol Layers
### D-SAR Protocol  
The _end-to-end connection manager_ in the transport layer of a source node, which intends to establish a connection, sends the connection-request to the D-SAR module in the stack, including the connection parameters such as a destination address, traffic/connection ID, connection priority (we use the same priority of data as defined in the WirelessHART protocol for exchanging the management, sensor data, alarm, or normal packets), communication type (periodic or non-periodic), and a requested publishing period. In this paper, we assume the prevalence of periodic data traffic between sensors and actuators. The D-SAR module at the source node initiates the procedure by sending a _Setup_ message to the next hop toward the destination along the route defined by the routing layer. The _Setup_ message includes parameters such as a list of suggested common unused timeslot-channel cells for further communication with the next hop, a destination address, traffic ID, timeslot-channel cell selected on previous hop (the information about the timeslot-channel cell selected by the previous hop, is used by the next hop in order to minimize the end-to-end delay), and a requested publishing period. The sender selects these common unused cells based on the received information about the next hop link table (by listening to the next hop advertisement) and its own schedule-matrix. The receiver of the _Setup_ message then performs a check of its available communication resources. The receiver checks whether any of the suggested cells are unused in its own schedule-matrix with the requested publishing period. It also checks if there are unused cells with the requested publishing period to communicate with the next hop. If the required resources are available, the receiver chooses one cell from the suggested free cells and allocates the requested communication resource based on the requested publishing period of  
Figure 9: Different state of sample timeslot in the _data communication period_. the traffic by writing a new link and (if needed, new) superframe in the related tables in the data link layer. The receiver will then respond by sending the _Call Proceeding_ message that includes the chosen cell. In the next step, the receiver (intermediate node) forwards the _Setup_ message toward the destination node with some delay. This delay enables the neighbors to update their schedule-matrices based on this new reservation that will be published in advertisements, thereby avoiding conflicts over resource reservation. This process continues until the destination node receives the _Setup_ message as shown in Figure 10(a). However, at any intermediate node the receiver of the _Setup_ message can refuse the connection request with a _Release Complete_ message if it is unable to accommodate the new connection as shown in Figure 10(b). The destination node can either accept or decline the new connection request from the source node by sending the _Connect_ message or _Release Complete_ message. This _Connect_ message traverses along the multihop network back to the source node. All the temporary communication resources, which are reserved during the _Setup_ message exchanging, are switched to permanent reservation. This two-step reservation is performed to ensure that timeslot reservations are not carried out should the connection request be unsuccessful. After establishing the connection and during the network operation, either the source node (e.g., because the connection has expired or is no longer required), the intermediate node (e.g., because of node/edge failure, changing the route or detecting the conflict in the reserved resources), or the destination node may wish to end the connection. The node that wishes to end the connection transmits  
Figure 10: Overview of connection establishment protocol. the _Release_ message toward the end(s) of the connection. The procedure of ending a connection by an intermediate node is shown in Figure 10(c).