[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
destination
Hello,
I am programming a new agent for NS (coded in c++)
I have a topology and to each node is attached an agent called "wc".
My agent deceide himself about the next node to take but I don't know how to
send the packet to this specified node. (I tried to use "target" but it
doesn't seem to be what I want)
So my question is :
### How do you send a packet to a specific neighbor node ? ###
for example in c++ :
// Create a new packet
Packet* pkt = allocpkt();
// Choose the next node
int next_node_id = 1; /* 1 is a neighbor */
// set the destination node :
???
???
// send the packet
send(pkt, 0);
what should be instead of "???" ?
Answer me please. I am a beginner in NS but I nedd this to improve.
yoann
********************************
** Student at ENST, Paris **
** [email protected] **
********************************