1 | initial version |
The preferred way to do this is to register a so called dissector preference (pun intended ;)) with the dissection engine. This will automagically add your protocol to the list in the protocol tree in the preferences dialog, and allows your users to enter the ports your dissector should register on. When they do you first deregister from all old ports and register again to the new ports. This is a common theme, see section 2.6 in doc/README.dissector and useful convenience functions are provided for this, e.g. dissector_add_uint_with_preference()
and dissector_add_for_decode_as_with_preference()
.