Hi, all

According to the IEEE 802.11 MAC/PHY standard, a wireless station must 
perform carrier sensing for a time interval of DIFS + rTime, before it 
starts frame transmission. rTime is called as random backoff time and is 
given by the product of SlotTime and a random value which is chosen from 
[0,CW], where CW is the current contention window size. 

But, in ns2 rTime is defined as follows (in 4 places): 
rTime = (Random::random() % cw_) * phymib_.getSlotTime();
(Please refer to tx_resume() and send(Packet *p, Handler *h) functions 
in mac-802_11.cc and start(int cw, int idle) function in mac-timers.cc)

Therefore, in ns2 random value is chosen from [0,CW-1]. So, I think 
rTime should be defined as:
rTime = (Random::random() % (cw_+1)) * phymib_.getSlotTime();.

Am I correct? Comments concerning this are welcome.
Thanks in advance.

With regards,

**************************************
 B. A. Hirantha Sithira Abeysekera,
 Dept. of Communication Engineering,
 Graduate School of Engineering, 
 Osaka University, Suita,
 565-0871, Japan
 Tel: +81-6-6879-7742
 [EMAIL PROTECTED]
**************************************

Reply via email to