Re: [Wireshark-dev] How to get calling dissector

2018-03-18 Thread Dario Lombardo
If you're interested in knowing if the layers contain a specific protocol, proto_is_frame_protocol could be your choice. However, this doesn't give you the previous layer. On Mon, Jan 29, 2018 at 6:03 PM, Roland Knall wrote: > Short answer: packet_info->layers should get you

Re: [Wireshark-dev] How to get calling dissector

2018-01-30 Thread Uli Heilmeier
Thanks for your idea. It's exactly the way Michael did it with his improvement for my patch: https://code.wireshark.org/review/#/c/25509/ Am 29.01.18 um 21:01 schrieb Shai Shapira: > I believe there's another possible approach here: > Register the dissector once with proto_register_protocol (as

Re: [Wireshark-dev] How to get calling dissector

2018-01-30 Thread Shai Shapira
I believe there's another possible approach here: Register the dissector once with proto_register_protocol (as usual), which assumed caller is TCP register another dissection function (for SMP) using create_dissector_handle_with_name called something like "smp.tds" than look for this name when

Re: [Wireshark-dev] How to get calling dissector

2018-01-29 Thread Uli Heilmeier
Thanks a lot Roland. Now that I know what to look for packet-sip.c gives a nice example. Cheers Uli Am 29.01.18 um 18:03 schrieb Roland Knall: > Short answer: packet_info->layers should get you the list of protocols called > before yours. If you iterate, you should > see the other protocols

Re: [Wireshark-dev] How to get calling dissector

2018-01-29 Thread Roland Knall
Short answer: packet_info->layers should get you the list of protocols called before yours. If you iterate, you should see the other protocols before yours. In packet.c:754 you see the code adding to the list. Not sure though, how stable that interface is. It is pretty in-depth for span, so you

[Wireshark-dev] How to get calling dissector

2018-01-29 Thread Uli Heilmeier
Hi all, TL,DR: How does a dissector know which dissector called it? Long version: I’m currently implementing a dissector for „Session Multiplex Protocol“ (SMP) [1] requested in bug 14110 [2]. The Tabular Data Stream (TDS; MS SQL Server) protocol depends on SMP when using the MARS feature [3].