Hi Tommaso,And thanks for the answer. I have some comments and solutions based on your key points:
IP assignment:
Although it would be great and ideal to have all the aspects of the scenario correctly simulated, the IP provision is the side piece of my puzzle for delegating route solicitation/advertisement in a Mobile IP scenario.I don't know if I should bother you with the details. But what I think I should do is to listen to your warning and stick to the normal ns-3 way of address assignment: manually, initially, never changing during simulation. I will write another question related to this issue soon.
Routing Protocol Change:
This one is much more important. Your answer scared me, especially because there is no start/stop method available in OLSR. I am ready to get my hands dirty as I can't skip this one like IP assignment. Being relatively new to this environment, I just had a look at the ns-3, list routing and OLSR code. For changing the routing object, I can see the following points:
-- I don't think I want to mess with ns-3's underlying aggregation mechanism to delete and replace the routing object. I will sink in it.
-- I just have to get past the ListRouting and get to the OLSR object and ...and press a reset button which does not exist (yet).
-- What that seems to be doable is to create a controlled "reset" button for OLSR that:
1. leaves some of the settings which are supplied by base classes and other interacting classes(like those hard-coded attributes in the a base method called GetTypeId() ) and the IP settings (supplied by SetIpv4() ) .
2. clear the rest of internal settings.
3. cancel all internal timers.
4. call OLSR's private DoStart() in a clean way.
What do you think? is this a common way of doing things in ns-3 ?
If this seems a hack or the over all design seems suspicious, kindly let me know so that we can discuss with more details. Your suggestions will be highly appreciated.
Thanks again
Vahid