修改数据包重新排序(MPR)的伪代码 算法
Initialization:
1) mode=slow-start
2) cwnd=1
3) memorize=0
4) alpha=0.99
5) beta=3.0
6) mxrtt=0
7) srtt=6.0
8) remove(to-be-ack , n)
9) add(to-be-sent , n)
10)if not is-in(memorize , n) then /*new drop*/
11)memorize=to-be-ack
12)cwnd = cwnd(n)/2
13)else
14)remove(memorize , n)
New ack received:
15)if (cwnd < ssthresh)
16)/* Slow Start*/
17)cwnd = cwnd + 1;
18)else
19)/* Congestion Avoidance */
20)cwnd = cwnd + 1/cwnd
Timeout:
21)/* Multiplicative decrease */
22)ssthresh = cwnd/2;
23)cwnd = 1;
我知道必须在ns2.35文件夹的tcp.cc文件中进行这些更改。我无法完成初始化部分。欢迎任何有关正确实施的指导!