From Nsnam
Jump to: navigation, search

As part of their Google Summer of Code 2013 applications to ns-3, we require that students produce a patch for ns-3. This will allow us to gauge your ability to dive into source code, understand it, make a modification, and proceed to build and verify if your modification works.

A patch in this regard can be at least one of the following:

  • Pick a bug in our Bugzilla and try to fix it.
  • If you already have contributed a patch for ns-3, point us to the relevant commits in our code repository.
  • If not the above, complete the minimum requirement test given below.

Note, a patch here does not have to be merged for you to qualify. It only serves to show us how comfortable you are with diving into and hacking on a large code base. The more prowess you demonstrate through the patch, the higher your chances of being accepted.

Minimum requirement patch

Setting up the environment

Perform the following steps:

  • Clone ns-3-dev:
 $: hg clone
  • Apply the ns-3 GSOC patch for the test
 $: cd ns-3-dev
 $: git clone gsoc-patch/
 $: patch -p1 < gsoc-patch/ns3-gsoc-patch-test
  • Verify if you can build ns-3 and run the test script
 $: ./waf configure --disable-python --enable-examples
 $: ./waf build
 $: ./waf --run testapp-sim


The patch you applied above adds the following:

  • An ns-3 application with the classname TestApplication. The corresponding files are src/applications/model/testapp.{cc ,.h}.
  • A simulation script scratch/

Your objective is to fill up the missing sections in the TestApplication class and in order to be able to:

  • Have TestApplication print "Hello World!" when started and "Goodbye World!" when stopped. For this, you will need to implement two private methods provided by the "Application" base class (see the header file testapp.h). Also try looking at the code of other applications inside src/application/model/ for hints on what to do.
  • Within the simulation script, add "TestApplication" to the single node that is initiated, and have it started and stopped at the first and second second of the simulation respectively. As a hint, look for public methods available within the "Node" and "Application" class. You can also look at other example scripts within the examples/ or src/*/examples/ folders for ideas.

What to submit

  • A patch atop the above provided files that achieves the said objective. In your application, point us to a publicly available URL where you've hosted the patch (like a "gist" on for instance). See also some guidelines here about formatting patches for review. If you need help with this step, contact the ns-3 Org Admin (Lalith Suresh) for advice.