Fix wireshark dissector install on 11.10
This commit is contained in:
+37
-22
@@ -145,12 +145,11 @@ function mn_deps {
|
|||||||
|
|
||||||
# The following will cause a full OF install, covering:
|
# The following will cause a full OF install, covering:
|
||||||
# -user switch
|
# -user switch
|
||||||
# -dissector
|
|
||||||
# The instructions below are an abbreviated version from
|
# The instructions below are an abbreviated version from
|
||||||
# http://www.openflowswitch.org/wk/index.php/Debian_Install
|
# http://www.openflowswitch.org/wk/index.php/Debian_Install
|
||||||
# ... modified to use Debian Lenny rather than unstable.
|
# ... modified to use Debian Lenny rather than unstable.
|
||||||
function of {
|
function of {
|
||||||
echo "Installing OpenFlow and OpenFlow WireShark dissector..."
|
echo "Installing OpenFlow reference implementation..."
|
||||||
cd ~/
|
cd ~/
|
||||||
$install git-core autoconf automake autotools-dev pkg-config \
|
$install git-core autoconf automake autotools-dev pkg-config \
|
||||||
make gcc libtool libc6-dev
|
make gcc libtool libc6-dev
|
||||||
@@ -166,25 +165,6 @@ function of {
|
|||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
# Install dissector:
|
|
||||||
$install wireshark libgtk2.0-dev
|
|
||||||
cd ~/openflow/utilities/wireshark_dissectors/openflow
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
|
|
||||||
# The OpenFlow wireshark plugin does not install to the correct dir.
|
|
||||||
# The correct way would be to fix the install script.
|
|
||||||
# For now, just copy it to the global WS plugin dir.
|
|
||||||
# Tested on Ubuntu 11.04.
|
|
||||||
if [ -e /var/packet-openflow.so ]; then
|
|
||||||
WS_DIR=`ls -d /usr/lib/wireshark/libwireshark* | head -1`
|
|
||||||
sudo cp /var/packet-openflow.so $WS_DIR/plugins/
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 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
|
# Remove avahi-daemon, which may cause unwanted discovery packets to be
|
||||||
# sent during tests, near link status changes:
|
# sent during tests, near link status changes:
|
||||||
$remove avahi-daemon
|
$remove avahi-daemon
|
||||||
@@ -199,6 +179,38 @@ function of {
|
|||||||
cd ~
|
cd ~
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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/onlab/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
|
# Install Open vSwitch
|
||||||
# Instructions derived from OVS INSTALL, INSTALL.OpenFlow and README files.
|
# Instructions derived from OVS INSTALL, INSTALL.OpenFlow and README files.
|
||||||
function ovs {
|
function ovs {
|
||||||
@@ -428,6 +440,7 @@ function all {
|
|||||||
kernel
|
kernel
|
||||||
mn_deps
|
mn_deps
|
||||||
of
|
of
|
||||||
|
wireshark
|
||||||
ovs
|
ovs
|
||||||
nox
|
nox
|
||||||
oftest
|
oftest
|
||||||
@@ -487,6 +500,7 @@ function usage {
|
|||||||
printf -- ' -r: remove existing Open vSwitch packages\n' >&2
|
printf -- ' -r: remove existing Open vSwitch packages\n' >&2
|
||||||
printf -- ' -t: install o(T)her stuff\n' >&2
|
printf -- ' -t: install o(T)her stuff\n' >&2
|
||||||
printf -- ' -v: install open (V)switch\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 -- ' -x: install NO(X) OpenFlow controller\n' >&2
|
||||||
printf -- ' -y: install (A)ll packages\n' >&2
|
printf -- ' -y: install (A)ll packages\n' >&2
|
||||||
|
|
||||||
@@ -497,7 +511,7 @@ if [ $# -eq 0 ]
|
|||||||
then
|
then
|
||||||
all
|
all
|
||||||
else
|
else
|
||||||
while getopts 'abcdfhkmnrtvx' OPTION
|
while getopts 'abcdfhkmnrtvwx' OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
a) all;;
|
a) all;;
|
||||||
@@ -512,6 +526,7 @@ else
|
|||||||
r) remove_ovs;;
|
r) remove_ovs;;
|
||||||
t) other;;
|
t) other;;
|
||||||
v) ovs;;
|
v) ovs;;
|
||||||
|
w) wireshark;;
|
||||||
x) nox;;
|
x) nox;;
|
||||||
?) usage;;
|
?) usage;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user