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] Question on expert info

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Sat, 22 Dec 2007 01:32:02 +0100
Hi,

Like col_str_add(), generating expert info must not be dependent of tree. It should be considered a bug if it is. But because coloring is usually switched on, tree is always set and the issue is not detected.

Thanx,
Jaap

Abhik Sarkar wrote:
Hello All,

According to the wiki on adding expert
info(http://wiki.wireshark.org/Development/ExpertInfo):
"Remember: The tree variable might be NULL, so the call to
expert_add_info_format() should not be inside any "if (tree)" block!"

However, their are many protocol dissectors (including some with
expert info) which only dissect in a if(tree) block.

What is to be done in such cases... do we go ahead and add expert info
anyway? Or do many dissectors need to be re-written to better support
this and other functionality while still trying to optimize?

Thanks,
Abhik.