[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] IEEE 802.11 BackOff times



Dear ns-users:

I am simulating IEEE 802.11 environment in order to provide some Quality
of Service. But looking at the source code of the simulator I discovered
something strange in library *mac-timers.cc*:

In order to obtain a random Backoff time, the program divides a random
number by the contention window, and takes the remainder of the division
as the resulting Backoff Time.

Here is the line of code:

rtime = (Random::random() % cw) 

After that, we obtain a number which is a random integer number in the
interval [0,cw-1]. According to the standard, the Backoff time should be
an integer in the interval [0,cw]. 

Has anybody detected the same problem? If not, do you agree that there's
an error? Or there's something wrong in my inference?

Thanks in advance,
Joaquim Esteve.