Ubuntu14.04: wireshark安装Openflow插件

本文详细介绍了在Ubuntu 14.04环境下安装Wireshark和OpenFlow插件的过程,包括可能遇到的问题及解决方案。通过修改Sconstruct文件和调整环境变量,最终成功安装插件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

不知道为什么,安装这个插件遇到了很多困难,最后终于解决了,写一个教程吧,希望能够帮到跟我遇到相同问题的人

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值