Hi Basim,
The connection from a node to a TCP agent is fairly subtle. Basically, a Node has an instvar dmux_ which is a classifier. It install a TcpAgent and TcpSink in the "slot" of the classifier dmux_. This occurs when you invoke commands like $ns attach-agent $n0 $udp0 You may find the details in the book (chs 4 and 6) from Springer: T. Issaraiyakul and E. Hossain, "Introduction to Network Simulator NS2", Springer 2008. Here is the link: http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You might also find the following slide useful: http://www.ece.ubc.ca/~teerawat/NS2.htm<http://www.ece.ubc.ca/%7Eteerawat/NS2.htm> Best Regards, Teerawat
