编译wireshark OpenFlow插件

本文介绍如何编译Wireshark的OpenFlow插件以支持OpenFlow协议的数据包分析。首先需要从官网下载Wireshark源码包并安装必要的依赖软件,然后进行OpenFlow插件的编译,并修复了一个小bug。

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

编译wireshark OpenFlow插件

PS:最近在研究OpenFlow,为了使wireshark支持OpenFlow协议分析数据包,需要编译OpenFlow插件。现在说一下我的过程。

编译wireshark-1.6.8

   到www.wireshark.org下载wireshark源码包。http://wiresharkdownloads.riverbed.com/wireshark/src/wireshark-1.6.8.tar.bz2

   安装依赖包

  apt-get install build-essential

编译OpenFlow插件

修改一处bug

修改

diff --git a/utilities/wireshark_dissectors/openflow/packet-openflow.c b/utilities/wireshark_dissectors/openflow/packet-openflow.c
index aea00f8..8d98335 100644
--- a/utilities/wireshark_dissectors/openflow/packet-openflow.c
+++ b/utilities/wireshark_dissectors/openflow/packet-openflow.c
@@ -766,7 +766,7 @@ static gint ett_ofp_error_msg_data = -1;
  void proto_reg_handoff_openflow()
  {
      openflow_handle = create_dissector_handle(dissect_openflow, proto_openflow);
-    dissector_add(TCP_PORT_FILTER, global_openflow_proto, openflow_handle);
+    dissector_add_uint(TCP_PORT_FILTER, global_openflow_proto, 
+ openflow_handle);
  }

  #define NO_STRINGS NULL

 

就可以了

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值