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

[ns] Help me, please!!! (long)



Hi to all,
I have a great and urgent problem and I hope that someone could help
me.Excuse me for the long e-mail, but the problem needs to be well
explained.

I have to create a topology of 3 nodes (n0, n1, n2) with 4 agents:

agent A : TCP sender
agent B : TCP receiver
agent C : header compressor/decompressor
agent D : header compressor/decompresso

A and C are attached to node n0, D is attached to node n1, B is attached to
node n2.
Packets generated by A have to be received from C ; C compresses headers and
sends compressed packets to D, on node n1; after decompressing received
packets, D sends them to B on node n2. On the opposite direction, B sends
packet to D; D compresses headers and sends packets to C; C decompresses
packets and delivers them to A.
I have solved the problem in C++ when there are only two nodes, n0 with A
and C and n1 with D and B, using some appropriate pointers (target_ and
uptarget_) in the following way:

set ns [new Simulator]
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
$ns duplex-link $n0 $n1 0.144Mb 20ms DropTail
$ns duplex-link $n0 $n2 0.1444Mb 20ms DropTail

set mitt [new Agent/TCP]
$ns attach-agent $n0 $mitt

set ricv [new Agent/TCPSink]
$ns attach-agent $n1 $ricv
$ns connect $mitt $ricv

set compr [new Agent/ROHC]
$ns attach-agent $n0 $compr

set dcompr [new Agent/ROHC]
$ns attach-agent $n1 $dcompr
$ns connect $compr $dcompr

$mitt target $compr
$ricv target $dcompr
$compr uptarget $mitt
$dcompr uptarget $ricv

Instead, I'm not able to link D and B when using 3 nodes.

Could someone give me an idea?


Thanks in advance.

Best Regards

Sandro Petrizzelli
Last-year under-graduate, Electronic Engineering, Politecnico di Bari
(Italy)
(http://users.iol.it/sandry)