Wireshark-dev: [Wireshark-dev] How to register a dissector for a specific traffic type?

From: Yves Geissbühler <geyves@xxxxxxx>
Date: Tue, 20 Nov 2007 21:41:21 +0100
Hi all

I have several protocols running on top of each other: TCP > MPA (RFC 5044) > [DDP (RFC 5042) | RDMAP (RFC 5040)].

Currently, I am calling my DDP/RDMAP dissector as a subdissector from my MPA dissector. Because my DDP/RDMAP dissector could also be used on top of SCTP (replacing TCP and MPA) calling it as a subdissector from my MPA dissector does not seem to be the right solution anymore. It would make more sense if my DDP/RDMAP dissector would get called whenever there is MPA or SCTP traffic. So I would like to register my DDP/RDMAP dissector for these to types of traffic.

So far I could not figure out how to achieve this.

In which manner do I have to return (in the proto_reg_handoff_mpa()?) from my MPA dissector such that a call to heur_dissector_add("mpa", dissect_ddp_rdmap, proto_ddp_rdmap) in my DDP/RDMAP dissector would work?


Thanks.
- Yves