Skip to content

Latest commit

 

History

History
54 lines (42 loc) · 1.95 KB

README.md

File metadata and controls

54 lines (42 loc) · 1.95 KB

Sources

Instructions

Download and untar the Wireshark source code. Only tested on Wireshark 3.2.1 for now.

We assume that wireshark-3.2.1 is located in ~/wireshark-3.2.1/ and wireshark-dissector-rs is located in ~/wireshark-dissector-rs.

$ cd ~/wireshark-dissector-rs
$ cd dissector/plugins/dummy/ && make -f ./Makefile.rust && cd -
$ cp -r ./dissector/plugins/dummy ~/wireshark-3.2.1/plugins/epan/
$ cd ~/wireshark-3.2.1
$ mkdir build
$ cd ~/wireshark-3.2.1/build
# include our plugin directory
$ cmake .. -DCUSTOM_PLUGIN_SRC_DIR="plugins/epan/dummy"
$ make
$ sudo make install

After the long first compile where wireshark is built, simply rebuilding the plugins is enough if you change your dissector later:

$ cd ~/wireshark-3.2.1/build
$ cp -r ./dissector/plugins/dummy ~/wireshark-3.2.1/plugins/epan/
$ make plugins
$ sudo make install

Development Notes

There are several resources available:

You may need to re-generate plugin.c when you edit packet-dummy.c or packet-dummy.h:

$ cd ~/wireshark-dissector-rs/dissector/plugins/dummy/
$ ~/wireshark-3.2.1/tools/make-plugin-reg.py \
        # args: 
        # 1st: /path/to/wireshark-dissector-rs/dissector/plugins/dummy/
        # 2nd: plugin
        # rest: list of your source codes
        $PWD plugin packet-dummy.c packet-dummy.h