Hello Everyone,
As my Master Thesis project I implemented (and improved) a routing protocol called SMECN (Small Minimum Energy Communication Network) and an algorithm called RNS (Redundant Node Selection). As a development platform I chose ns-3 and now that the job is done I want to make it public so that others can use it too. I'd like to ask for a code review and if the code is good enough I will be very proud to see it added to the ns-3 development tree. If not, then at least it is now easy to find for other ns-3 users interested in using it. I am willing to correct and improve the code according to any guidelines provided.
Below you can find the description of what needs to be done to use the modules I created. I present them separately but they are intended to cooperate.
First of all, both algorithms require the possibility to change current transmission power level. There is an issue with this in WifiPhy, described
here. From the given possible fixes none was yet officially chosen so I just prepared my own minimum-influence patch to YansWifiPhy which provides a basic API to change Tx power level:
yans-wifi-phy-changable-tx-level.patch.Then I prepared two separate modules: one for RNS and one for SMECN. The basic rns module (including graphical documentation in rns.tar.gz or just the code in rns.patch) comes with all the necessary code, tests and documentation but without examples. This is because using RNS alone makes little sense. It is only useful in connection with another module: an application or a routing protocol. You can also view the
compiled full RNS documentation (it can be built locally using the Makefile provided in doc subdirectory of the tarball) to better understand my approach in implementing this algorithm.
Please, pay attention to the fact that the whole RNS module is implemented using template classes to allow functioning with various identifier types, not just Ipv4Address.
Here comes another patch, which modifies DSDV module to allow optional cooperation with RNS: dsdv_rns_compatibility.patch. Now it's possible to run rns-dsdv-example to see rns configured, aggregated and working.
The second module contains source code, test, examples and documentation for SMECN module, but without RNS support (smecn.tar.gz or smecn.patch). It can be used right after the yans-wifi patch is applied.
To use SMECN with RNS the last patch has to be applied: smecn_rns_compatibility.patch. It modifies the SMECN module and adds an rns-smecn-example (similar to the one made for dsdv).
I don't think it's a good idea to review all the code at once, but in case this is the preferred way I also submit a complete diff against rev 9235 of ns-3-dev with all code changes mentioned above: ns3_smec_rns.patch.
The code was developed in the ns-3-lr-wpan branch, but in the end I only used YansWifiPhy as a phy layer so all the patches included were tested against revision 9235 of ns-3-dev development tree. I think it should work with other revisions as well.
I hope that someone finds the modules useful and I'm looking forward to getting any feedback on the code.
Regards,
Michał Paszta
P.S. Sorry for putting everything in one zip file, but Google Groups wouldn't allow me to post patch files separately. See
here.