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] How do I initialise a boolean preference

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 22 Jan 2007 15:23:02 -0800

On Jan 22, 2007, at 7:24 AM, Hal Lander wrote:

I start Wireshark (don't open a file or anything).
My dissector's proto_reg_handoff routine is called.
In the code that runs only once I initialise a variable
   static gboolean prefTick
to TRUE, and register the preference.

What name did you register your preferences module under, and what name did you register your preference under?


Before returning the variable is printed out and it is TRUE.

My dissector's proto_reg_handoff routine is called a second time (I have not done anything in the Wireshark window yet).

Do you call it yourself from any other routines in your dissector?