编译wireshark OpenFlow插件

最近在研究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

 

就可以了

猜你喜欢

转载自witsky.iteye.com/blog/1984265