From 1902dd2e3a9489a30368176862ad11e931cfb8b9 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Tue, 10 Apr 2012 21:14:11 -0700 Subject: [PATCH 1/5] Add support for updated wireshark plugin. Need to verify this works with 11.04. --- util/install.sh | 46 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/util/install.sh b/util/install.sh index 33e5d89..6fd16e8 100755 --- a/util/install.sh +++ b/util/install.sh @@ -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,37 @@ function of { sudo sh -c "echo 'blacklist net-pf-10\nblacklist ipv6' >> $BLACKLIST" } + +function wireshark { + # Install 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 ssh://hg@bitbucket.org/onlab/of-dissector + cd of-dissector/src + export WIRESHARK=/usr/include/wireshark + scons + WSPLUGDIR=/usr/lib/wireshark/libwireshark1/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 { @@ -331,6 +352,7 @@ function all { kernel mn_deps of + wireshark ovs modprobe nox @@ -390,6 +412,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 dissedtor\n' >&2 printf -- ' -x: install NO(X) OpenFlow controller\n' >&2 printf -- ' -y: install (A)ll packages\n' >&2 @@ -400,7 +423,7 @@ if [ $# -eq 0 ] then all else - while getopts 'abcdfhkmntvx' OPTION + while getopts 'abcdfhkmntvwx' OPTION do case $OPTION in a) all;; @@ -414,6 +437,7 @@ else n) mn_deps;; t) other;; v) ovs;; + w) wireshark;; x) nox;; ?) usage;; esac From 0919b7ca67cdc0f2a60a6718e471a9b10bee7f20 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Tue, 10 Apr 2012 21:23:26 -0700 Subject: [PATCH 2/5] Use correct non-authenticated clone for of-dissector. --- util/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/install.sh b/util/install.sh index 6fd16e8..6bdae39 100755 --- a/util/install.sh +++ b/util/install.sh @@ -170,7 +170,7 @@ function wireshark { sudo apt-get install -y scons mercurial libglib2.0-dev sudo apt-get install -y libwiretap-dev libwireshark-dev cd ~ - hg clone ssh://hg@bitbucket.org/onlab/of-dissector + hg clone https://bitbucket.org/onlab/of-dissector cd of-dissector/src export WIRESHARK=/usr/include/wireshark scons From edd1d0f3a4e687dc4ee2fcae6b2af10aafb5f4de Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Tue, 10 Apr 2012 21:34:07 -0700 Subject: [PATCH 3/5] Support libwireshark[0,1] for 11.04 and 11.10 --- util/install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/install.sh b/util/install.sh index 6bdae39..26f02a9 100755 --- a/util/install.sh +++ b/util/install.sh @@ -174,7 +174,9 @@ function wireshark { cd of-dissector/src export WIRESHARK=/usr/include/wireshark scons - WSPLUGDIR=/usr/lib/wireshark/libwireshark1/plugins/ + # 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 From 4bd1a61353c3df47c1e98fcbcd9b6303ac04bb06 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Tue, 10 Apr 2012 21:47:29 -0700 Subject: [PATCH 4/5] Add install message for wireshark dissector. --- util/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/install.sh b/util/install.sh index 26f02a9..7488a07 100755 --- a/util/install.sh +++ b/util/install.sh @@ -160,8 +160,8 @@ function of { } -function wireshark { - # Install wireshark dissector +function wireshark { + echo "Installing Wireshark dissector..." sudo apt-get install -y wireshark libgtk2.0-dev From a8c1965b903f8c5ce0e38d34e8ffb2a1f1638edb Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Wed, 11 Apr 2012 13:21:07 -0700 Subject: [PATCH 5/5] Fix typo. --- util/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/install.sh b/util/install.sh index 7488a07..92a7d6b 100755 --- a/util/install.sh +++ b/util/install.sh @@ -414,7 +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 dissedtor\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