New ns-3 modules: SMECN protocol and RNS algorithm implementations. Source code.

151 views
Skip to first unread message

Michal Paszta

unread,
Feb 12, 2013, 6:31:24 AM2/12/13
to ns-3-...@googlegroups.com
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.
ns3_rns_smecn.zip

Tom Henderson

unread,
Feb 13, 2013, 9:25:59 AM2/13/13
to Michal Paszta, ns-3-...@googlegroups.com
On 02/12/2013 03:31 AM, Michal Paszta wrote:
> 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.


Michal,
Are you able to follow through with the steps listed in the code review
process:
http://www.nsnam.org/developers/contributing-code/code-reviews/
or would you like assistance in posting a patch there? The next step
would be to prepare a code review issue on the Rietveld system, and
notify ns-3-reviews about your code.

I'd like to remind users that there are two main ways to contribute code:

1) propose to merge it with the rest of ns-3 source code by undergoing
the review process; this is typically a preferred approach if you would
like wider usage of your code and are willing to help to maintain it
over time

2) archive it for future users as 'Contributed Code', without making a
commitment to go through the review process or maintain it over time.
Contributed code is listed here:
https://www.nsnam.org/wiki/index.php/Contributed_Code#Contributed_code_not_maintained_by_the_project
We can archive a tarball for users who select this option.

- Tom

Michal Paszta

unread,
Feb 13, 2013, 10:08:21 AM2/13/13
to ns-3-...@googlegroups.com, Michal Paszta
On Wednesday, 13 February 2013 15:25:59 UTC+1, Tom Henderson wrote:

Michal,
Are you able to follow through with the steps listed in the code review
process:
http://www.nsnam.org/developers/contributing-code/code-reviews/
or would you like assistance in posting a patch there?  The next step
would be to prepare a code review issue on the Rietveld system, and
notify ns-3-reviews about your code.


Should I upload my code to Rietveld and then just post a link to it on the ns-3-reviews or should I repost the whole message like it is now (meaning: with all attachments)?

Thank you for the link. I don't know how come I haven't noticed that earlier...

Michal Paszta

unread,
Feb 13, 2013, 12:37:38 PM2/13/13
to ns-3-...@googlegroups.com, Michal Paszta
The code has been posted to rietveld: https://codereview.appspot.com/7304093/

For some reason I cannot see my message visible at ns-3-reviews Google group, although I did put the address in the CC field.
Reply all
Reply to author
Forward
0 new messages