Re: [ns] How to send a packet to previous node

2008-11-11 Thread Teerawat Issariyakul
Dear Howard, The easiest way to transmit from one NsObject (e.g. Nodes) to another is through a (C++ and Tcl) Connector object. A connector has two pointers to NsObjects: target_ and drop_. In the OTcl domain, it uses an OTcl commands target and drop (followed by the name of the NsObject) to

Re: [ns] How to send a packet to previous node

2008-11-11 Thread howardgod howardgod
Deer Teerawat First, thanks for reply. My timing for send a packet to previous node is when queue received a packet I will computer some information in packet's header. And in some circumstances I will send a packet back to previous hop. Let previous hop knows the result I computer in current

Re: [ns] How to send a packet to previous node

2008-11-11 Thread howardgod howardgod
Deer Teerawat I already know how to transmit to node. 1.generate new packet 2.fill common header and destination address 3. target-recv(p,h) but my problem is that, I can't find out previous hop's address. My purpose is to send a packet to previous node in IFQ. But when packet received by queue's

Re: [ns] How to send a packet to previous node

2008-11-11 Thread Teerawat Issariyakul
Dear Howard, Say you have a topology like (n1)--(n2). Usually, packet will flow from (n1) to (n2). When you want to send a packet from (n2) back to (n1), you can do the following. 1. Define an instvar $conn (whose class Connector) of n2 2. Put the following in the Tcl simulation script [$n2

[ns] How to send a packet to previous node

2008-11-10 Thread howardgod howardgod
-- Forwarded message -- From: howardgod howardgod [EMAIL PROTECTED] Date: 2008/11/8 Subject: How to send a packet to previous node To: ns-users@isi.edu I want to send a packet to previous node. And I don't know how to find previous node's ID and where to fill the ID. I found