Wireshark-dev: [Wireshark-dev] Adding a new dissector - beginners guide

From: Thomas Wiens <th.wiens@xxxxxx>
Date: Thu, 21 Aug 2014 14:39:25 +0200
Hi,
I have written a dissector for a protocol which I call "S7 communication".
I've hosted it as plugin dll at sourceforge, but I think the better way
is to contribute it direct into wireshark (if it's good enough).

I've changed the dissector from plugin to internal and did the
testtools, so I think I am ready to go.

The main problem is that I'm new to git/gerrit. I don't want to destroy
or confuse anything in your code repository, and the wireshark docs
don't write it step by step how to do it. I would like to write down
what I want to do, and I hope that someone corrects me when I am wrong.

What I have done:
- created a local copy via git clone
https://code.wireshark.org/review/wireshark
- I've added four files into epan/dissectors:
packet-s7comm.c
packet-s7comm_szl_ids.c
packet-s7comm.h
packet-s7comm_szl_ids.h
- I've changed two files:
epan/CMakeLists.txt
epan/dissectors/Makefile.common
config.nmake

And the steps to push the files up (haven't done it yet):

git add epan/dissectors/packet-s7comm.c
git add epan/dissectors/packet-s7comm_szl_ids.c
git add epan/dissectors/packet-s7comm.h
git add epan/dissectors/packet-s7comm_szl_ids.h
git add epan/CMakeLists.txt
git add epan/dissectors/Makefile.common
git commit -m "Add S7COMM protocol" -m "Dissector T.125 has to be
disabled to let this dissector work."

and finally:

git push ssh://thomas_v2@xxxxxxxxxxxxxxxxxx:29418/wireshark
HEAD:refs/for/master/s7comm


I don't know how to fix the problem with the concurrent T.125 dissector,
seems that my captures are also valid T.125 protocols.

Thanks,

Thomas Wiens