Wireshark mailing list archives

Disabling a dissector doesn't seem to quite work.


From: "Maynard, Chris" <Christopher.Maynard () GTECH COM>
Date: Fri, 7 Sep 2012 17:47:43 -0400

Recently another old proprietary protocol (I'll call it FOO) was brought to my attention, and I was asked to write a 
dissector for it.  In doing so, I discovered a conflict with another dissector, namely SNA.  Initially I thought that 
simply disabling SNA when analyzing FOO would be good enough for our purposes; however, even after disabling SNA, the 
FOO dissector was never called.

The conflict arises because both dissectors, SNA and FOO, register as follows:

dissector_add_uint("llc.dsap", SAP_SNA2, [sna|foo]_handle);

I found that even with SNA disabled, I had to comment out the above line of code from the packet-sna.c source file 
before LLC would successfully hand off dissection to FOO.

To illustrate this, I've attached a very stripped down and slightly modified version of packet-foo.c, along with a 
simple foo24.pcap file in case anyone would care to take a look at it.  I have since found an alternate solution, but I 
was surprised that disabling a protocol does not seem to have the completely desired effect.  While the packet does not 
get dissected as SNA, other dissectors are apparently not given the opportunity to dissect the packet even when the SNA 
dissector is disabled.

But beyond LLC and SNA, I was thinking/wondering that maybe this is a general problem affecting all dissectors and that 
some general solution might be needed?

Thanks.
- Chris

--

CONFIDENTIALITY NOTICE: The information contained in this email message is intended only for use of the intended 
recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, 
distribution or copying of this communication is strictly prohibited. If you have received this communication in error, 
please immediately delete it from your system and notify the sender by replying to this email.  Thank you.

Attachment: packet-foo.c
Description: packet-foo.c

Attachment: foo24.pcap
Description: foo24.pcap

Attachment: Makefile_common.patch
Description: Makefile_common.patch

___________________________________________________________________________
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: