[ns] Please help mo for SMCC on NS

ma-haiyuan ma-haiyuan at 163.com
Tue May 5 17:39:01 PDT 2009




hi to all!
 
I am a newer about NS. my interesting is multicast congestion control. I have some problems when I run SMCC[Gu-In Kwon and John W. Byers. Smooth Multirate Multicast Congestion Control.IEEE INFOCOM 2003]
 I have downloaded SMCC source codes from the writer's websit: http://cs-people.bu.edu/guin/smcc.html. When I run the simulations, there are several problems, maybe the reason is the version I used is 3.2 which is differented from the writer's. Could somebody give me some advice that how to modify the codes in order to run simulations successfully in NS 3.2? 
 
 The Problems is as follows:
1¡¢If I replace "TCP-sink.h" and "TCP-sink.cc" with the website provioded, the error log in "make" procedure is : 
"tcp/tcp-asym-sink.o:tcp-asym-sink.cc:(.text+0x30d): undefined reference to `Acker::update_ts(int, double, int)'
tcp/tcp-asym-sink.o:tcp-asym-sink.cc:(.rdata$_ZTV11TcpAsymSink[vtable for TcpAsymSink]+0x34): undefined reference to `DelAckSink::reset()'
collect2: ld returned 1 exit status
make: *** [ns] Error 1"
So I retain the inherent codes in NS 3.2 instead of raplacing them.
2¡¢I put "smcc.h" and "smcc.cc" in the directory "\ns-allinone-2.31\ns-2.31\mcast"
When make it , there are some error information as follows:
mcast/smcc.cc: In member function `void SmccAgent::warmup()':
mcast/smcc.cc:123: error: ISO C++ forbids initialization in array new
mcast/smcc.cc:124: error: ISO C++ forbids initialization in array new
mcast/smcc.cc:125: error: ISO C++ forbids initialization in array new
So I modified the codes £º
123       send_timer_ = new SmccSendTimer[Max_smcc_Layer](this);
124        NoFeedbacktimer_ = new SmccNoFeedbackTimer[Max_smcc_Layer](this); 
125        bcl_timer_ = new BclTimer[Max_Bcl_Layer](this);
 
to:
         SmccSendTimer *send_timer_[Max_smcc_Layer];
  SmccNoFeedbackTimer *NoFeedbacktimer_[Max_smcc_Layer];
  for(int kk=0; kk<Max_smcc_Layer; kk++)
  {
   send_timer_[kk]= new SmccSendTimer(this);
   NoFeedbacktimer_[kk]= new SmccNoFeedbackTimer(this);
  }
                
  BclTimer *bcl_timer_[Max_Bcl_Layer];       
  for(int kk=0; kk<Max_Bcl_Layer; kk++)
  {
   bcl_timer_[kk]= new BclTimer(this);   
  }
   Then make successfully.
 
3¡¢I have also modified "makefile.in" to  include the needed .cc and .h files:
 
OBJ_CC = \
...
tcp/tfrc.o tcp/tfrc-sink.o mcast/tfmcc.o mcast/tfmcc-sink.o mcast/smcc.o tcp/formula.o \
...
4¡¢
When I run "smcc.tcl" for figure 4 and 5, there is one error log:
 
$ ns smcc.tcl
    (_o3 cmd line 1)
    invoked from within
"_o3 cmd queue-parameter _o17 _o24 2 6"
    invoked from within
"catch "$self cmd $args" ret"
    invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
    (procedure "_o3" line 2)
    (SplitObject unknown line 2)
    invoked from within
"$ns queue-parameter $n3 $n4 2 6"
    (file "smcc.tcl" line 94)
  My question is : what's the function of "$ns queue-parameter $n3 $n4 2 6"?
5¡¢
Then I commented out these two lines:
...
#$ns queue-parameter $n3 $n4 2 6
...
#$ns queue-parameter $n3 $n5 2 21
...
Finally, when run it again, it turn another error:
$ ns smcc.tcl
Scheduler: Event UID not valid!
 
I can't find where the problems, could somebody help me to solve these problems and run the simulations successfully?
 So appreciated and best regards! 




More information about the Ns-users mailing list