Research Article

Jammer Localization in Multihop Wireless Networks Based on Gravitational Search

Algorithm 1

Node state determination algorithm.
(1) if  a node does not detect jamming attack  then
(2) This node is an unaffected node;
(3) else
(4) if  this node does not lose any neighbor and its
received SNRs from most of its neighbors’ do not
decrease more than a percent  then
(5) This node is an unaffected node;
(6) else
(7) if  this node loses more than percent of its
neighbors  then
(8) This node is a jammed node;
(9) else
(10) if  more than percent of its neighbors’ SNRs
decrease more than percent  then
(11) This node is a jammed node;
(12) else
(13) This node is a boundary node;
(14) end if
(15) end if
(16) end if
(17) end if