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

[ns] Problems attaching new agent to a node



Hi everyone,

I implemented two new agents STCP_R and STCP_S (sharing one new packet
heade, STCP)
I put  my .cc and .h files in the ns directory
then I added the new packet type in 'packet.h' under packet_t{} and
p_info {}

then added all of my .o object files in the Makefile under OBJ_CC
then did 'make depend;make'...
everything was fine...

but then when I tried to run a script, stcp_loss_test.tcl containing the
following statements:


#Create two nodes
set n0 [$ns node]
set n1 [$ns node]

set stcpr [new Agent/STCP_R]
$ns attach-agent $n0 $stcpr

set stcps [new Agent/STCP_S]
$ns attach-agent $n1 $stcps

$ns connect $stcps $stcpr


NS returns with the following errors:

can't read "debug_": no such variable
    (Object set line 1)
    invoked from within
"Classifier/Port set debug_"
    invoked from within
"catch "$c set $var" val"
    (procedure "_o18" line 1)
    (SplitObject unknown line 1)
    invoked from within
"$agent target [[$self node] entry]"
    (procedure "_o14" line 2)
    (RtModule attach line 2)
    invoked from within
"$m attach $agent $port"
    (procedure "_o13" line 4)
    (Node add-target line 4)
    invoked from within
"$self add-target $agent $port"
    (procedure "_o13" line 15)
    (Node attach line 15)
    invoked from within
"$node attach $agent"
    (procedure "_o3" line 2)
    (Simulator attach-agent line 2)
    invoked from within
"$ns attach-agent $n1 $stcps"
    (file "stcp_loss_test.tcl" line 39)

Does anybody know the cause of this error?  Is this because of something
I didn't do or something I did wrong?  

I am very puzzled by this problem.  Any help would be very much
appreciated.

Thanks in advance,
Howard Chiu
Electrical Engineering
Columbia University
[email protected]