Wireshark的Openflow扩展

环境:ubuntu12.04 LTS

wireshark版本:1.6.7

注:最新的wireshark已经添加OpenFlow1.3的完整支持和1.0的部分支持

一. OpenFlow 1.0

其实现在最新的wireshark1.11(非稳定版)已经支持OpenFlow消息的解析了,但是为了支持解析自己定义的协议,不得不使用较低版本。

git clone git://gitosis.stanford.edu/openflow.git

cd openflow/utilities/wireshark_dissectors/openflow/

vim packet-openflow.c

修改第769行:

dissector_add(TCP_PORT_FILTER, global_openflow_proto, openflow_handle)

修改为

dissector_add_uint(TCP_PORT_FILTER,global_openflow_proto,openflow_handle)

sudo make

将编译好的 packet-openflow.so 放入 wireshark 的 plugins 路径(具体路径在 wireshark 的(Help/About Wireshark)中查看)

二.OpenFlow 1.3

sudo apt-get install wireshark wireshark-dev scons build-essential libcanberra-gtk-module

git clone https://github.com/CPqD/ofdissector.git

export WIRESHARK=/usr/include/wireshark

sudo apt-get install wireshark wireshark-dev scons build-essential libcanberra-gtk-module

git clone https://github.com/CPqD/ofdissector.git

export WIRESHARK=/usr/include/wireshark

cd ofdissector

cd src

scons install

将编译好的openflow.so放入wireshark的plugins文件夹(在wireshark的(Help/About)中查看)

注:本人试过将两个版本的so文件都放在plugins中会造成冲突。