Skip to content

Instantly share code, notes, and snippets.

@RichardWithnell
Last active August 29, 2015 14:14
Show Gist options
  • Save RichardWithnell/f241448d2c97e0c10d9a to your computer and use it in GitHub Desktop.
Save RichardWithnell/f241448d2c97e0c10d9a to your computer and use it in GitHub Desktop.
NS3 DCE Quickstart
#Builds DCE for Debian Wheezy 64 bit, clean install to full dce-linux
sudo apt-get install mercurial bzr git python-dev libpcap-dev python-pygraphviz python-pygoocanvas g++ libqt4-dev libc6-dbg libdb-dev bison flex pkg-config cvs autoconf cmake
cd ~/
mkdir Software/dce
cd Software/dce
hg clone http://code.nsnam.org/bake bake
export BAKE_HOME=`pwd`/bake
export PATH=$PATH:$BAKE_HOME
export PYTHONPATH=$PYTHONPATH:$BAKE_HOME
bake.py configure -e pygccxml -e pybindgen-0.16.0.825
bake.py deploy
bake.py configure -e dce-linux-1.4
wget https://www.dropbox.com/s/tuuagp3lmv8hoj5/bakefile.xml?dl=0 -O bakefile.xml
bake.py download
wget https://gist.githubusercontent.com/RichardWithnell/13dff5f7a939f94310f1/raw/d221389c4c650b05d29367dd4e5779bd4753bffb/pcap-flush.patch
patch -p1 -d source/ns-3.21/ < pcap-flush.patch
wget https://gist.githubusercontent.com/RichardWithnell/f241448d2c97e0c10d9a/raw/bf7ae75a1d1d39475c443061c54f379b1816d781/extract-system-config.patch
patch -p1 -d source/elf-loader/ < extract-system-config.patch
bake.py build
--- a/extract-system-config.py 2015-01-29 19:54:14.081956129 +0000
+++ b/extract-system-config.py 2015-01-29 20:08:49.893976209 +0000
@@ -64,7 +64,10 @@
if result is None:
self.write_back_line ()
return item
- item.attributes[result.group (1)] = result.group (3)
+ if str(result.group(3)).strip() == "":
+ item.attributes[result.group(1)] = "0"
+ else:
+ item.attributes[result.group(1)] = str(result.group(3)).strip()
return item
def find_struct (self, struct_type_name):
return self.find_by_name ('DW_TAG_structure_type', struct_type_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment