请问我在哪里修改ns2源文件来实现这种拥塞控制算法以及如何实现?

时间:2015-05-10 09:23:25

标签: ns2

向你致以亲切的问候,

请问我想找出我需要在ns2源代码中调整的位置,以便实现下面的TCP算法。它是TCP AIMD算法的一种变体,称为TCP-BIAD

    #.................................................................................................................
            if (ACK recieved)
              call routine function ()
               if congestion window <= slow start threshold
                  increment congestion window by 1
               else
                set Minimum window = congestion window
                set target window = Average of max. Window and min. window
                 if(dist. btw current window & target window > max.increment)
                  set S to maximum increment
            else if (distance between current window and target window <=1)
                  set S to 1
                else
                set S to distance between current window and target window
            end if 
            congestion window = congestion window + S/congestion window
           end if 
          end if 
    #...........................................................................................................................

              Algorithm after a single packet is Lost

    #..............................................................................................................................
    if ( three DUPACKs are recieved)
        Maximum window = Congestion Window
        slowstart threshold = max (2, B x Minimum Roundtriptime)/ Pipe Size of bottleneck link during congestion
        congestion window = slow start threshold
    end if

#.......................................................................................................................................

我是这个领域的新手,所以我将非常感谢您愿意分享的所有必要和相关的信息材料和链接。

1 个答案:

答案 0 :(得分:1)