不知道为什么,安装这个插件遇到了很多困难,最后终于解决了,写一个教程吧,希望能够帮到跟我遇到相同问题的人
OS:ubuntu 14.04
1、安装wireshark:
apt-get install wireshark
so easy!!!!
2、安装openflow插件:
- Ubuntu Wireshark installation from Repository
apt-get update && apt-get install wireshark-dev wireshark mercurial git
hg clone https://bitbucket.org/barnstorm/of-dissector cd of-dissector/src apt-get install scons scons install <span style="background-color:rgb(255,0,0)"><span style="color:#330033;">export WIRESHARK=/usr/include/wireshark/</span></span> scons install #This creates a shared object (so) named openflow.so. #Copy openflow.so to the Wireshark plugin directory. cp openflow.so /usr/lib/wireshark/libwireshark1/plugins/openflow.so 其中红色部分安装这个语句改完没有报错,但是执行下一步的时候会报错,提示: <pre>sudo scons install scons: Reading SConscript files ... <span style="background-color:rgb(255,0,0)">### ERROR: You need to set the WIRESHARK environment variable to the location of your wireshark include directory. ### ERROR: (such that epan/packet.h is a valid include path)</span> 如何解决这个问题呢? <pre>The solution to this is to modify the Sconstruct file under the path //要编辑src文件夹地下的Sconstruct文件 /ofdissector/src with the following changes - 1) remove the " sys.exit() " call, 2) modify the CPPPATH value so that it reads - CPPPATH=[os.getcwd(),'/usr/include/wireshark'] ( verify your path for wireshark containing epan/packet.h )(此路径不能包含中文字符,否则也会报错) 另外,我在网上找到其他生成插件的方法自己试过不行,貌似是现在wireshark版本比较新,导致不兼容; 另一种教程地址:http://blog.youkuaiyun.com/qinchenchong/article/details/8518884 希望能帮看到这篇文章的人!谢谢! 参考:https://www.mail-archive.com/openflow-discuss@lists.stanford.edu/msg03195.html http://networkstatic.net/installing-wireshark-on-linux-for-openflow-packet-captures/
补充问题:
按照上面步骤操作之后,若在scons install出现问题:
openflow-common.cpp: In function 'void proto_reg_handoff_openflow()': openflow-common.cpp:59:60: error: 'dissector_add' was not declared in this scope dissector_add("tcp.port", OFP_TCP_PORT, openflow_handle);
那么编辑 openflow-common.cpp
更改59.60行,讲dissector_add 改为 dissector_uint.保存即可
原链接 http://blog.youkuaiyun.com/Sherry_Rui/article/details/41044801