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

Wireshark-dev: [Wireshark-dev] static packet_info* g_info in GSM dissectors

Date: Thu, 2 May 2013 17:03:59 -0400 (EDT)
I stumbled across the use of a packet_info* global variable (g_info) in some of the GSM dissectors.  Is this really necessary?  I thought it could have been just like the IEEE802.11 dissector in that it just didn't want to proliferate passing the packet_info structure everywhere, but I see functions that pass in a packet_info structure, but use the global instead (which really scared me).  It also appears like the global is used by functions called from other dissectors (where the function doesn't have a packet_info to pass in). 

I can take the hit and work out all of the compiler errors that result from removing the global (and proliferating the packet_info structure into functions), but it would it be safe to do so?

Michael