## 4 the Proposed Secure Multicast Routing Protocol: DLSMR
### The Basic Concept of the Proposed Secure Multicast Routing and Clustering Protocol  
In this section, we explain the basic concepts of our proposed secure multicast routing and clustering protocol. The process of establishing routes is divided into two steps, which are as follows:* **Step 1 (Clustering Process):** Firstly, we consider the entire network as a single cluster, which is then recursively divided into smaller clusters based on the weight of the node degree, cosine similarity, cosine distance, and remaining energy. We identify flying nodes as potential cluster heads in this top-down clustering process as they inherently possess stronger capabilities within the cluster. Moreover, the flying node with the highest remaining energy is elected as the CH since it has to work harder than the member nodes as noted in [23]. A flying node that is not selected as a cluster head receives two or more cluster head information (CHI) packets from the CH, and then that node becomes an UGW. Otherwise, the ground nodes can only serve as cluster members. To select the optimal cluster head, the cluster member candidates use the PSO algorithm to optimize costs. Unlike the traditional clustering method of [23], we introduce a TD-PSO protocol to improve control overhead during cluster formation.
* **Step 2 (Multicast Routing Process):** Following the clustering process, each destination node that wants to receive data transmission sends a join request to the CH within the cluster. Then, a source node sends a MRREQ to each cluster head by unicast to find the multiple destination nodes. After that, CH will broadcast the MRREQ packet to each CH to find the multiple destination nodes. When the UGW receives the MRREQ packet, it updates its routing table and re-broadcasts the MRREQ packet to the neighbor nodes. When a CH who has a multicast group ID receives an MRREQ packet, they update the routing table and reply a RREP packet to the previous node by unicast. In addition to that, the wormhole attacker also forwards the MRREQ and RREP packets. In this work, we develop a novel DL framework to predict the secure next node while establishing the route from a source to the multicast group destinations. Based on the DL framework, we can train a DNN model to learn wormhole nodes' characteristics and distinguish them from legitimate ones. Each flying node in the network utilizes a deep learning framework to find the next secure nodes for multiple destinations. We consider the node ID, node's position, destination ID, destination sequence, hop count, and the remaining energy of the node as the trainable input parameter, and the secure and unsecured node ID, secure and unsecured status as output parameters of the DNN model. When a node receives a RREP packet, the contents of the relevant RREP packet will be used in the DL framework. After training, the DNN model produces secure and unsecured node ID and their status as output. For example, as we can see in Figure 1, when the CH receives two RREP packets which are from the neighbor nodes and the wormhole nodes, the proposed DLSMR protocol can establish a secure multicast route from \(S-CH_{1}-UGW_{(1,4)},CH_{2}\) and also \(S-CH_{1}-UGW_{(1,4)},CH_{2},CH_{3}\) with a multicast tree to avoid the wormhole attack.