Wireshark mailing list archives
Re: switch between protocols
From: Guy Harris <guy () alum mit edu>
Date: Wed, 8 Dec 2010 10:01:08 -0800
On Dec 8, 2010, at 7:39 AM, Christopher Maynard wrote:
Lange Jan-Erik <Jan-Erik.Lange@...> writes:Dependent on the value of a type field I want to dissect a packet withprotocol A or protocol B.Is this a typical application for the use of a heuristic dissector? Or how canI realize the switch between the to protocolls? A heuristic dissector is basically one that is handed a tvb and it must try to guess whether the data contained within the tvb is relevant to that particular dissector or not. In this case, it doesn't sound to me like a heuristic dissector would apply. Rather, if you have protocol X that contains a type field, such that when that type field is a specific value, 'A' for instance, you always know that the payload is protocol A, then you probably just want to directly call the dissector for protocol A.
Or you could have the dissector for the protocol containing the type field create a dissector handoff table, have the dissectors for protocols A and B register in that table with the appropriate values for the type field, and have the dissector for the protocol containing the type field use the handoff table in a call to dissector_try_port(). ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- switch between protocols Lange Jan-Erik (Dec 08)
- Re: switch between protocols Christopher Maynard (Dec 08)
- Re: switch between protocols Guy Harris (Dec 08)
- Re: switch between protocols Lange Jan-Erik (Dec 08)
- Re: switch between protocols Guy Harris (Dec 09)
- Re: switch between protocols Guy Harris (Dec 08)
- Re: switch between protocols Christopher Maynard (Dec 08)