Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] how to register the dissector

From: Jeff Morriss <jeff.morriss@xxxxxxxxxxx>
Date: Mon, 05 Feb 2007 15:53:40 +0800


Vladimir Zherdenovsky wrote:
Hi

I have *FOO* protocol which registered as "*udp*.*port*" == 333 for example.

I want to write *GOO* protocol which should be registered as "*foo*.*num*" == 444.

I had add *register_dissector_table*("*foo*.*num*", "FOO NUMBER", FT_UINT16, BASE_DEC); to *proto_register_m2ou* function, but it doesn't help - *goo* dissector doesn't accessed.

What is missing?

Is "foo.num" registered correctly in the hf array?

Is its value set (is that field dissected) even when 'tree' is not set? Another way to test this is to see if your GOO dissector gets called if you use a display filter (something simple like "frame"). If yes, then the problem is "foo.num" is not being set when 'tree' is not set.