Revision 5507550c

View differences:

util/install.sh
145 145

  
146 146
# The following will cause a full OF install, covering:
147 147
# -user switch
148
# -dissector
149 148
# The instructions below are an abbreviated version from
150 149
# http://www.openflowswitch.org/wk/index.php/Debian_Install
151 150
# ... modified to use Debian Lenny rather than unstable.
152 151
function of {
153
    echo "Installing OpenFlow and OpenFlow WireShark dissector..."
152
    echo "Installing OpenFlow reference implementation..."
154 153
    cd ~/
155 154
    $install git-core autoconf automake autotools-dev pkg-config \
156 155
		make gcc libtool libc6-dev 
......
166 165
    make
167 166
    sudo make install
168 167

  
169
    # Install dissector:
170
    $install wireshark libgtk2.0-dev
171
    cd ~/openflow/utilities/wireshark_dissectors/openflow
172
    make
173
    sudo make install
174

  
175
    # The OpenFlow wireshark plugin does not install to the correct dir.
176
    # The correct way would be to fix the install script.
177
    # For now, just copy it to the global WS plugin dir.
178
    # Tested on Ubuntu 11.04.
179
    if [ -e /var/packet-openflow.so ]; then
180
        WS_DIR=`ls -d /usr/lib/wireshark/libwireshark* | head -1`
181
        sudo cp /var/packet-openflow.so $WS_DIR/plugins/
182
    fi
183

  
184
    # Copy coloring rules: OF is white-on-blue:
185
    mkdir -p ~/.wireshark
186
    cp ~/mininet/util/colorfilters ~/.wireshark
187

  
188 168
    # Remove avahi-daemon, which may cause unwanted discovery packets to be 
189 169
    # sent during tests, near link status changes:
190 170
    $remove avahi-daemon
......
199 179
    cd ~
200 180
}
201 181

  
182
function wireshark {
183
    echo "Installing Wireshark dissector..."
184

  
185
    sudo apt-get install -y wireshark libgtk2.0-dev
186

  
187
    if [ "$DIST" = "Ubuntu" ] && [ "$RELEASE" != "10.04" ]; then
188
        # Install newer version
189
        sudo apt-get install -y scons mercurial libglib2.0-dev
190
        sudo apt-get install -y libwiretap-dev libwireshark-dev
191
        cd ~
192
        hg clone https://bitbucket.org/onlab/of-dissector
193
        cd of-dissector/src
194
        export WIRESHARK=/usr/include/wireshark
195
        scons
196
        # libwireshark0/ on 11.04; libwireshark1/ on later
197
        WSDIR=`ls -d /usr/lib/wireshark/libwireshark* | head -1`
198
        WSPLUGDIR=$WSDIR/plugins/
199
        sudo cp openflow.so $WSPLUGDIR
200
        echo "Copied openflow plugin to $WSPLUGDIR"
201
    else
202
        # Install older version from reference source
203
        cd ~/openflow/utilities/wireshark_dissectors/openflow
204
        make
205
        sudo make install
206
    fi
207

  
208
    # Copy coloring rules: OF is white-on-blue:
209
    mkdir -p ~/.wireshark
210
    cp ~/mininet/util/colorfilters ~/.wireshark
211
}
212

  
213

  
202 214
# Install Open vSwitch
203 215
# Instructions derived from OVS INSTALL, INSTALL.OpenFlow and README files.
204 216
function ovs {
......
428 440
    kernel
429 441
    mn_deps
430 442
    of
443
    wireshark
431 444
    ovs
432 445
    nox
433 446
    oftest
......
487 500
    printf -- ' -r: remove existing Open vSwitch packages\n' >&2
488 501
    printf -- ' -t: install o(T)her stuff\n' >&2
489 502
    printf -- ' -v: install open (V)switch\n' >&2
503
    printf -- ' -w: install OpenFlow (w)ireshark dissector\n' >&2
490 504
    printf -- ' -x: install NO(X) OpenFlow controller\n' >&2
491 505
    printf -- ' -y: install (A)ll packages\n' >&2    
492 506
    
......
497 511
then
498 512
    all
499 513
else
500
    while getopts 'abcdfhkmnrtvx' OPTION
514
    while getopts 'abcdfhkmnrtvwx' OPTION
501 515
    do
502 516
      case $OPTION in
503 517
      a)    all;;
......
512 526
      r)    remove_ovs;;
513 527
      t)    other;;
514 528
      v)    ovs;;
529
      w)    wireshark;;
515 530
      x)    nox;;
516 531
      ?)    usage;;
517 532
      esac

Also available in: Unified diff