[ns] how to forward packets based on probability

Phenix phenix_yw at hhu.edu.cn
Tue Feb 17 21:03:19 PST 2009


Hi guys,

   How to implement probabilistic-based flooding in NS-2 ? 
Say, upon receiving a packet, a mobile node will decide whether 
to forward it with a certain probability.

   I only know we can use the function below to send a packet in NS-2:
             Scheduler::instance().schedule(target_, p, delay);
   But how to deal with the probability?


Regards,
Phenix 



More information about the Ns-users mailing list