Compare commits

..

11 Commits

Author SHA1 Message Date
Brandon Heller 496cd25d37 Update oftest repo location
Fixes Issue 41: https://github.com/mininet/mininet/issues/41

Reported-by: sublinhado on GitHub
2012-06-14 11:10:39 -07:00
Bob Lantz d9fd4ea245 Add VM install script 2012-05-23 22:37:53 -07:00
Bob Lantz 88dd4f7329 Change wireshark install to reflect new repository location. 2012-05-13 14:37:45 -07:00
Bob Lantz 49d84f7cfc Fix poller to only check if stdin and node are readable.
Fixes busy waiting and excessive CPU usage in CLI.
Thanks to James Zeng for pointing this out!
2012-05-10 17:35:34 -07:00
Bob Lantz 7676c17f27 Add missing libconfig-dev dependency for oflops. 2012-04-25 17:39:55 -07:00
Brandon Heller 6143bb1395 Merge pull request #31 from mininet/devel/wireshark
Devel/wireshark
2012-04-12 10:12:53 -07:00
Bob Lantz a8c1965b90 Fix typo. 2012-04-11 13:21:07 -07:00
Bob Lantz 4bd1a61353 Add install message for wireshark dissector. 2012-04-10 21:47:29 -07:00
Bob Lantz edd1d0f3a4 Support libwireshark[0,1] for 11.04 and 11.10 2012-04-10 21:34:07 -07:00
Bob Lantz 0919b7ca67 Use correct non-authenticated clone for of-dissector. 2012-04-10 21:23:26 -07:00
Bob Lantz 1902dd2e3a Add support for updated wireshark plugin.
Need to verify this works with 11.04.
2012-04-10 21:14:11 -07:00
6 changed files with 89 additions and 45 deletions
-2
View File
@@ -1,2 +0,0 @@
include mnexec.c
exclude bin/mnexec
+2 -4
View File
@@ -21,12 +21,10 @@ test: $(MININET) $(TEST)
-echo "Running tests"
mininet/test/test_nets.py
install:
install: mnexec
cp mnexec bin/
python setup.py install
develop:
python setup.py develop
doc:
doxygen doxygen.cfg
+2 -2
View File
@@ -319,8 +319,8 @@ class CLI( Cmd ):
nodePoller = poll()
nodePoller.register( node.stdout )
bothPoller = poll()
bothPoller.register( self.stdin )
bothPoller.register( node.stdout )
bothPoller.register( self.stdin, POLLIN )
bothPoller.register( node.stdout, POLLIN )
if self.isatty():
# Buffer by character, so that interactive
# commands sort of work
+12 -24
View File
@@ -2,33 +2,26 @@
"Setuptools params"
import os, setuptools
import distutils.command.build_scripts
import distutils.command.clean
import distutils.ccompiler
from setuptools import setup, find_packages
from os.path import join
scripts = [ join( 'bin', filename ) for filename in [
'mn', 'mnexec' ] ]
modname = distname = 'mininet'
class build_scripts(distutils.command.build_scripts.build_scripts):
def run(self):
distutils.ccompiler.new_compiler().link_executable(["mnexec.c"], "bin/mnexec")
distutils.command.build_scripts.build_scripts.run(self)
class clean(distutils.command.clean.clean):
def run(self):
if os.path.exists("bin/mnexec"):
os.unlink("bin/mnexec")
distutils.command.clean.clean.run(self)
setuptools.setup(
setup(
name=distname,
version='0.0.0',
description='Process-based OpenFlow emulator',
author='Bob Lantz',
author_email='rlantz@cs.stanford.edu',
packages=setuptools.find_packages(exclude='test'),
packages=find_packages(exclude='test'),
long_description="""
Insert longer description here.
""",
classifiers=[
"License :: OSI Approved :: BSD",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Programming Language :: Python",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
@@ -40,10 +33,5 @@ setuptools.setup(
'setuptools',
'networkx'
],
scripts=[
'bin/mn',
'bin/mnexec'
],
cmdclass={"build_scripts": build_scripts,
"clean": clean}
scripts=scripts,
)
+39 -13
View File
@@ -146,16 +146,6 @@ function of {
make
sudo make install
# Install dissector:
sudo apt-get install -y wireshark libgtk2.0-dev
cd ~/openflow/utilities/wireshark_dissectors/openflow
make
sudo make install
# Copy coloring rules: OF is white-on-blue:
mkdir -p ~/.wireshark
cp ~/mininet/util/colorfilters ~/.wireshark
# Remove avahi-daemon, which may cause unwanted discovery packets to be
# sent during tests, near link status changes:
sudo apt-get remove -y avahi-daemon
@@ -169,6 +159,39 @@ function of {
sudo sh -c "echo 'blacklist net-pf-10\nblacklist ipv6' >> $BLACKLIST"
}
function wireshark {
echo "Installing Wireshark dissector..."
sudo apt-get install -y wireshark libgtk2.0-dev
if [ "$DIST" = "Ubuntu" ] && [ "$RELEASE" != "10.04" ]; then
# Install newer version
sudo apt-get install -y scons mercurial libglib2.0-dev
sudo apt-get install -y libwiretap-dev libwireshark-dev
cd ~
hg clone https://bitbucket.org/barnstorm/of-dissector
cd of-dissector/src
export WIRESHARK=/usr/include/wireshark
scons
# libwireshark0/ on 11.04; libwireshark1/ on later
WSDIR=`ls -d /usr/lib/wireshark/libwireshark* | head -1`
WSPLUGDIR=$WSDIR/plugins/
sudo cp openflow.so $WSPLUGDIR
echo "Copied openflow plugin to $WSPLUGDIR"
else
# Install older version from reference source
cd ~/openflow/utilities/wireshark_dissectors/openflow
make
sudo make install
fi
# Copy coloring rules: OF is white-on-blue:
mkdir -p ~/.wireshark
cp ~/mininet/util/colorfilters ~/.wireshark
}
# Install Open vSwitch
# Instructions derived from OVS INSTALL, INSTALL.OpenFlow and README files.
function ovs {
@@ -261,7 +284,7 @@ function oftest {
# Install oftest:
cd ~/
git clone git://openflow.org/oftest
git clone git://github.com/floodlight/oftest
cd oftest
cd tools/munger
sudo make install
@@ -271,7 +294,7 @@ function oftest {
function cbench {
echo "Installing cbench..."
sudo apt-get install -y libsnmp-dev libpcap-dev
sudo apt-get install -y libsnmp-dev libpcap-dev libconfig-dev
cd ~/
git clone git://openflow.org/oflops.git
cd oflops
@@ -331,6 +354,7 @@ function all {
kernel
mn_deps
of
wireshark
ovs
modprobe
nox
@@ -390,6 +414,7 @@ function usage {
printf -- ' -n: install mini(N)et dependencies + core files\n' >&2
printf -- ' -t: install o(T)her stuff\n' >&2
printf -- ' -v: install open (V)switch\n' >&2
printf -- ' -w: install OpenFlow (w)ireshark dissector\n' >&2
printf -- ' -x: install NO(X) OpenFlow controller\n' >&2
printf -- ' -y: install (A)ll packages\n' >&2
@@ -400,7 +425,7 @@ if [ $# -eq 0 ]
then
all
else
while getopts 'abcdfhkmntvx' OPTION
while getopts 'abcdfhkmntvwx' OPTION
do
case $OPTION in
a) all;;
@@ -414,6 +439,7 @@ else
n) mn_deps;;
t) other;;
v) ovs;;
w) wireshark;;
x) nox;;
?) usage;;
esac
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
# This script is intended to install Mininet into
# a brand-new Ubuntu (10.04 or 11.10) virtual machine,
# to create a fully usable "tutorial" VM.
set -e
sudo sh -c 'cat >> /etc/sudoers' <<EOF
openflow ALL=NOPASSWD: ALL
EOF
sudo sed -i -e 's/Default/#Default/' /etc/sudoers
sudo sed -i -e 's/ubuntu/mininet-vm/' /etc/hostname
sudo sed -i -e 's/ubuntu/mininet-vm/g' /etc/hosts
sudo hostname `cat /etc/hostname`
sudo sed -i -e 's/quiet splash/text/' /etc/default/grub
sudo update-grub
sudo sed -i -e 's/us.archive.ubuntu.com/mirrors.kernel.org/' \
/etc/apt/sources.list
sudo apt-get update
sudo apt-get -y install git-core openssh-server
git clone git://github.com/mininet/mininet
cd mininet
cd
time mininet/util/install.sh
if ! grep NOX_CORE_DIR .bashrc; then
echo "export NOX_CORE_DIR=~/noxcore/build/src/" >> .bashrc
fi
echo <<EOF
You may need to reboot and then:
sudo dpkg-reconfigure openvswitch-datapath-dkms
sudo service openvswitch-switch start
EOF