Get node's id or ip from packet or mactxqueue

171 views
Skip to first unread message

Alexis Tcach

unread,
Jun 16, 2015, 2:55:39 PM6/16/15
to ns-3-...@googlegroups.com
Hi,I'm in an application and have a queue callback in wich I have the queued packet and the queue itself. Is it possible to get the node that contauns them both ?
I have tried iterate through the aggregation if the object (from queue) but it's the queue alone.
Regards

Konstantinos

unread,
Jun 16, 2015, 3:53:27 PM6/16/15
to ns-3-...@googlegroups.com, atc...@gmail.com
Hi Alexis, 

The applications are aggregated on the node, hence you can get the node object from the application.
ie. 
Ptr<Node> node = this->GetObject<Node>();

where 'this' refers to the application object.

Regards,
K.

Alexis Tcach

unread,
Jun 17, 2015, 11:23:49 AM6/17/15
to ns-3-...@googlegroups.com, atc...@gmail.com
Thanks !
Just got it from the "from" mac address of any packet in the output queue I had.
Regards !!

Francisco Eduardo Balart Sanchez

unread,
Nov 23, 2016, 6:50:40 PM11/23/16
to ns-3-users, atc...@gmail.com
Good day:

Is it possible to retrieve the node id just from the Mac48Address ?

regards

Tommaso Pecorella

unread,
Nov 30, 2016, 5:32:00 PM11/30/16
to ns-3-users, atc...@gmail.com
Generally speaking, no.
The only thing you can do is to use GetNode and crawl though all its interfaces to see if they have the MAC address you want, but it's as bad as... well, think to the most sick thing you can think of.

T.

Francisco Eduardo Balart Sanchez

unread,
Nov 30, 2016, 5:40:34 PM11/30/16
to ns-3-users, atc...@gmail.com
Thanks for the response Tommasso, i created a different thread to completely explain why i want to do this, but i provide way more information of the discussions i dig in the groups as well as the current trace callbacks i´m using to see if with that i can get the node id
I humbly request you take a look to my thread if is possible when you have time, thanks in advance and best regards

 
Reply all
Reply to author
Forward
0 new messages