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

[ns] Getting the sink of TCP connection



If I use the command:

set tcp0 [$ns create-connection TCP $n0 TCPSink $n2 1]

I only get the handle to the source agent.

How can I afterwards get the handle to the sink agent?

I tried set sink0 [$tpc0 target] but it didn't work.

I tried to do $sink0 reset and got  the following error message:

--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
        _o12: no target for slot -1
        _o12 type: Classifier/Hash/Dest
content dump:
classifier _o12
        0 offset
        0 shift
        2147483647 mask
        3 slots
                slot 0: _o61
                slot 1: _o22
                slot 2: _o22
        -1 default
---------- Finished standard no-slot{} default handler ----------

If anybody knows the right way to use the target command (or any other command to get the handle to the target of a given
agent), please let me know.

Thank you

Nikos