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

[ns] Error with PING



Hi all,
I'm trying to use the PING agent in my program(ns 2.1b6, RHL6.1) , and I get
the following errors:

ns: _o165 recv 5 601.1: no value given for parameter "rtt" to "_o165"
    (Agent/Ping recv line 1)
    invoked from within
"_o165 recv 5 601.1"


The code is :
...
.....
for {set i 0} {$i <= $N} {incr i} {
    set send_ping($i) [new Agent/Ping]
    # make sure forward ping packets are the same sizes as normal packets
    $send_ping($i) set packetSize_ $packet_size
    $ns attach-agent $srcn($i) $send_ping($i)
    set recv_ping($i) [new Agent/Ping]
    # backward ping packets should be the same sizes as acks
    $ns attach-agent $dstn($i) $recv_ping($i)
    # Connect the two agents
    $ns connect $send_ping($i) $recv_ping($i)
    puts $f_rtt "% ping route $i = [$dstn($i) set id_]"
    # schedule the ping's
    set ping_time $str_start_t
    while {$ping_time < $T} {
 $ns at [expr $ping_time + $i*$sampling_interval/($N+1)] "$send_ping($i)
send"
 set ping_time [expr $ping_time + $sampling_interval]
    }
.......
........

Thanks in advance,
Vijay