## 7 Proposed Technique and Algorithm
smart technique, based on the collection of information and the registered record, enables our algorithm to start to determine the path between the source and the destination in order to begin sending and receiving the data. The path will only be available for the label packets and for the required amount of time, as determined by the IoT surgery team. However, in case the nodes received other packets, the s-RCA will reroute any other packets to adjacent nodes, to send them to the required destination via lower-priority paths. This is the core functionality required of our smart algorithm, which must work without raising any affection for any other traffic. If there are huge emergency packets received, then each node can keep these packets in its buffer to avoid packet drop, maintaining high-quality service. This is will not increase delay, due to the huge availability built into the path. ```
1:procedureSelectNodebasedonLSDB(\(T_{r}r,source,destination,edges\_to\_exclude\))
2:\(T_{r}\): Routing Information with each adjacent node
3:\(V\): The nodes and their weight \(G(V,E)\)
4:\(\Gamma(v)\): Number of nodes \(v\)
5:\(s\): send small packets to inform adjacent node I am busy
6:\(s\): The s-RCA algorithm will start to label all packets send from sender after making full view for the topology by importing the routing table
7:\(s\): Packets starting from this node and d is destination s: source
8:\(d\): The destination
9:\(p_{a}(s,NextHop)\leftarrow\emptyset\) packets start be recieving hop by hop
10:if\(s\
eq d\)then
11:\(q_{sub}\leftarrow\emptyset\) the buffer that we store all required emergency packets if it is needed
12:\(\mathbb{Q}\leftarrow\emptyset\) the buffer will be empty currently
13:\(Enqueue(Q,(q_{sub}.s))\) the buffer that store the emergency packets only
14:while\(Q\
eq\emptyset\)and\(p_{a}(source,NHillreceivedbyd)=\emptyset\)do
15:\((q_{sub},x)\gets Front(Q)\)
16:for all\(k\in\Gamma(x)\) k: is the intermidiate node which consider next hop do
17:\(e\leftarrow(x,k)\) x is the near node and it should be on the same path
18:if\((q_{sub}\cup e)\cap edges\_to\_exclude=\emptyset\)and\(P_{r}(T_{r},k,d)\cap edges\_to\_avoid=\emptyset\) here the s-RCA checked that all nodes are not sharing with other traffic or nodes just only for the surgury path then
19:\(p_{a}(s,d)\gets q_{sub}\cup e\cup P_{r}(T_{r},k,d)\) k is the intermediate node between source and destination
20:else
21:\(Enqueue(Q,(q_{sub}\cup e,k))\)
22:endif
23:endfor
24:\(Dequeue(Q)\)
25:endwhile
26:\(Q\leftarrow\emptyset\)
27:endif
28:return\(p_{a}(s,d)\)
29:endprocedure
```  
**Algorithm 1**_Checkingpath_ Smart-Rout Control algorithm (s-RCA) algorithm. The proposed s-RCA algorithm shown in Algorithm 1 can work with any routing protocol; as we explained, the routing protocol is responsible for creating the routing table, and our algorithm is configured according to the following steps inside the routing protocol. This is in case, we use a pro-active routing protocol, but with pre-active ones there is no need to read the full topology, because the algorithm can determine the path independently by using the shortest path between each node which is computed by the routing protocol, without knowing about other nodes in the network, which is faster. In our protocol, we assume that all nodes on the primary path connect with an adjacent node, which has secured all our protocol constraints, as follows (and as shown in Figure 5:All nodes on the path are selected by s-RCA algorithm to be included in the booked path between the source and required destination, which should be tracked, and possess a very good history. The algorithm will decide based on the information collected from LSDB (from the routing table). * s-RCA algorithm will import the routing table created from the routing protocol to make a full view of the network, and then start to select (node by node) until arriving at the final destination.