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

Re: [ns] A SIMPLE QUESTION




>Content-return: allowed
>Date: Thu, 13 Jul 2000 13:44:58 +0200
>From: Prats Albert <[email protected]>
>Subject: [ns] A SIMPLE QUESTION
>To: "'ns'" <[email protected]>
>MIME-version: 1.0
>
>
>I have two nodes connected by one link. I attached a cbr sink to one node
>and an agent null to the other node. I want to know in the node W(1) when
>the cbr packets are sent from W(0). I know that there is a variable in the
>common headr (cmn) which is ts_ which would do this function but:
>
>- If I saw the variable ts_ in the W(0)....(looking for it in function
>initpkt of the agent.cc) the result is correct.
>
>- BUT if I saw this variable in the node W(1) when a packet arrives to agent
>null (looking for ni the function recv of the agent.cc) the result in
>wrong!!
>
>The below lines are the tcl script. Could anyone help me? Thanks in advance
>

don't know if that's the source of your problems, but you are using a deprecated 
syntax :

>set W(0) [$ns node]
>set W(1) [$ns node]
>
>$ns duplex-link $W(0) $W(1) 5Mb 2ms DropTail
>

>#set cbr [new Agent/CBR]

set cbr [new Application/Traffic/CBR] 


# and you need some sort of a transport agent. Say udp?

set udp [new Agent/UDP]
$ns attach-agent $W(0) $udp

>#$ns attach-agent $W(0) $cbr
>

$cbr attach-agent $udp

>set sink [new Agent/Null]
>$ns attach-agent $W(1) $sink
>
>#$ns connect $cbr $sink

$ns connect $udp $sink

>
>$ns at 5.0 "cbr start"
>$ns at 6.0 "cbr stop"
>
>------------------------------------------------------------
>Albert Prats Barrull
>Universitat Politecnica de Catalunya (SPAIN)
>[email protected]
>-------------------------------------------------------------

Tarik