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] enum or #define?

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 15 Feb 2010 00:00:06 -0800
On Feb 14, 2010, at 10:49 PM, Jaap Keuter wrote:

> That would probably be #1.
> This option makes verification against a protocol spec / RFC easiest,

...and

	1) means some debuggers will, for values of the enum type in question, be able to print the value symbolically rather than numerically and

	2) means that some compilers will warn, if you switch on the enum type in question, if you don't have a case for each of the known values of the enum.

(At least one of the debuggers, and one of the compilers, in question, have names beginning with the letter "g", if you're curious. :-))