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: "Vladimir Zherdenovsky" <Vladimir.Zherdenovsky@xxxxxxxxxxxxxx>
Date: Tue, 6 Feb 2007 09:07:48 +0200
Thanks,

It starts work after I add followed code lines:
if (!dissector_try_port(foo_dissector_table, num, next_tvb, pinfo,
tree))
{
	call_dissector(data_handle, next_tvb , pinfo, tree);
}
Thanks again,
Vladimir






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.



------------------------------

_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev


End of Wireshark-dev Digest, Vol 9, Issue 16
********************************************