wireshark 1.6.7支持openflow协议

1. go to the home page,

http://archive.openflow.org/wk/index.php/OpenFlow_Wireshark_Dissector


点击-----——>Downloads进入页面后,找到命令:在ubuntu 主机上输入此命令

  • git clone git://gitosis.stanford.edu/openflow.git (用于生成packet_openflow.so文件)
然后,在ubuntu 上输入:

#ls /*找到openflow文件

#cd openflow /* 在‘ls’一下,找到 ‘utilities’文件

#cd utilities /* 在‘ls’一下,看到‘wireshark_dissectors/’

#cd wireshark_dissectors /* make clean一下

#apt-get install wireshark /* 这一步通常会下载 wireshark1.6.7版本

#ls /*会发现wireshark_dissectors文件下有 ‘openflow’文件, cd 进入

#ls 

#vi /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

 

就可以了


#make

#make install /*这一步完成后,会生成packet-openflow.so文件, 有时候make会出现error fatal error glib.h no such file or directory

(解决方案:

glib.h is part of "libglib2.0-dev" package. So make sure to install this package.

$ sudo apt-get install libglib2.0-dev

If that does not solve the problem, it may be because the application you are building expects glib development files in a different directory. In that case, you will need to manually specify information about glib-2.0 library in your Makefile. To find out what information to add to Makefile, you can use pkg-config command, which automatically finds metadata about installed libraries.

Run the following command, and put the output of the command in your Makefile.

$ pkg-config --cflags --libs glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -lglib-2.0

In this example, the command returns the above string. So in this case, I will specify "-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include" and "-lglib-2.0" somewhere in my Makefile.

)

再进行#make

#make install /*之后,系统提示packet-openflow.so 文件生成。

此时,文件位置应为:/home/mininet/openflow/utilities/wireshark_dissectors/openflow.

在上述当前目录下,

#cp packet-openflow.so /usr/lib/wireshark/libwireshark1/plugins


2.启动wireshark,

  1. Run wireshark
  2. Open the "Help" --> "About" menu
  3. Select the "Plugins" tab
  4. Click the "Name" header to the plugins by name
  5. Verify that "packet-openflow.so" appears in the list.
  6. Verify that its version is listed as the latest version which you downloaded here
  7. Verify that Wireshark can now dissect the example OpenFlow packet capture provided on the downloads page


3. 运行sudo mn, 监控端口lo,即可看到ofp协议


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值