dent Code
Status: Pre-Alpha
Brought to you by:
erico
5-17-06 Eric O'Laughlen (eric@olaughlen.net)
DESCRIPTIONS
Dent is a network modeling and analysis tool based upon
Mozilla technologies and the packet capture library
(pcap). The software encompasses three components: a
browser extension, a local daemon and shell, and a
back-end database for data aggregation, modeling, and
analysis.
At the foundation, the application uses Mozilla
technologies: Netscape Portable Runtime (nspr), XPCOM,
NSS, Spider Monkey, and other Mozilla libraries.
Furthermore, it uses the packet capture library for
low-level protocol analysis.
The application allows a developer to trace network
traffic via the Firefox browser, analyze TCP/IP and
HTTP according to performance and optimization models,
store certain data in a database, and then render
graphical representations of the analyzed network
traffic and models within the browser.
Moreover, the application is scriptable with JavaScript,
which allows rapid application testing, measurement and
automation.
This distribution contains the xpcom component:
a C++/XPCOM wrapper for the libpcap.a library.
FAQ
Q1. Where does the project/application name come from?
A1. We picked dent because we want to make a "dent" in
performance and optimization analysis and we like
the character Arthur Dent in the Douglas Adams'
books. When analyzing and optimizing, don't panic.
Q2. What is currently in the repository?
A2. There is an XPCOM component wrapper for the pcap
library and an application under "shell"
that serves as an HTTP daemon and shell-like client.
The server listens on localhost:8000 now and will
serve HTML, CSS, and JavaScript from "shell/html."
There is also a class wrapper for libgd that provides
the graphing capability.
There is also a proof-of-concept Firefox extension at:
http://olaughlen.net/dent/components. It will download
an XPCOM component to Firefox and list the interfaces
on the local computer if given permission. It does nothing else.
However, you must install a cert for it to work. A test one is
provided on the webpage.
DISTRIBUTION
1. Firefox/Mozilla SDK/source -
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.1/source/firefox-1.5.0.1-source.tar.bz2
2. freetype-2.1.10 - http://freetype.sourceforge.net/index2.html
3. gd-2.0.33 - http://www.boutell.com/gd/
4. expat 2.0 - http://sourceforge.net/projects/expat/
5. readline (4.3) and history (4.3) libraries from fink.
6. Pcap library 0.8.3; source from fink.
7. TCL 8.4 at http://tcl.sourceforge.net/
8. zlib 1.2.3 at http://www.zlib.net
9. libpng 1.2.8 at http://www.libpng.org/pub/png/libpng.html
10. sqlite 3.0 at http://www.sqlite.org/
Many of the libs are in the repository temporarily under unitl build
environment settles. So you can look there to mimic my current
build env.
Check the Makefile and Makefile.global for dependencies, etc.
Eventually, we'll get a configure script working....
ENVIRONMENT
Compiled and tested on Mac OS 10.4.5 - PowerBook PPC
The versions of the compiler and various libraries used:
darwin-2:~/$ g++ --version
powerpc-apple-darwin8-g++-4.0.0 (GCC) 4.0.0
(Apple Computer, Inc. build 5026)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying
conditions. There is NO warranty; not even for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
n-2:~/dent/shell eolaughlen$ otool -L dent
dent:
/sw/lib/libexpat.0.dylib (compatibility version 6.0.0, current version 6.0.0)
/sw/lib/libreadline.4.dylib (compatibility version 4.2.0, current version 4.3.0)
@executable_path/libxpcom.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/libxpcom_core.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/libmozjs.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/libplds4.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/libplc4.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/libnspr4.dylib (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Tcl.framework/Versions/8.4/Tcl (compatibility version 8.4.0, current version 8.4.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/usr/local/lib/libgd.2.dylib (compatibility version 3.0.0, current version 3.0.0)
/usr/local/lib/libpng.3.dylib (compatibility version 3.0.0, current version 3.0.0)
/usr/local/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.8.0)
/usr/local/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.3.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 92.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.5)
Firefox: version 1.5.0.1
COMPILATION and RUNNING
1. In order to compile the source download the firefox source from somewhere like:
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.1/source/firefox-1.5.0.1-source.tar.bz2
For my makefile the root dir is under $HOME (e.g.,
$HOME/mozilla/dist). Also, use the following
.mozconfig for building:
ac_add_options --enable-application=browser
mk_add_options MOZ_OBJDIR=$HOME/mozilla/objdir
. $HOME/mozilla/browser/config/.mozconfig
2. Download the source for the program and un-pack it under the $HOME
directory as well. So you'll have a structure that looks like:
~/component
...
~/mozlla
/browser
/dist
...
3. After everything is put together, type "make."
4. To run the pcap component and the "dent" program on Mac
OS X, export the following (or make sure the appropriate
libraries are found):
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$HOME/mozilla/dist/lib
Otherwise you'll get an error like:
---
sudo ./dent -c config.xml (under dent/shell)
dyld: Library not loaded: @executable_path/libxpcom_core.dylib
Referenced from: ...
Reason: image not found
Trace/BPT trap
---