## 4 the Proposed Secure Multicast Routing Protocol: DLSMR
### The Proposed Deep Learning-Based Secure Multicast Routing Protocol: DLSMR
The MRREQ packet contains the following fields: \[\langle\text{Type},\mathsf{S}_{\text{ID}}^{\text{MRREQ}},\mathsf{M}_{\text{ID }},\mathsf{S}_{\text{Seq}},\mathsf{Hop},\mathsf{TTL}\rangle\] where \(\text{Type}\) represents packet type, \(\mathsf{S}_{\text{ID}}^{\text{MRREQ}}\) represents the source node ID, \(\mathsf{M}_{\text{ID}}\) represents the multicast ID, \(\mathsf{S}_{\text{Seq}}\) is the source sequence number, \(\mathsf{Hop}\) denotes the number of hops between two nodes, and \(\mathsf{TTL}\) is the time to live of the packet in the network. Otherwise, go to **step 3**. * **Step 3: Intermediate Node Operation at Cluster Head for Route Request*
* When CH\({}_{c}\) receives the MRREQ packet, CH\({}_{c}\) will first check the MRREQ packet. * **Step 3.1:*
* If the S\({}_{\text{Seq}}\) at the received MRREQ is larger than that of the routing table, then go to **step 3.2**. * Conversely, if the S\({}_{\text{Seq}}\) at the received MRREQ equals the S\({}_{\text{Seq}}\) at the routing table and the M\({}_{\text{ID}}\) at the received MRREQ is equal to the M\({}_{\text{ID}}\) at the routing table, or the M\({}_{\text{ID}}\) is greater than the M\({}_{\text{ID}}\) at the routing table and \(\{\text{hop}+1\}\) at the received MRREQ is less than hop at the routing table, then go to **step 3.2**. Otherwise, the packet will be dropped. * **Step 3.2:*
* If the TTL at the received MRREQ is greater than or equal to the TTL at the routing table, then go to **step 3.3**. Otherwise, the packet will be dropped. * **Step 3.3:*
* If the cluster member ID (CM\({}_{\text{ID}}\)) is the same as the M\({}_{\text{ID}}\), CH\({}_{c}\) records the sender's ID, updates the routing table, and broadcasts MRREQ to NB\({}_{i}\); then, go to **step 5**. * Otherwise, CH\({}_{c}\) records the sender's ID and updates the routing table and broadcasts MRREQ to the neighbor node (NB\({}_{i}\)) in its cluster or the next cluster heads; go to **step 4**. * **Step 4: Intermediate Node Operation at Gateway for Route Request*
* When the gateway node UGW\({}_{c}\) receives a MRREQ packet from NB\({}_{i}\), UGW\({}_{c}\) records the sender's ID and updates the routing table, then UGW\({}_{c}\) broadcasts the MRREQ to their neighboring CH nodes until TTL \(\geq\) TTL\({}^{\text{th}}\); go to **step 3**. * **Route Reply Process:*
* **Step 5: Cluster head Operation for Route Reply: Generates and Sends Route Reply Packet*
* CH generates and replies a RREP packet to the previous node by unicast transmission. The RREP packet contains the following fields: \[\langle\text{Type},\text{S}_{\text{ID}}^{\text{RREP}},\text{D}_{\text{ID}}^{ \text{RREP}},\text{M}_{\text{ID}},\text{D}_{\text{Seq}},\text{E},\text{Pos}, \text{Hop}\rangle\] where Type represents the packet type, S\({}_{\text{ID}}\) represents the source node ID, D\({}_{\text{ID}}\) represents the destination ID, M\({}_{\text{ID}}\) represents the multicast ID, D\({}_{\text{Seq}}\) is the destination sequence number which is the number of attempts to confirm control messages, E represents the remaining energy of the node, Pos represents the position of the node, and Hop represents the number of hops to D. Then, go to **step 6**. * **Step 6: Intermediate Node Operation at Gateway Node for Route Reply*
* The intermediate node NB\({}_{i}\) records the sender's ID of RREP packets and updates its routing table when it receives the RREP packet. Then, NB\({}_{i}\) forwards the RREP packet to the previous node; go to **step 7**. Otherwise, NB\({}_{i}\) waits until it receives the RREP packet. * **Step 7: Intermediate Node Operation at CH for Route Reply*
* When the CH\({}_{c}\) receives RREP, then go to **step 7.1**. Otherwise, CH\({}_{c}\) waits until it receives the RREP packet. * **Step 7.1:*
* When the CH\({}_{c}\) receives the RREP, then CH\({}_{c}\) checks the S\({}_{\text{ID}}^{\text{RREP}}\) in the RREP packet. The S\({}_{\text{ID}}^{\text{RREP}}\) in the RREP packet means the destination node ID. So, if the S\({}_{\text{ID}}^{\text{RREP}}\) equals S\({}_{\text{ID}}^{\text{tab}}\), then go to step **step 7.2**.