[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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/ns-3-dev. There, you will see the Mercurial
summary page for our ns-3
development tree.
At the top of the page, you will see a number of links,
summary | shortlog | changelog | graph | tags | files
Go ahead and select the files
link. This is what the top-level of
most of our repositories will look:
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-07-01 12:47 +0200 560 .hgignore file | revisions | annotate -rw-r--r-- 2009-07-01 12:47 +0200 1886 .hgtags file | revisions | annotate -rw-r--r-- 2009-07-01 12:47 +0200 1276 AUTHORS file | revisions | annotate -rw-r--r-- 2009-07-01 12:47 +0200 30961 CHANGES.html file | revisions | annotate -rw-r--r-- 2009-07-01 12:47 +0200 17987 LICENSE file | revisions | annotate -rw-r--r-- 2009-07-01 12:47 +0200 3742 README file | revisions | annotate -rw-r--r-- 2009-07-01 12:47 +0200 16171 RELEASE_NOTES file | revisions | annotate -rw-r--r-- 2009-07-01 12:47 +0200 6 VERSION file | revisions | annotate -rw-r--r-- 2009-07-01 12:47 +0200 10946 regression.py file | revisions | annotate -rwxr-xr-x 2009-07-01 12:47 +0200 88110 waf file | revisions | annotate -rwxr-xr-x 2009-07-01 12:47 +0200 28 waf.bat file | revisions | annotate -rw-r--r-- 2009-07-01 12:47 +0200 35395 wscript file | revisions | annotate -rw-r--r-- 2009-07-01 12:47 +0200 7673 wutils.py file | revisions | annotate
Our example scripts are in the examples
directory. If you click on examples
you will see a list of files. One of the files in that directory is first.cc
. If
you click on first.cc
you will find the code you just walked through.
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 will be taken to the listing of the src
subdirectories. If you
then 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 the
abort.h
link, you will be sent to the source file for abort.h
which
contains useful macros for exiting scripts if abnormal conditions are detected.
The source code for the helpers we have used in this chapter can be found in the
src/helper
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 November 13, 2009 using texi2html 1.82.