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

[ns] A SIMPLE QUESTION




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

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]
$ns attach-agent $W(0) $cbr

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

$ns connect $cbr $sink

$ns at 5.0 "cbr start"
$ns at 6.0 "cbr stop"

------------------------------------------------------------
Albert Prats Barrull
Universitat Politecnica de Catalunya (SPAIN)
[email protected]
-------------------------------------------------------------