Wireshark with Openflow-Plugin in Fedora 14

Preface

參考這篇文章
http://networkstatic.net/installing-wireshark-on-linux-for-openflow-packet-captures/

安裝wireshark source

1
2
3
4
5
6
7
8
9
10
11
12
- wget http://wiresharkdownloads.riverbed.com/wireshark/src/wireshark-1.8.8.tar.bz2
(http://wiresharkdownloads.riverbed.com/wireshark/src/ 自己挑選一個版本下載)
- bunzip2 wireshark-1.8.8.tar.bz2
- tar -xvf wireshark-1.8.8.tar
- cd wireshark-1.8.8
- ./autogen.sh
- ./configure
- make
(這邊錯誤通常是少了某些套件,根據錯誤訊息再去安裝即可)
- make install
- sudo ldconfi
- ./wireshark

編譯openflow plugin

Options

1
2
3
4
5
6
7
Change from:
static void dissect_dl_type(....)
{
....
const char* description = try_val_to_str(dl_type, etype_vals);
....
}
1
2
3
4
5
6
7
To:
static void dissect_dl_type(....)
{
....
const char* description = match_strval(dl_type, etype_vals);
....
}
1
2
3
4
- scons install
- export WIRESHARK=/path_to_wireshark_source/
- scons install
- cp openflow.so /usr/lib/wireshark/libwireshark1/plugins/openflow.so
  • Options 2
    1
    2
    3
    4
    5
    6
    7
    8
    - git clone git://openflow.org/openflow.git
    - cd openflow
    - ./boot.sh
    - ./configure
    - make
    - sudo make install
    - cd utilities/wireshark_dissectors/openflow
    - 修改 packet-openflow.c
1
2
3
4
5
6
Change from:
void proto_reg_handoff_openflow()
{
openflow_handle = create_dissector_handle(dissect_openflow, proto_openflow);
dissector_add(TCP_PORT_FILTER, global_openflow_proto, openflow_handle);
}
1
2
3
4
5
6
To:
void proto_reg_handoff_openflow()
{
openflow_handle = create_dissector_handle(dissect_openflow, proto_openflow);
dissector_add_uint(TCP_PORT_FILTER, global_openflow_proto, openflow_handle);
}

安裝openflow plugin

  • make ( pwd = utilities/wireshark_dissectors/openflow)
  • make install

Use

開啟wireshark即可觀看openflow protocol囉