2

I'm trying to create a simulation in UNET Stack in which I have a route and I send packets from that from one node to another through the given route.

I do not want to use add route in simulation but instead as I create nodes dynamically i.e once I create nodes they themselves figure out the route. Is this possible to create a agent and how can I do it ?

pr0py_s
  • 171
  • 9

1 Answers1

4

You can do that by sending RouteDiscoveryNtf to the router agent. For an example of how to do this, see previous discussion on Adding route into routing table using agent

Mandar Chitre
  • 2,110
  • 6
  • 14
  • 1
    I have done almost the same. But when I type routes in the command shell I do not get anything. So how do I check if the routes are added to the routing table ? – pr0py_s Aug 26 '19 at 07:52
  • If you're running in real time mode and have a shell open to the specific node, you should be able to see the routes with the "routes" command. – Mandar Chitre Aug 27 '19 at 08:12
  • 1
    FYI ... UnetStack 3.1 now supports EditRoute message that allows you to add/delete/edit routes dynamically – Mandar Chitre Apr 07 '20 at 14:38