Skip to content

Getting Started

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

Getting Started with ccns3Sim

This section describes how to download and build the CCNx 1.0 module for NS3. The module will be called ccns3Sim inside the NS3 system.

Complete Walkthrough

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

If you already have an NS3 setup, you can skip to cloning our git repo in to your src/ directory and applying the ns-3.24.1 patch.

We include a set of launch configurations in src/ccns3Sim/eclipse-launch that have some path dependencies. See the Integrating with the Eclipse IDE section for information about that if you use Eclipse and want to use our launch configurations for running unit tests and examples in the IDE.

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