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

[ns-users] Segmentation fault ns2.1b5




I am writing a script which will perform one task (ping a remote host)
then, after the packet has been received, establish an FTP over TCP
connection and continue to send. Here is the appropriate excerpt from
my tcl script:

p0 and p1 are the sending and receiving Ping agents.

-----------------------------------------------------------
#Define a 'recv' function for the class 'Agent/Ping'
Agent/Ping instproc recv {from rtt seqno size} {
        $self instvar node_
        global ns
        global n0
        global n3
        global p0
        global p1

	puts "node [$node_ id] : rx pkt $seqno from $from: RTT $rtt ms."
        
        delete $p0
        delete $p1
        # begin the second phase
        set p2 [new Agent/TCP/Reno]
        $ns attach-agent $n0 $p2
        set p3 [new Agent/TCPSink]
        $ns attach-agent $n3 $p3
        set ftp [new Application/FTP]
        $ftp attach-agent $p2
        $ns connect $p2 $p3
        $ftp start
    }
}
------------------------------------------------------------

I have had some issues with segmentation faults depending on the
bandwidth and latency assigned to the links. If it is low bandwidth,
high latency, then it seems stable. However, with high bandwidth, low
latency connections, it consistently seg faults when the ftp source is
started.

The issue I face at present is that ns will seg fault if I try to
insert a:

$p2 set windowInit_ 4

in order to improve the startup of $ftp. 

I was wondering whether it was appropriate to insert such a setting at
this point, or whether it needed to be set before the $ns start call? I
have tried this arrangement and it didn't seem to work.

many thanks,
rik wade
--
ATM-MM Group
University of Leeds
UK