Wireshark mailing list archives

Re: dissector_add_uint() usage


From: Raghavan R <raghavanr68 () gmail com>
Date: Sun, 27 Mar 2011 20:46:57 -0700

Hi Guy,

On Sun, Mar 27, 2011 at 8:02 PM, Guy Harris <guy () alum mit edu> wrote:

On Mar 27, 2011, at 7:42 PM, Raghavan R wrote:

I am writing a dissector for a Fibre Channel related protocol and want
my dissector to get called based on value of fcct.gstype.

Then you will have to modify the Fibre Channel dissector so that it has a dissector table that uses the value of 
fcct.gstype to choose which dissector to call.

At this point, I think one of my biggest mistakes was to give dissector tables names that were the same as the name 
of the field they used, because that causes a lot of people to think you can use *any* named field as a dissector 
table.  You *can't* do that; registered fields and registered dissector tables are separate, and almost all fields to 
*not* have a dissector table associated with them (because almost all fields are *not* used in protocol 
implementations to select which protocol module to hand the packet to).

Aha - this is what I was missing :-) Thanks a ton for clarifiying it.
I think most people would start from the developer guide like I did,
so maybe you can simply put this note in Section 9.2.

Will try this out over the week. I'm hoping I can make my first
contribution to Wireshark soon :)

Thanks,
Raghavan
___________________________________________________________________________
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: