ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

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.