In this phase the mobile nodes that are able to move in every direction are distributed in the environment. The remaining energy and the credit are assumed to be the same. Each node stores some data about its neighbor nodes which includes the items that are shown in Fig.2: Fig.2 Neighbor nodes information Node identifier: This is the 8-bit field used to store the identifier of the neighboring nodes. Node-Credit: Each time it sends data to the neighbor's node, it listens to the channel. If it makes sure that the neighbor node has sent the data, the credit will increase. This field is 3-bit. Node-state: This field is 2-bit and if a neighbor node is identified as a selfish node by the cluster head then it will be announced to every other neighbor node. The selfish node field is filled as āsā state and no data will be sent to this node. Node-Score: This is a 5-bit field and according to the equation (1) will fill the field per each neighbor it has so to select the highest amount as the cluster head among those.
In the proposed method after identifying and deploying network nodes for …show more content…
Three watchdog nodes will be selected and they will monitor the function of the suspicious nodes. At line 24, the number of the sent packets and the number of received packets is calculated from the suspicious node. At line 29, LP must be less than the threshold Ī·. The behavior of the node will be controlled n times and in case of getting the same results in these n times the selfish node will be detected by the watchdog node. This result will be announced to the cluster head and each of the watchdog nodes will announce their reports to the cluster head node. The cluster head node using majority vote at line 41 will decide on the selfishness or cooperation state of the node and will announce it to the cluster