Journal of Computer Networks and Communications / 2014 / Article / Alg 1

Research Article

Energy-Efficient Cluster Based Routing Protocol in Mobile Ad Hoc Networks Using Network Coding

Algorithm 1

Packet encoding procedure.
Coding Procedure
{
  Pick packet p at the head of the output queue
  Createtopology(n);
  UpdateNbrRecTable(P);
  U = tdpFwdnode(n);
   if u is not equal to Fwder(P) return;
   if allNbrRecv(P) return;
   if(Natives(p))
  { if(Prob(p)>0.4 and DelayTolerance(p)>0.8)
   { if size(p) > 100 bytes then
    { which queue = 1
    }
    else
    { which queue = 0
    }
   ObtainCodeSet(C)
   {// Pick packet p at the head of the output queue
      C = p
      for each remaining packet r in the queue
      {  for each neighbor v
         {if (cannot decode(p r)) then
         {  goto Continue
         }
      }
      C = C r
      p = p r
      Continue
   }
   return C
   }
   if ( > 1) then
    { sendCodedPkts(C);
   }
   else if (!Timeout(p)
   {  Queue(p,t);
   }
   else {  send Native(p);
   }
   }  else
   {
      for each r = decode(P)
      {  TDP_NC(P);
      }
   }
   }

We are committed to sharing findings related to COVID-19 as quickly as possible. We will be providing unlimited waivers of publication charges for accepted research articles as well as case reports and case series related to COVID-19. Review articles are excluded from this waiver policy. Sign up here as a reviewer to help fast-track new submissions.