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

RSVP/ns: please help



Hi, 

I have installed rsvp/ns in ns-2.1b4
 Red Hat Linux 5.1 on Pentium PC.
 Some errors presented of my attempts for run 
 the simple script tcl below:
 
 set ns [new Simulator]

set f1 [open out1.tr w]

set n0 [$ns node]
set n1 [$ns node]

set nf [open out.nam w]

$ns duplex-rsvp-link $n0 $n1 1Mb 1s 0.5 50 5000 Param Null

set link [$ns link $n0 $n1]

# Enable all upcalls on all nodes
Agent/RSVP set noisy_ 255

set rsvp1 [$n1 add-rsvp-agent]
set rsvp0 [$n0 add-rsvp-agent]

# Create one traffic source
set cbr0 [new Agent/CBR]
$ns attach-agent $n0 $cbr0
$cbr0 set packetSize_ 500
$cbr0 set interval_ 0.008
$cbr0 set random_ 1
$cbr0 set fid_ 1
#$cbr0 set dst_ $n1


# Create 1 traffic sinks
set null1 [new Agent/LossMonitor]
$ns attach-agent $n1 $null1

$ns connect $cbr0  $null1

$rsvp0 session $n1 1
set counter 0
$ns at 0.0 "record"

$ns at 1.0 "$rsvp0 sender 0 +500000 5000 32"
$ns at 300.0 "$rsvp1 reserve 0 ff +100000 100000 $n0"
$ns at 800.0 "$rsvp1 release 0"

$ns at 10.0 "$cbr0 start"

$ns at 600.0 "$cbr0 stop"

$ns at 1000.0 "finish"


proc record {} {
        global null1 ns f1 counter n0
        set time 10.0
        set bw1 [$null1 set bytes_]
        set now [$ns now]
        puts $f1 "$now [expr $bw1/$time*8]"
        $null1 set bytes_ 0
        $ns at [expr $now+$time] "record"
        if { $counter == 10 } {
                puts "Time: $now"
                set counter 0
        }
        incr counter
}

proc finish {} {
        global ns nf
        $ns flush-trace
        close $nf
        puts "Done."
        exit 0
}

$ns run
}

--------------------------------------------------------

When the script is performed, it presents the results:

grajau.gta.ufrj.br::vidal [ 11 ] gdb ns
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (i386-redhat-linux), 
Copyright 1996 Free Software Foundation, Inc...
(gdb) run rsvp_uni.tcl
Starting program: /usr/local/home/Vidal/exemplos/ns rsvp_uni.tcl
using backward compatible Agent/CBR; use Application/Traffic/CBR instead

1  PATH EVENT at 2.001 : SID: 0 RATE: 500000 BUCKET: 5000 SENDER: 0
Time: 100
Time: 200
Time: 300

Program received signal SIGSEGV, Segmentation fault.
0x80a6ea9 in FILTER_SPEC::get_addr (this=0x8275788) at rsvp-objects.h:196
196       inline long get_addr() { return con->addr; };
(gdb) where

#0  0x80a6ea9 in FILTER_SPEC::get_addr (this=0x8275788)
    at rsvp-objects.h:196
#1  0x80a1af0 in RSVPAgent::process_resv_message (this=0x8223b38, 
    msg=0x829df00, fromhop=1) at rsvp.cc:930
#2  0x80a0370 in RSVPAgent::give (this=0x8223b38, p=0x8247dd8, 
    ret=0x83010d8) at rsvp.cc:481
#3  0x80a790f in RSVPChecker::recv (this=0x83010d8, p=0x8247dd8, h=0x0)
    at rsvp-link.cc:75
#4  0x80532f0 in Connector::send (this=0x82fd7d0, p=0x8247dd8, h=0x0)
    at connector.h:53
#5  0x8053755 in TTLChecker::recv (this=0x82fd7d0, p=0x8247dd8, h=0x0)
    at ttl.cc:81
#6  0x804f89a in NsObject::handle (this=0x82fd7d0, e=0x8247dd8)
    at object.cc:109
#7  0x804d1a3 in Scheduler::dispatch (this=0x823a480, p=0x8247dd8, 
    t=301.00096000000002) at scheduler.cc:101
#8  0x804d1ca in Scheduler::dispatch (this=0x823a480, p=0x8247dd8)
    at scheduler.cc:107
#9  0x804d10a in Scheduler::run (this=0x823a480) at scheduler.cc:83
#10 0x804d38a in Scheduler::command (this=0x823a480, argc=2, 
    argv=0xbfffdb14) at scheduler.cc:167
#11 0x80b59a7 in TclClass::dispatch_cmd ()
#12 0x4000c61f in OTclDispatch (cd=0x8228a58, in=0x81dd348, argc=3, 
    argv=0xbfffdb58) at otcl.c:421
#13 0x80b82eb in TclInvokeStringCommand ()
#14 0x80cfb2d in TclExecuteByteCode ()
#15 0x80b8a91 in Tcl_EvalObj ()
#16 0x80cfd3e in TclExecuteByteCode ()
---Type <return> to continue, or q <return> to quit---
#17 0x80b8a91 in Tcl_EvalObj ()
#18 0x80e9edf in TclObjInterpProc ()
#19 0x80e99d8 in InterpProc ()
#20 0x4000c773 in OTclDispatch (cd=0x8228a58, in=0x81dd348, argc=2, 
    argv=0xbfffe740) at otcl.c:464
#21 0x80b82eb in TclInvokeStringCommand ()
#22 0x80cfb2d in TclExecuteByteCode ()
#23 0x80b8a91 in Tcl_EvalObj ()
#24 0x80e9edf in TclObjInterpProc ()
#25 0x80e99d8 in InterpProc ()
#26 0x4000c61f in OTclDispatch (cd=0x822c870, in=0x81dd348, argc=2, 
    argv=0xbfffefd0) at otcl.c:421
#27 0x80b82eb in TclInvokeStringCommand ()
#28 0x80cfb2d in TclExecuteByteCode ()
#29 0x80b8a91 in Tcl_EvalObj ()
#30 0x80e0600 in Tcl_EvalFile ()
#31 0x80e200e in Tcl_Main ()
#32 0x804ac45 in main (argc=2, argv=0xbffff9f0) at tclAppInit.cc:59
(gdb) 
(gdb) print this
$1 = (FILTER_SPEC *) 0x8275788
(gdb) list 
191        */ rsvp-objects.h
192     class FILTER_SPEC : public RSVPobject {
193     public:
194       FILTER_SPEC(nsaddr_t src, char ip6);
195       FILTER_SPEC(unsigned char *cont);
196       inline long get_addr() { return con->addr; };
197       void dump_object();
198     private:
199       struct construct {
200        long addr;

The  scripts of rsvp/ns too presents many problems then I created this simple script. 


Thanks in advance.

Paulo Cesar