As part of their Google Summer of Code 2018 applications to ns-3, we require that students produce at least a small amount of code 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:
- If you already have contributed a patch for ns-3 in the past, point us to the relevant commits in our code repository or the bug tracker issue, and your patch requirement is satisfied. If you have code posted somewhere else (GitHub, for example, or a class project page) that you feel is a good indicator of your ability to write ns-3 code, please point us to the URL.
- If not the above, either complete the minimum requirement test given below, or pick a bug in our Bugzilla that does not already have a patch pending, and try to fix it.
Minimum requirement patch
Setting up the environment
Perform the following steps (you may want to review our Installation page):
- Download the ns-3.27 release, or clone it from Mercurial:
$: hg clone http://code.nsnam.org/ns-3.27
- Verify if you can build ns-3 and run the test suite:
$: ./waf configure --disable-python --enable-examples $: ./waf build $: ./test.py
In ns-3, a preferred way to split module dependencies is to use a callback. For instance, a hypothetical L3 protocol can directly call methods on a NetDevice (e.g., Send()) to perform operations. But when a NetDevice has to call the above layer, the callback mechanism comes into play: since it is not possible for a NetDevice to know what future network layer will be placed on top of it, it must rely, in general, on callbacks. This kind of connection is prevalent inside a Node: if you take a look at node.cc, you will see that forwarding packets from NetDevice to a L3 layer is done through callbacks. Any L3 protocol has to register its own handler that will be called if the protocol number matches the number on the packet.
The objective of this patch is to add a new, simple, basic, L3 protocol, with the protocol number 99. The new protocol implementation should be registered on the node, and it should be able to send a ping packet, and receive a response. That is, it does not need to do routing or introduce any new addressing scheme; it merely needs to be able to send a 'ping-like' packet to the NetDevice, and receive a packet (destined to protocol 99) from a NetDevice. A simple print on the screen at the send and receive moment is enough to show a working implementation.
What to submit
- A patch to ns-3.27 that accomplishes the objectives. In your GSoC application, point us to a publicly available URL where you've hosted the patch (such as a "gist" on github.com 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 (Tom Henderson) for advice.
Note: Keep your solution private by pasting the link in your application to Google, not posting it on the mailing list.