Research Article

Angle and Context Free Grammar Based Precarious Node Detection and Secure Data Transmission in MANETs

Algorithm 1

()    Input  Source , Destination , a new node and Common Near node
()    Output  Legitimate Forwarder node
()    Begin  procedure
()     While  source not reach   do
()       Collect neighbor node
()       Foreach  neighbor node  do
()         Neighbor angle
()       , , and to form a triangle  then
()       compute the interior angles of , , and
()    
()    Replaced corresponding interior angle by the neighbor angle
()    
()    If   ==   then
()      Select node is a   goto ()
()    Else  Let LM be the Leftmost Derivation
()      Let RM be the Rightmost Derivation
()      To compute LM and DM of and
()      If  LM == RM  then
()        Choose is a Forward node goto ()
()      Else  To compute LM and RM of and
()        If  LM == RM  then
()          Choose is a Forward node goto ()
()          Else
()            Set F  Level3_ECC_Check()
()            If    then
()              Source  select next near node   goto ()
()            Else  To continue routing to same node and goto ()
()  End  procedure