Yes you are right about printing the hash_bins_ value. I edited red-robust.cc by adding a print statement in:
RobustREDQueue::RobustREDQueue(const char * trace) : REDQueue(trace) {
....
printf("harkeerat: hash_bins_: %d \n", hash_bins_);
}
I am using a new tcl script file which I wrote myself. Following is the whole file:
example4.1.tcl:
###############
# A ns script file to learn how to change a AQM techique's configuration parameters.
#Create a simulator object
set ns [new Simulator]
#Create 5 nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
#Connect the nodes
$ns duplex-link $n0 $n3 1Mb 100ms DropTail
$ns duplex-link $n1 $n3 1Mb 100ms DropTail
$ns duplex-link $n2 $n3 1Mb 100ms DropTail
#$ns duplex-link $n3 $n4 1Mb 100ms Droptail
#bottleneck link
$ns simplex-link $n4 $n3 1Mb 100ms DropTail
$ns simplex-link $n3 $n4 1Mb 100ms RED/Robust ;#change AQM here
#(e.g. Blue, SFQ, SFB, DFS, RED/Robust, etc). Original: DropTail.
#configure RED/Robust parameters
Queue/RED/Robust set hash_bins_ 22
#Run the simulation
$ns run
###############
When I run the above ns script. I get the following output:
harkeerat: hash_bins_: 23
I want it to be 22, but it prints 23. If I edit this value in ns-default.tcl it changes as expected.
Can you guess what can be the issue?
If you may run the above tcl file at your end and edit red-robust.cc to print the hash_bins_ value, maybe it can help in narrowing the issue?
Kindly suggest. Thank you.
Regards,
Harkeerat Bedi