[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.3 Ns-3 Source Code

Now that you have used some of the ns-3 helpers you may want to have a look at some of the source code that implements that functionality. The most recent code can be browsed on our web server at the following link: http://code.nsnam.org/?sort=lastchange. If you click on the bold repository names on the left of the page, you will see changelogs for these repositories, and links to the manifest. From the manifest links, one can browse the source tree.

The top-level directory for one of our repositories will look something like:

drwxr-xr-x   [up]   
drwxr-xr-x   bindings python                          files 
drwxr-xr-x   doc                                      files 
drwxr-xr-x   examples                                 files 
drwxr-xr-x   ns3                                      files 
drwxr-xr-x   regression                               files 
drwxr-xr-x   samples                                  files 
drwxr-xr-x   scratch                                  files 
drwxr-xr-x   src                                      files 
drwxr-xr-x   utils                                    files 
-rw-r--r-- 2009-03-24 00:51 -0700 505   .hgignore     file | revisions | annotate 
-rw-r--r-- 2009-03-24 00:51 -0700 1682  .hgtags       file | revisions | annotate 
-rw-r--r-- 2009-03-24 00:51 -0700 686   AUTHORS       file | revisions | annotate 
-rw-r--r-- 2009-03-24 00:51 -0700 14893 CHANGES.html  file | revisions | annotate 
-rw-r--r-- 2009-03-24 00:51 -0700 17987 LICENSE       file | revisions | annotate 
-rw-r--r-- 2009-03-24 00:51 -0700 3742  README        file | revisions | annotate 
-rw-r--r-- 2009-03-24 00:51 -0700 13505 RELEASE_NOTES file | revisions | annotate 
-rw-r--r-- 2009-03-24 00:51 -0700 6     VERSION       file | revisions | annotate 
-rw-r--r-- 2009-03-24 00:51 -0700 9257  regression.py file | revisions | annotate 
-rwxr-xr-x 2009-03-24 00:51 -0700 81285 waf           file | revisions | annotate 
-rwxr-xr-x 2009-03-24 00:51 -0700 28    waf.bat       file | revisions | annotate 
-rw-r--r-- 2009-03-24 00:51 -0700 26270 wscript       file | revisions | annotate 
-rw-r--r-- 2009-03-24 00:51 -0700 6636  wutils.py     file | revisions | annotate 

The source code is mainly in the src directory. You can view source code either by clicking on the directory name or by clicking on the files link to the right of the directory name. If you click on the src directory you be taken to the lising of the src subdirectories. If you click on core subdirectory, you will find a list of files. The first file you will find (as of this writing) is abort.h. If you click on abort.h link, you will be sent to the source file for abort.h.

Our example scripts are in the examples directory. The source code for the helpers we have used in this chapter can be found in the src/helpers directory. Feel free to poke around in the directory tree to get a feel for what is there and the style of ns-3 programs.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated on April, 2 2009 using texi2html 1.78.