[ns] Help: address of an agent's associated node

Pedro Vale Estrela pedro.estrela at gmail.com
Mon Jan 9 08:41:39 PST 2006


At the time of creation, add to it an instance variable called mynode, eg

$tap set mynode [$node id]

then, at run time just check the variable:

otcl: $tap set mynode 
C++  tcl.evaluate("%s set mynode", name());


Pedro Vale Estrela


> -----Original Message-----
> From: ns-users-bounces at ISI.EDU [mailto:ns-users-bounces at ISI.EDU] On Behalf
> Of Madhu Hosaagrahara
> Sent: segunda-feira, 2 de Janeiro de 2006 20:29
> To: ns-users at ISI.EDU
> Subject: [ns] Help: address of an agent's associated node
> 
> 
> Hello,
> 	I've written a class that derives from Tap (defined in ~ns/mac/
> mac.h) and I've managed to have it associated with the mac object and
> listen to objects promiscuously.
> 	My question is how do I get the address of the node with which this
> Tap is associated?
> Thanks,
> ~Madhu.




More information about the Ns-users mailing list