Skip to content

Getting Started

Marc Mosko edited this page Feb 9, 2016 · 19 revisions

Getting Started with ccns3Sim

Downloading code

Here is a complete walk through of starting with nothing and building the whole ns3 simulator with our code

mkdir ~/ns3
cd ~/ns3
wget https://www.nsnam.org/release/ns-allinone-3.24.1.tar.bz2
tar -xjf ns-allinone-3.24.1.tar.bz2

# This export is not essential, just used to make the example easier
export NSDIR=~/ns3/ns-allinone-3.24.1/ns-3.24.1

cd $NSDIR/src
# It is recommended that you fork the project in to your own workspace so you 
# can generate pull requests for modifications.
git clone git@github.com:PARC/ccns3Sim.git
   
cd $NSDIR
patch -p 2 < $NSDIR/src/ccns3Sim/ns-3.24.1-patch

# Use your preferred configure command here.  This one disables things we
# do not need for a simple build and enables examples and tests
./waf configure --enable-examples --enable-tests --disable-python --disable-nsclick --disable-gtk
./waf build

Integrating with ns3

Our code requires ns-3.24.1.

  1. You should download the code (or clone the repository) to the ns-3.24/src/ccnx directory.

  2. execute this command from the ns-3.24.1 directory:

ns-3.24.1> patch -p 2 < src/ccns3Sim/ns-3.24.1-patch

  1. Re-configure the system. Enabling the examples and tests is usually a good thing to do during development or when learning the CCNx module code.

ns-3.24> ./waf configure [--enable-examples] [--enable-tests]

Compiling

We use the same compile procedure as normal NS3:

ns-3.24> ./waf clean build

Running the code

Running examples

Running unit tests

Integrating with Eclipse

You should be able to follow the normal NS3 method for setting up eclipse. We provide Eclipse run configurations for our unit tests and examples in src/ccns3Sim/eclipse-launch, but they assume your Eclipse project is name 'ns-allinone-3.24.1'. If your eclipse project has a different name you will need to update all those files. You can use File | Import and select 'Run/Debug' launch configurations.

You should also exclude ns-3.24.1/doc from the build. If you happen to "./waf doxygen" it will cause problem in Eclipse as it tries to refresh that very large directory structure.

  • Home
  • [Getting Started](Getting Started)
  • Developer
    • [Node Architecture](Node Architecture)
    • [Header doc format](Header doc format)
    • [Unit Tests](Unit Tests)
    • [Overriding Implementations](Overriding Implementations)
    • [Code Coverage](Code Coverage)

Clone this wiki locally