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

[ns] communication between agents. (fwd)




Hi,

I am trying to find out how to pass a message string between two agents
attached to the same node.
I've looked at the documentation and at some examples but can not figure
it out by myself.  I am sorry to be bothering you, but I honestly can't
figure this out as I don't have any experience using C++ or tcl...

set tcp_src1 [new Agent/TCP]
set tcp_snk1 [new Agent/TCPSink]

$ns_ attach-agent $n0 $tcp_src1
$ns_ attach-agent $n0 $tcp_snk1

In the actual source code of TCPSink, how would one go about passing a
message to the TCP agent when something is received
(in Agent/TCPSink::recv(Packet* pkt, Handler*) function)

Please do not ignore this request as my (undergraduate) thesis is going to
burn if I don't figure this out soon.

Thank you very much
Alex.