Wireshark-dev: [Wireshark-dev] Proposed change to packet-tcp (tcp_dissect_pdus)

From: Peter Johansson <Peter.xc.Johansson@xxxxxxxxxxxx>
Date: Tue, 12 Sep 2006 08:29:41 +0200
Hi!

I have come a across a really old protocol on top of TCP that I want to be able to decode using wireshark. Unfortunately the protocol's header is "polymorphic" and mean different things depending on from which source port the message is being sent. Hence the length of the PDU cannot be computed looking at the protocol header alone. To make it easier to implement desegmentation of this protocol on top of TCP I would like to use the tcp_dissect_pdus(...) function in packet-tcp, however the with the information supplied in the callback to packet-my_own_decoder_with_some_obscude_header I cannot determine the PDU length. To do this properly I would require the packet_info structure also being passed along in the call from packet-tcp's tcp_dissect_pdus. Would you approve of changing the interface to the function pointer "guint (*get_pdu_len)(tvbuff_t *, int)" into "guint (*get_pdu_len)(tvbuff_t *, int, packet_info*)" instead?

Please let me know and I will get on with the changes, supplying a list of patches asap. Taking the current set of dissectors into account, I would have to make changes to 66 dissectors in the current version.

/ Regards, Peter